Skip to content

feat: support dynamic plugin discovery via plugins.toml#290

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
afourniernv:afournier/relay-309-support-rust-plugin-discovery-through-pluginstoml
Jun 23, 2026
Merged

feat: support dynamic plugin discovery via plugins.toml#290
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
afourniernv:afournier/relay-309-support-rust-plugin-discovery-through-pluginstoml

Conversation

@afourniernv

@afourniernv afourniernv commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Overview

Support manifest-backed dynamic plugin discovery through plugins.toml without turning plugins.toml into a second plugin contract.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • add [[plugins.dynamic]] parsing to the CLI config loader
  • require manifest and derive canonical plugin.id from relay-plugin.toml
  • allow optional host-owned [plugins.dynamic.config] while rejecting plugin-owned and lifecycle fields in plugins.toml
  • normalize file and directory manifest references and reject duplicate canonical plugin IDs across merged plugins.toml sources
  • keep dynamic plugin discovery separate from the generic runtime PluginConfig path so existing components behavior is preserved
  • expose resolved dynamic plugin discovery state through ResolvedConfig and nemo-relay doctor human/JSON reporting
  • centralize stripped plugins.toml merge semantics in core so the CLI does not duplicate merge logic
  • add focused CLI coverage for discovery parsing, duplicate detection, doctor reporting, and existing launcher/config fallout

Validation run:

  • just test-rust
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p nemo-relay-cli config::tests -- --nocapture
  • cargo test -p nemo-relay-cli doctor::tests::format_human_reports_discovered_dynamic_plugins_in_configuration -- --nocapture
  • cargo test -p nemo-relay-cli doctor::tests::format_json_is_stable_and_versioned -- --nocapture
  • cargo test -p nemo-relay-cli doctor::tests::format_json_reports_discovered_dynamic_plugin_fields -- --nocapture
  • uv run pre-commit run --files crates/cli/src/config.rs crates/cli/src/doctor.rs crates/cli/tests/coverage/config_tests.rs crates/cli/tests/coverage/doctor_tests.rs crates/cli/tests/coverage/launcher_tests.rs crates/core/src/plugin.rs

Where should the reviewer start?

Start in crates/cli/src/config.rs, then review crates/cli/src/doctor.rs for the reporting surface and crates/cli/tests/coverage/config_tests.rs for the new plugins.dynamic contract coverage.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to RELAY-309

Summary by CodeRabbit

  • New Features
    • Added support for dynamic plugins declared in plugins.toml via manifest references, including resolved dynamic plugin details and enforcement of global plugin_id uniqueness.
    • Enhanced the doctor command to display dynamic plugins in both JSON and human-readable output, including whether host configuration is available.
  • Bug Fixes
    • Prevented conflicting runtime plugin configuration when combining gateway config with merged plugin sources.
  • Refactor
    • Centralized canonical plugin-config layering/merging behavior.
  • Chores
    • Expanded tests for dynamic plugin resolution, validation errors, config layering, and doctor output formatting.

@afourniernv afourniernv requested a review from a team as a code owner June 23, 2026 04:59
@copy-pr-bot

copy-pr-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added size:L PR is large Feature a new feature lang:rust PR changes/introduces Rust code labels Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f9c91e9c-64d9-4f05-bd60-a2dab55c3348

📥 Commits

Reviewing files that changed from the base of the PR and between 9140401 and 3c29bec.

📒 Files selected for processing (1)
  • crates/cli/tests/coverage/config_tests.rs
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (11)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/cli/tests/coverage/config_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure dynamic config shape still matches the documented canonical model

Files:

  • crates/cli/tests/coverage/config_tests.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/config_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/cli/tests/coverage/config_tests.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/cli/tests/coverage/config_tests.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/cli/tests/coverage/config_tests.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/cli/tests/coverage/config_tests.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/cli/tests/coverage/config_tests.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/cli/tests/coverage/config_tests.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/cli/tests/coverage/config_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/config_tests.rs
🔇 Additional comments (1)
crates/cli/tests/coverage/config_tests.rs (1)

637-665: LGTM!


Walkthrough

Adds first-class dynamic plugin support to plugins.toml loading. A new merge_plugin_config_documents helper is extracted in crates/core. ResolvedConfig gains a dynamic_plugins field backed by new types and enums. The config loader resolves [plugins.dynamic] manifest references, enforces plugin ID uniqueness, and the doctor report surfaces dynamic plugin status. All affected tests are updated.

Changes

Dynamic Plugin Loading and Reporting

Layer / File(s) Summary
Extract merge_plugin_config_documents helper
crates/core/src/plugin.rs
load_plugin_config_files collects parsed TOML documents into an intermediate vector and delegates merging to a new public merge_plugin_config_documents function. The helper performs canonical layering with per-file component kind uniqueness validation and returns merged JSON with source paths.
ResolvedConfig and dynamic plugin data types
crates/cli/src/config.rs
Updates imports to support dynamic plugin resolution. Adds dynamic_plugins field to ResolvedConfig, introduces ResolvedDynamicPluginConfig struct with host_config_status() accessor method, adds DynamicPluginHostConfigStatus enum, and expands PluginTomlConfig with FileDynamicPluginConfig and PluginTomlPluginsSection parsing types.
Dynamic plugin loading and reference resolution
crates/cli/src/config.rs
Rewrites load_plugin_toml_config_from_paths to parse each plugin TOML, resolve [plugins.dynamic] entries by loading manifests and enforcing unique plugin_id values via a HashSet, strip the dynamic section from the runtime document, and merge remaining docs with merge_plugin_config_documents. Includes manifest-path resolution, empty-table cleanup, and helper functions.
Apply config wiring
crates/cli/src/config.rs
Updates apply_plugin_toml_config to accept &mut ResolvedConfig instead of &mut GatewayConfig. Writes merged runtime plugins.config into resolved.gateway.plugin_config, populates resolved.dynamic_plugins, adds conflict detection for plugins.config defined in multiple sources, and updates the call site to pass the full resolved config.
Doctor report dynamic plugin surface
crates/cli/src/doctor.rs
Extends ConfigurationInfo with dynamic_plugins: Vec<DynamicPluginReferenceInfo>, adds the DynamicPluginReferenceInfo struct, updates imports, wires resolved.dynamic_plugins through collect_reportcollect_configuration, adds Check builders for reference resolution and host-config status, and extends format_human to render a Dynamic plugin subsection.
Config loading tests for dynamic plugins
crates/cli/tests/coverage/config_tests.rs
Adds write_dynamic_manifest test helper. Updates existing assertion expectations to match the new resolver output shape. Adds tests for successful dynamic plugin manifest resolution with absolute paths, duplicate plugin ID rejection across sources and within one file, invalid lifecycle field rejection, and preservation of config.toml [plugins].config when plugins.toml defines only dynamic plugins.
Doctor and launcher test updates
crates/cli/tests/coverage/doctor_tests.rs, crates/cli/tests/coverage/launcher_tests.rs
Initializes configuration.dynamic_plugins: vec![] in empty_report(). Updates JSON stability tests to assert the array field. Adds format_json() test validating dynamic plugin JSON output and format_human() test asserting rendered subsection with host-config messaging. Updates two collect_configuration call sites to pass &[]. Adds ..ResolvedConfig::default() to all launcher test struct literals.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title follows Conventional Commits format with 'feat' type, descriptive scope context, and imperative summary under 72 characters.
Description check ✅ Passed Description includes overview, detailed changes, reviewer guidance, and linked issue, with required confirmations checked.
Docstring Coverage ✅ Passed Docstring coverage is 90.57% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/cli/src/config.rs`:
- Around line 1022-1032: The unconditional assignment on line 1031 of
plugin_toml.value to resolved.gateway.plugin_config causes a plugins.toml file
with only dynamic plugins (where plugin_toml.value is None) to erase any plugin
config previously loaded from config.toml. Guard the assignment so that
resolved.gateway.plugin_config is only updated when plugin_toml.value is Some,
preventing None values from overwriting existing configuration. The conflict
check already ensures both sources don't define config simultaneously, so this
guard will preserve config from config.toml when plugins.toml contains only
dynamic plugins.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 5663ca62-17de-47b7-abfe-4da8a74d1364

📥 Commits

Reviewing files that changed from the base of the PR and between 6a93612 and fbf9a05.

📒 Files selected for processing (6)
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/core/src/plugin.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure dynamic config shape still matches the documented canonical model

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/plugin.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/src/plugin.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/src/plugin.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/plugin.rs
🔇 Additional comments (7)
crates/cli/tests/coverage/config_tests.rs (1)

25-56: LGTM!

Also applies to: 409-442, 486-506, 557-576, 577-691

crates/cli/src/doctor.rs (2)

30-32: 📐 Maintainability & Code Quality

Confirm required Rust validation commands were run for this change.

Please provide confirmation/output for:

  • just test-rust
  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings

As per coding guidelines: “Any Rust change must run just test-rust”, “Any Rust change must run cargo fmt --all”, and “Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings”.

Source: Coding guidelines


89-98: LGTM!

Also applies to: 159-159, 195-195, 217-260, 1407-1435

crates/cli/tests/coverage/doctor_tests.rs (1)

123-123: LGTM!

Also applies to: 305-330, 405-405, 590-590, 606-634

crates/cli/tests/coverage/launcher_tests.rs (1)

248-248: LGTM!

Also applies to: 325-325, 472-472, 498-498, 544-544, 577-577, 626-626, 702-702, 729-729, 772-772, 815-815, 851-851, 1046-1046, 1165-1165

crates/core/src/plugin.rs (1)

1124-1156: LGTM!

crates/cli/src/config.rs (1)

486-518: LGTM!

Comment thread crates/cli/src/config.rs
Comment thread crates/cli/src/config.rs Outdated
@afourniernv afourniernv force-pushed the afournier/relay-309-support-rust-plugin-discovery-through-pluginstoml branch from fbf9a05 to ee3385a Compare June 23, 2026 14:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/cli/tests/coverage/doctor_tests.rs`:
- Around line 309-329: The JSON coverage in
format_json_reports_discovered_dynamic_plugin_fields only asserts the
DynamicPluginHostConfigStatus::Present wire value; add a second assertion case
for the same report path using DynamicPluginHostConfigStatus::Absent so both
enum values are locked in the contract. Reuse the existing format_json,
serde_json parsing, and plugin["host_config_status"] checks to verify the absent
variant serializes to the expected string alongside the current present case.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 7d5d0052-fffb-4332-8977-c681d4ad272c

📥 Commits

Reviewing files that changed from the base of the PR and between fbf9a05 and ee3385a.

📒 Files selected for processing (6)
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/core/src/plugin.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/plugin.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/src/plugin.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/src/plugin.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/core/src/plugin.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/plugin.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure dynamic config shape still matches the documented canonical model

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
🔇 Additional comments (8)
crates/cli/tests/coverage/config_tests.rs (1)

25-56: LGTM!

Also applies to: 409-442, 486-506, 557-575, 577-691

crates/cli/src/doctor.rs (2)

30-31: 📐 Maintainability & Code Quality

Please attach proof of required Rust validation commands.

I don’t see execution evidence in this diff for the required Rust checks (just test-rust, cargo fmt --all, and cargo clippy --workspace --all-targets -- -D warnings). Please include results before merge.

As per coding guidelines, “Any Rust change must run just test-rust”, “Any Rust change must run cargo fmt --all”, and “Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings.”

Source: Coding guidelines


88-97: LGTM!

Also applies to: 157-157, 193-193, 215-224, 227-252, 1398-1426

crates/cli/tests/coverage/doctor_tests.rs (1)

123-123: LGTM!

Also applies to: 305-306, 403-403, 588-588, 604-630

crates/cli/tests/coverage/launcher_tests.rs (1)

248-248: LGTM!

Also applies to: 325-325, 472-472, 498-498, 544-544, 577-577, 626-626, 702-702, 729-729, 772-772, 815-815, 851-851, 1046-1046, 1165-1165

crates/cli/src/config.rs (2)

1012-1022: Previously flagged overwrite is still present.

Line 1021 still assigns plugin_toml.value unconditionally, so a plugins.toml containing only dynamic plugins can replace an existing config.toml plugin config with None. Guard the assignment with if plugin_toml.value.is_some() as previously suggested.


4-13: LGTM!

Also applies to: 480-508, 759-768, 923-1002, 1026-1106

crates/core/src/plugin.rs (1)

1120-1155: 📐 Maintainability & Code Quality

Confirm the core-change validation matrix.

The helper extraction looks behavior-preserving, but this touches crates/core, and the PR objective only mentions Rust tests/clippy/pre-commit. Please confirm validate-change plus the affected binding matrix was run, or document why it is not applicable. As per coding guidelines, crates/core/**/*.rs: “If the change touched crates/core or shared runtime semantics, also use validate-change”; {crates/core,crates/adaptive}/**: “Changes to crates/core or crates/adaptive must run the full language matrix.”

Source: Coding guidelines

Comment thread crates/cli/tests/coverage/doctor_tests.rs
@afourniernv afourniernv force-pushed the afournier/relay-309-support-rust-plugin-discovery-through-pluginstoml branch from ee3385a to 9140401 Compare June 23, 2026 14:51
@afourniernv

Copy link
Copy Markdown
Collaborator Author

/ok to test 9140401

@github-actions

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
crates/cli/tests/coverage/doctor_tests.rs (1)

308-329: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add JSON assertion for host_config_status = "absent" too.

The test validates "present" wire value but not "absent". Adding a second assertion case locks both enum values in the JSON contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/cli/tests/coverage/doctor_tests.rs` around lines 308 - 329, The test
function format_json_reports_discovered_dynamic_plugin_fields only validates the
JSON serialization when host_config_status is set to
DynamicPluginHostConfigStatus::Present. Add a second DynamicPluginReferenceInfo
entry to the report.dynamic_plugins vector with host_config_status set to
DynamicPluginHostConfigStatus::Absent, then add corresponding assertions to
verify that the second plugin entry in the parsed JSON has its
host_config_status field equal to "absent". This ensures both enum variants of
host_config_status are properly tested in the JSON contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@crates/cli/tests/coverage/doctor_tests.rs`:
- Around line 308-329: The test function
format_json_reports_discovered_dynamic_plugin_fields only validates the JSON
serialization when host_config_status is set to
DynamicPluginHostConfigStatus::Present. Add a second DynamicPluginReferenceInfo
entry to the report.dynamic_plugins vector with host_config_status set to
DynamicPluginHostConfigStatus::Absent, then add corresponding assertions to
verify that the second plugin entry in the parsed JSON has its
host_config_status field equal to "absent". This ensures both enum variants of
host_config_status are properly tested in the JSON contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 21ba38a0-c51b-4187-a5ea-70ba943982d9

📥 Commits

Reviewing files that changed from the base of the PR and between ee3385a and 9140401.

📒 Files selected for processing (6)
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/core/src/plugin.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (15)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Use snake_case naming convention for Rust identifiers (e.g., nemo_relay_tool_call)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

**/*.rs: Run cargo fmt --all to format all Rust code
Run cargo clippy --workspace --all-targets -- -D warnings to enforce all clippy lints as errors

**/*.rs: Run cargo fmt --all when Rust files changed as part of WebAssembly work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files changed as part of WebAssembly work

**/*.rs: If any Rust code changed, always run just test-rust
If any Rust code changed, also run cargo fmt --all
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting with cargo fmt --all
Run Rust linting with cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Use cargo fmt for Rust code formatting
Run cargo clippy -- -D warnings to lint Rust code and treat all warnings as errors
Use Rust snake_case naming convention for Rust identifiers
Include SPDX license header in all Rust source files using double-slash comment syntax
Validate Rust code with uv run pre-commit run --all-files to enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
{crates/adaptive/**/*.rs,**/*test*.{rs,py,go,ts,js},**/*adaptive*test*.{rs,py,go,ts,js},docs/plugins/adaptive/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Maintain documented and tested validation and report behavior for adaptive surfaces

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
**/{Cargo.toml,**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Rust package names in Cargo.toml and their actual usage across the codebase

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
**/*.{h,hpp,c,cpp,rs}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Ensure FFI header and library naming follows consistent conventions across platform-specific builds

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Rust crate names and module prefixes during coordinated rename operations

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
crates/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

crates/**/*.rs: Keep async behavior on the existing tokio-based model. Bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.
Use Json = serde_json::Value in Rust-facing runtime APIs for JSON payload handling.

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
  • crates/core/src/plugin.rs
  • crates/cli/src/config.rs
  • crates/cli/src/doctor.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/launcher_tests.rs
  • crates/cli/tests/coverage/config_tests.rs
**/*config*.{rs,ts,py,go,js,json,yaml,yml}

📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)

Ensure dynamic config shape still matches the documented canonical model

Files:

  • crates/cli/tests/coverage/config_tests.rs
  • crates/cli/src/config.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/plugin.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

crates/core/**/*.rs: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.

Files:

  • crates/core/src/plugin.rs
crates/{core,adaptive}/**

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly

Files:

  • crates/core/src/plugin.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/plugin.rs
🔇 Additional comments (15)
crates/core/src/plugin.rs (1)

1124-1138: LGTM!

Also applies to: 1140-1156

crates/cli/src/config.rs (1)

4-13: LGTM!

Also applies to: 483-508, 765-765, 923-942, 953-1026, 1028-1108

crates/cli/tests/coverage/config_tests.rs (1)

25-56: LGTM!

Also applies to: 409-442, 486-506, 557-574, 577-807, 860-897

crates/cli/src/doctor.rs (7)

30-31: LGTM!


88-96: LGTM!


157-157: LGTM!


193-193: LGTM!


215-224: LGTM!


227-251: LGTM!


1398-1426: LGTM!

crates/cli/tests/coverage/doctor_tests.rs (4)

123-123: LGTM!


305-306: LGTM!


403-403: LGTM!

Also applies to: 588-588


604-634: LGTM!

crates/cli/tests/coverage/launcher_tests.rs (1)

248-248: LGTM!

Also applies to: 325-325, 472-472, 498-498, 544-544, 577-577, 626-626, 702-702, 729-729, 772-772, 815-815, 851-851, 1046-1046, 1165-1165

@afourniernv

Copy link
Copy Markdown
Collaborator Author

/ok to test 3c29bec

@willkill07 willkill07 added this to the 0.5 milestone Jun 23, 2026
@afourniernv

Copy link
Copy Markdown
Collaborator Author

/merge

@rapids-bot rapids-bot Bot merged commit 67606b5 into NVIDIA:main Jun 23, 2026
63 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature a new feature lang:rust PR changes/introduces Rust code size:L PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants