feat: configure dynamic plugins through CLI#325
Conversation
Signed-off-by: Will Killian <wkillian@nvidia.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (24)**/*.{rs,toml}📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Files:
**/*.{py,txt,toml,cfg,yaml,yml}📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Files:
{docs/**,examples/**,README.md}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
**/*.{md,mdx,py,sh,yaml,yml,toml,json}📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Files:
**/*.toml📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
**/*.{md,rst,html,txt}📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)
Files:
**/*.{md,rst,html}📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)
Files:
**/*.md📄 CodeRabbit inference engine (.agents/skills/contribute-integration/SKILL.md)
Files:
**/{docs,examples,**/*.md,*.patch,*.diff,.github,*.sh,*.yaml,*.yml}📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Files:
**/*.{md,rst,txt}📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
Files:
**/*.{md,rst}📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
Files:
{docs/**,README.md,CONTRIBUTING.md,**/*.md}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
{docs/**,README.md,**/Cargo.toml,**/package.json,**/*.md}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
**/*.{html,md,mdx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/README.md📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.rs📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Files:
{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)
Files:
**/{Cargo.toml,**/*.rs}📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Files:
**/*.{h,hpp,c,cpp,rs}📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Files:
**/*.{rs,py,go,js,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
crates/**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}⚙️ CodeRabbit configuration file
Files:
🛑 Comments failed to post (1)
WalkthroughAdds JSON Schema-backed dynamic plugin editing and validation, introduces a document wrapper for merged TOML persistence, updates plugin menu navigation and viewport rendering, and extends docs, examples, dependencies, and tests to cover the new schema flow. ChangesDynamic Plugin Config Schema Editing
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
1 similar comment
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/plugins/dynamic_editor.rs`:
- Around line 205-219: The remove_field and reset_field paths are eagerly
synthesizing an empty config map when the plugin config was originally absent,
which turns a no-op clear into config = {} and can make no-default resets fail
validation on save. Update remove_field to preserve None when there was no
existing config to mutate, and make reset_field avoid routing no-default fields
through remove_field unless there is an actual prior value to restore. Keep the
behavior tied to remove_value_at_path, DynamicConfigField::default, and
set_field so only real defaults or existing values are written back.
In `@crates/cli/src/plugins/schema.rs`:
- Around line 249-252: The restore path in
`restore_edit_secrets`/`restore_secret_tokens` is too permissive because it
replaces matching redaction tokens anywhere in the edited JSON. Update the raw
edit flow in `crates/cli/src/plugins/schema.rs` so tokens are only restored at
their original validated locations, or reject edits that duplicate/move a token
into a different field. Use the existing `restore_edit_secrets`,
`redact_for_edit`, and `SecretEditValues` symbols to locate the code and enforce
occurrence binding before reconstructing the final `Value`.
- Around line 311-314: The schema validation and resolution flow currently
accepts local $dynamicRef in reject_external_references, but resolve_schema only
follows $ref and ignores $dynamicAnchor, leaving Draft 2020-12 dynamic
references unresolved in the editor path. Update the schema handling in
schema.rs by either rejecting $dynamicRef and $dynamicAnchor alongside $ref in
the CLI subset, or extend resolve_schema and its related schema traversal
helpers to resolve dynamic anchors consistently so root typing, field synthesis,
and secret discovery see the resolved schema.
In `@crates/core/src/plugin/dynamic/manifest.rs`:
- Around line 521-524: The config_schema.path validation in the manifest parser
only rejects URI schemes, so UNC-style network paths can still be treated as
local paths and opened immediately. Update the validation logic around
required_trimmed_string, has_uri_scheme, and the config_schema.path checks to
also reject UNC and verbatim-UNC prefixes like backslash-backslash and
double-slash network shares before any filesystem access. Add a regression test
alongside the existing config_schema.path path cases to cover UNC and
verbatim-UNC inputs and verify they are rejected.
🪄 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: 5255c033-7727-435b-b27f-e9099648d008
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (26)
ATTRIBUTIONS-Rust.mdREADME.mdabout.tomlcrates/cli/Cargo.tomlcrates/cli/README.mdcrates/cli/src/config.rscrates/cli/src/plugins.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/lifecycle.rscrates/cli/src/plugins/schema.rscrates/cli/src/pricing.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/tests/coverage/pricing_tests.rscrates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.rsdeny.tomldocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdxexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/config.schema.jsonexamples/rust-native-plugin/relay-plugin.tomlskills/nemo-relay-build-plugin/SKILL.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (41)
**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Rust crate names and module prefixes during coordinated rename operations
Files:
about.tomldeny.tomlcrates/cli/src/config.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/Cargo.tomlexamples/rust-native-plugin/relay-plugin.tomlcrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.rs
**/*.{py,txt,toml,cfg,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Python package names and top-level module imports during coordinated rename operations
Files:
about.tomldeny.tomlcrates/cli/Cargo.tomlexamples/rust-native-plugin/relay-plugin.toml
**/*.{md,mdx,py,sh,yaml,yml,toml,json}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Keep package names, repo references, and build commands current
Files:
about.tomldeny.tomlcrates/cli/README.mdREADME.mdexamples/rust-native-plugin/config.schema.jsoncrates/cli/Cargo.tomlexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/relay-plugin.tomlskills/nemo-relay-build-plugin/SKILL.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
**/*.toml
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Include SPDX license header in TOML configuration files using hash comment syntax
Files:
about.tomldeny.tomlcrates/cli/Cargo.tomlexamples/rust-native-plugin/relay-plugin.toml
**/*.{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:
about.tomldeny.tomlcrates/cli/README.mdcrates/cli/src/config.rsREADME.mdcrates/cli/tests/coverage/launcher_tests.rscrates/cli/Cargo.tomlexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/relay-plugin.tomlskills/nemo-relay-build-plugin/SKILL.mdcrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.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:
- Scope stacks decide where work belongs and which scope-local behavior is visible.
- Middleware registries decide what guardrails and intercepts run around managed calls.
- Plugins install reusable runtime behavior from configuration.
- Events record runtime behavior in ATOF form.
- 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:
about.tomldeny.tomlcrates/cli/README.mdcrates/cli/src/config.rsREADME.mdexamples/rust-native-plugin/config.schema.jsoncrates/cli/tests/coverage/launcher_tests.rscrates/cli/Cargo.tomlexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/relay-plugin.tomlskills/nemo-relay-build-plugin/SKILL.mdcrates/cli/tests/coverage/pricing_tests.rsdocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdxcrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.rs
deny.toml
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run
cargo deny checkfor Rust dependency auditing as configured indeny.toml
Files:
deny.toml
**/*.{md,rst,html,txt}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)
**/*.{md,rst,html,txt}: Always spellNVIDIAin all caps. Do not useNvidia,nvidia,nVidia,nVIDIA, orNV.
Usean NVIDIAbefore a noun because the name starts with an 'en' sound.
Do not add a registered trademark symbol afterNVIDIAwhen referring to the company.
Use trademark symbols with product names only when the document type or legal guidance requires them.
Verify official capitalization, spacing, and hyphenation for product names.
Precede NVIDIA product names withNVIDIAon first mention when it is natural and accurate.
Do not rewrite product names for grammar or title-case rules.
Preserve third-party product names according to the owner's spelling.
Include the company name and full model qualifier on first use when it helps identify the model.
Preserve the official capitalization and punctuation of model names.
Use shorter family names only after the full name is established.
Spell out a term on first use and put the acronym in parentheses unless the acronym is widely understood by the intended audience.
Use the acronym on later mentions after it has been defined.
For long documents, reintroduce the full term if readers might lose context.
Form plurals of acronyms withs, not an apostrophe, such asGPUs.
In headings, common acronyms can remain abbreviated. Spell out the term in the first or second sentence of the body.
Common terms such asCPU,GPU,PC,API, andUIusually do not need to be spelled out for developer audiences.
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.md
**/*.{md,rst,html}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)
Link the first mention of a product name when the destination helps the reader.
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.md
**/*.md
📄 CodeRabbit inference engine (.agents/skills/contribute-integration/SKILL.md)
Documentation must be updated if activation or usage changed
**/*.md: Use title case consistently in technical documentation headings
Avoid quotation marks, ampersands, and exclamation marks in headings
Keep product, event, research, and whitepaper names in their official title case
Use title case for table headers
Do not force social-media sentence case into technical docs
Format code elements, commands, parameters, package names, and expressions in monospace
Format directories, file names, and paths in monospace using backticks
Use angle brackets inside monospace for variables inside paths, such as/home/<username>/.login
Format error messages and strings in quotation marks, keeping literal code strings in code formatting when clearer
Format UI buttons, menus, fields, and labels in bold
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use, sparingly and only when introducing the term
Use italics for publication titles
Format keyboard shortcuts in plain text, such as Press Ctrl+Alt+Delete
Use owner/repo link text for GitHub repositories, preferring[NVIDIA/NeMo](link)over prose references like 'the GitHub repo'
Introduce every code block with a complete sentence
Do not make a code block complete the grammar of the previous sentence
Do not continue a sentence after a code block
Use syntax highlighting when the format supports it for code blocks
Avoid the word 'snippet' unless the surrounding docs already use it as a term of art
Keep inline method, function, and class references consistent with nearby docs, omitting empty parentheses for prose readability when no call is shown
Use descriptive anchor text that matches the destination title when possible for links
Avoid raw URLs in running text
Avoid generic anchor text such as 'here,' 'this page,' and 'read more'
Include acronyms in link text when a linked term includes an acronym
Do not link long sentences or multiple sentences
Avoid links ...
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.md
**/{docs,examples,**/*.md,*.patch,*.diff,.github,*.sh,*.yaml,*.yml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update documentation, examples, CI configuration, and patch artifacts when performing rename operations
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.md
**/*.{md,rst,txt}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
Spell
NVIDIAin all caps. Do not useNvidia,nvidia, orNV.
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.md
**/*.{md,rst}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
**/*.{md,rst}: Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text. Avoid raw URLs and weak anchors such as "here" or "read more."
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative steps. Keep steps parallel and split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce.
Preferrefer tooverseewhen the wording points readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical docs.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values.
Use numerals for 10 or greater and include commas in thousands.
Do not add trademark symbols to learning-oriented docs unless the source, platform, or legal guidance explicitly requires them.
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.md
{docs/**,README.md,CONTRIBUTING.md,**/*.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Run docs link validation with
just docs-linkcheckwhen links change
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
{docs/**,README.md,**/Cargo.toml,**/package.json,**/*.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Ensure renamed public surfaces are reflected consistently in manifests and docs for large or public-facing changes
Files:
crates/cli/README.mdREADME.mdcrates/cli/Cargo.tomlexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
**/*.{html,md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Include SPDX license header in HTML and Markdown files using HTML comment syntax
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.mdskills/nemo-relay-build-plugin/SKILL.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
**/README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update relevant crate or package README when that surface changed
Files:
crates/cli/README.mdREADME.mdexamples/rust-native-plugin/README.md
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Use
snake_casenaming convention for Rust identifiers (e.g.,nemo_relay_tool_call)
**/*.rs: Any Rust change must runjust test-rust
Any Rust change must runcargo fmt --all
Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allfor all FFI work since it is Rust work
Runjust test-rustto validate FFI changes
Runcargo clippy --workspace --all-targets -- -D warningsto enforce strict linting on FFI workWhen Rust files changed as part of Go work, also run
cargo fmt --all,just test-rust, andcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allwhen Rust files are changed as part of Node work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files are changed as part of Node work
Runjust test-rustwhen Rust files are changed as part of Node work
**/*.rs: Runcargo fmt --allto format all Rust code
Runcargo clippy --workspace --all-targets -- -D warningsto enforce all clippy lints as errors
**/*.rs: Runcargo fmt --allwhen Rust files changed as part of WebAssembly work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files changed as part of WebAssembly work
**/*.rs: If any Rust code changed, always runjust test-rust
If any Rust code changed, also runcargo fmt --all
If any Rust code changed, also runcargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting withcargo fmt --all
Run Rust linting withcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Usecargo fmtfor Rust code formatting
Runcargo clippy -- -D warningsto 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 withuv run pre-commit run --all-filesto enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...
Files:
crates/cli/src/config.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.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/src/config.rsexamples/rust-native-plugin/config.schema.jsoncrates/cli/src/plugins/config_io.rs
**/{Cargo.toml,**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain consistency between Rust package names in
Cargo.tomland their actual usage across the codebase
Files:
crates/cli/src/config.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/Cargo.tomlcrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.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/src/config.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.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 prefixednemo_relay_, Go usesPascalCasefor public APIs, Node.js usescamelCase.
Files:
crates/cli/src/config.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.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.
UseJson = serde_json::Valuein Rust-facing runtime APIs for JSON payload handling.
Files:
crates/cli/src/config.rscrates/cli/tests/coverage/launcher_tests.rscrates/cli/tests/coverage/pricing_tests.rscrates/cli/src/pricing.rscrates/core/src/plugin/dynamic/manifest.rscrates/cli/src/plugins/lifecycle.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/editor_model.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/cli/src/plugins/config_io.rscrates/cli/src/plugins.rs
{README.md,docs/getting-started/**/*.md}
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Update
README.md,docs/getting-started/, or binding-level READMEs if behavior differs by language or usage changed
Files:
README.md
{docs/**,README.md,CONTRIBUTING.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
{docs/**,README.md,CONTRIBUTING.md}: For docs-only changes, run targeted checks only if commands, package names, or examples changed. Usejust docsfor docs-site builds andjust docs-linkcheckwhen links changed
Run docs site build withjust docs
Files:
README.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
{docs/**,README.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Verify README and docs entry points still match current package names and paths for large or public-facing changes
Files:
README.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
{docs/**,examples/**,README.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Verify examples still run with documented commands for large or public-facing changes
Files:
README.mdexamples/rust-native-plugin/config.schema.jsonexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/relay-plugin.tomldocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update
README.mdto reflect current workspace members and top-level documentation when workspace structure changes
Files:
README.md
{README.md,docs/**/*.{md,rst,txt},fern/**/*}
📄 CodeRabbit inference engine (.agents/skills/prepare-code-freeze/SKILL.md)
Search and update documentation source for references to the old version in
README.md,docs, andferndirectories, updating current-version install commands, package examples, and configuration examples to<next-version>
Files:
README.md
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}
⚙️ CodeRabbit configuration file
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.
Flag stale examples, missing SPDX headers where required, and instructions that no longer match CI or pre-commit behavior.
Files:
README.mddocs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
{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.rscrates/cli/tests/coverage/pricing_tests.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/tests/coverage/plugins_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.rscrates/cli/tests/coverage/pricing_tests.rscrates/cli/tests/coverage/plugins_lifecycle_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/tests/coverage/plugins_tests.rs
**/Cargo.toml
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update WebAssembly crate names and generated package names during coordinated rename operations
Confirm or infer the target release version from
upstream/main:Cargo.toml. Derive the release branch asrelease/<major>.<minor>.
**/Cargo.toml: MaintainCargo.toml[workspace.package].versionas the source of truth for the Rust workspace and Python build versioning
KeepCargo.toml[workspace.dependencies]self-references aligned with the workspace version when the workspace version changes
After updating workspace package entries, runcargo check --workspaceto refreshCargo.lock
Files:
crates/cli/Cargo.toml
**/SKILL.md
📄 CodeRabbit inference engine (AGENTS.md)
SKILL.md files are skill entrypoints and do not need SPDX headers, but they must always start with YAML frontmatter containing at least
nameanddescription.
Files:
skills/nemo-relay-build-plugin/SKILL.md
⚙️ CodeRabbit configuration file
**/SKILL.md: Do not flag SKILL.md files for missing SPDX headers. Skill entrypoints intentionally start with YAML frontmatter instead.
Verify that every SKILL.md keeps valid YAML frontmatter with at least name and description fields before the Markdown body.
Files:
skills/nemo-relay-build-plugin/SKILL.md
**/*.mdx
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
In MDX files, top-of-file comments must use JSX comment delimiters: {/* to open and */} to close. Do not use HTML comments for MDX SPDX headers.
MDX top-of-file SPDX comments must use {/* ... */} delimiters instead of HTML comment delimiters (Must-Fix)
Files:
docs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update embedded documentation snippets, patch docs, and binding-support notes if examples or supported bindings changed
Files:
docs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
docs/**
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run
just docsor./scripts/build-docs.sh htmlto regenerate ignored Fern API reference pages before validation for documentation site changes
Files:
docs/build-plugins/basic-guide.mdxdocs/build-plugins/plugin-configuration-files.mdx
{crates/core,crates/adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Changes to
crates/coreorcrates/adaptivemust run the full language matrix
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.rs
crates/core/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)
If the change touched
crates/coreor shared runtime semantics, also usevalidate-changefor broader validation
crates/core/**/*.rs: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.rs
crates/{core,adaptive}/**
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.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/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.rs
🪛 LanguageTool
docs/build-plugins/plugin-configuration-files.mdx
[style] ~201-~201: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ptionsupplies field help. -defaultsupplies the reset value. -required` identifie...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (14)
README.md (1)
74-77: LGTM!Also applies to: 89-89
about.toml (1)
14-14: LGTM!deny.toml (1)
25-25: LGTM!skills/nemo-relay-build-plugin/SKILL.md (1)
75-79: LGTM!Also applies to: 147-148
examples/rust-native-plugin/relay-plugin.toml (1)
20-21: 🎯 Functional CorrectnessDrop this comment: there is no duplicate
[config_schema]table. The TOML inexamples/rust-native-plugin/relay-plugin.tomlparses as-is, so the file is not invalid.> Likely an incorrect or invalid review comment.crates/cli/README.md (1)
114-117: LGTM!docs/build-plugins/basic-guide.mdx (1)
47-47: LGTM!Also applies to: 137-142
docs/build-plugins/plugin-configuration-files.mdx (1)
106-108: LGTM!Also applies to: 148-149, 158-215
examples/rust-native-plugin/README.md (1)
57-60: 🎯 Functional Correctness | ⚡ Quick winVerify
--useris a supported flag.The surrounding docs only show the implicit user target plus
--project/--global, so this sentence may mislead users ifplugins editdoes not actually accept--user.examples/rust-native-plugin/config.schema.json (1)
1-39: LGTM!crates/core/src/plugin/dynamic/manifest.rs (1)
335-375: 📐 Maintainability & Code QualityPlease attach the full validation matrix for this
crates/corecontract change.This changes shared manifest semantics, so the repo guidance calls for broader validation than a local Rust-only pass. As per path instructions, "If the change touched
crates/coreor shared runtime semantics, also usevalidate-changefor broader validation" and "Ifcrates/coreorcrates/adaptivechanged, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly." As per coding guidelines, "Run tests for every language affected by a change."Sources: Coding guidelines, Path instructions
crates/cli/src/plugins/config_io.rs (1)
29-180: LGTM!Also applies to: 204-251, 293-310, 456-690
crates/cli/src/pricing.rs (1)
20-20: LGTM!Also applies to: 38-44, 61-74, 83-92
crates/cli/tests/coverage/pricing_tests.rs (1)
118-171: LGTM!
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/cli/src/plugins/schema.rs (1)
105-114: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winBound schema reads to regular, reasonably-sized files.
config_schema.pathcan resolve to any local path, andfs::read_to_stringeagerly reads it. A manifest pointing at a device, FIFO, or huge file can hang/OOMplugins add/validatebefore JSON parsing. Open the file, verify it is regular, and cap bytes read.Proposed fix
+use std::io::Read; + +const MAX_CONFIG_SCHEMA_BYTES: u64 = 4 * 1024 * 1024; + - let contents = fs::read_to_string(&path).map_err(|error| { - schema_error(&plugin_id, &path, format!("failed to read schema: {error}")) - })?; - let source: Value = serde_json::from_str(&contents).map_err(|error| { + let mut file = fs::File::open(&path).map_err(|error| { + schema_error(&plugin_id, &path, format!("failed to open schema: {error}")) + })?; + let metadata = file.metadata().map_err(|error| { + schema_error(&plugin_id, &path, format!("failed to stat schema: {error}")) + })?; + if !metadata.file_type().is_file() { + return Err(schema_error(&plugin_id, &path, "schema path must be a regular file")); + } + + let mut contents = Vec::new(); + file.take(MAX_CONFIG_SCHEMA_BYTES + 1) + .read_to_end(&mut contents) + .map_err(|error| { + schema_error(&plugin_id, &path, format!("failed to read schema: {error}")) + })?; + if contents.len() as u64 > MAX_CONFIG_SCHEMA_BYTES { + return Err(schema_error( + &plugin_id, + &path, + format!("schema exceeds {MAX_CONFIG_SCHEMA_BYTES} bytes"), + )); + } + + let source: Value = serde_json::from_slice(&contents).map_err(|error| { schema_error( &plugin_id, &path,🤖 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/src/plugins/schema.rs` around lines 105 - 114, The schema loading in the plugin schema reader currently uses fs::read_to_string on config_schema.path, which can block or exhaust memory on non-regular or very large local paths. Update the schema loading path in the schema.rs flow that builds the Value source to open the file first, verify it is a regular file, and enforce a reasonable size limit before reading. Keep the existing schema_error handling around the read/parse steps, but make the bounded file check part of the same schema-loading logic.
🤖 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/plugins/dynamic_editor.rs`:
- Around line 575-578: The secret-restoration flow is losing the original field
path because `field_value_for_raw_edit` restores only the edited fragment
instead of the full config context. Update the restore logic in `dynamic_editor`
so the value passed through `Schema::restore_edit_secrets` is still associated
with the original field path, including nested paths like `/records/*/password`.
Apply the same fix in both restore sites around the `restore_edit_secrets` calls
so unchanged secrets are restored at their original location rather than as
moved values.
---
Outside diff comments:
In `@crates/cli/src/plugins/schema.rs`:
- Around line 105-114: The schema loading in the plugin schema reader currently
uses fs::read_to_string on config_schema.path, which can block or exhaust memory
on non-regular or very large local paths. Update the schema loading path in the
schema.rs flow that builds the Value source to open the file first, verify it is
a regular file, and enforce a reasonable size limit before reading. Keep the
existing schema_error handling around the read/parse steps, but make the bounded
file check part of the same schema-loading logic.
🪄 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: c3913c22-de80-41fa-a95d-5902f387e9ac
📒 Files selected for processing (6)
crates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.rsdocs/build-plugins/plugin-configuration-files.mdx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (25)
{docs/**,README.md,CONTRIBUTING.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
{docs/**,README.md,CONTRIBUTING.md}: For docs-only changes, run targeted checks only if commands, package names, or examples changed. Usejust docsfor docs-site builds andjust docs-linkcheckwhen links changed
Run docs site build withjust docs
Files:
docs/build-plugins/plugin-configuration-files.mdx
{docs/**,README.md,CONTRIBUTING.md,**/*.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Run docs link validation with
just docs-linkcheckwhen links change
Files:
docs/build-plugins/plugin-configuration-files.mdx
{docs/**,README.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Verify README and docs entry points still match current package names and paths for large or public-facing changes
Files:
docs/build-plugins/plugin-configuration-files.mdx
{docs/**,examples/**,README.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Verify examples still run with documented commands for large or public-facing changes
Files:
docs/build-plugins/plugin-configuration-files.mdx
{docs/**,README.md,**/Cargo.toml,**/package.json,**/*.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Ensure renamed public surfaces are reflected consistently in manifests and docs for large or public-facing changes
Files:
docs/build-plugins/plugin-configuration-files.mdx
**/*.{md,mdx,py,sh,yaml,yml,toml,json}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Keep package names, repo references, and build commands current
Files:
docs/build-plugins/plugin-configuration-files.mdx
**/*.mdx
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
In MDX files, top-of-file comments must use JSX comment delimiters: {/* to open and */} to close. Do not use HTML comments for MDX SPDX headers.
MDX top-of-file SPDX comments must use {/* ... */} delimiters instead of HTML comment delimiters (Must-Fix)
Files:
docs/build-plugins/plugin-configuration-files.mdx
**/*.{html,md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Include SPDX license header in HTML and Markdown files using HTML comment syntax
Files:
docs/build-plugins/plugin-configuration-files.mdx
docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update embedded documentation snippets, patch docs, and binding-support notes if examples or supported bindings changed
Files:
docs/build-plugins/plugin-configuration-files.mdx
docs/**
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Run
just docsor./scripts/build-docs.sh htmlto regenerate ignored Fern API reference pages before validation for documentation site changes
Files:
docs/build-plugins/plugin-configuration-files.mdx
**
⚙️ 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:
- Scope stacks decide where work belongs and which scope-local behavior is visible.
- Middleware registries decide what guardrails and intercepts run around managed calls.
- Plugins install reusable runtime behavior from configuration.
- Events record runtime behavior in ATOF form.
- 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:
docs/build-plugins/plugin-configuration-files.mdxcrates/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rs
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}
⚙️ CodeRabbit configuration file
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.
Flag stale examples, missing SPDX headers where required, and instructions that no longer match CI or pre-commit behavior.
Files:
docs/build-plugins/plugin-configuration-files.mdx
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Use
snake_casenaming convention for Rust identifiers (e.g.,nemo_relay_tool_call)
**/*.rs: Any Rust change must runjust test-rust
Any Rust change must runcargo fmt --all
Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allfor all FFI work since it is Rust work
Runjust test-rustto validate FFI changes
Runcargo clippy --workspace --all-targets -- -D warningsto enforce strict linting on FFI workWhen Rust files changed as part of Go work, also run
cargo fmt --all,just test-rust, andcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allwhen Rust files are changed as part of Node work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files are changed as part of Node work
Runjust test-rustwhen Rust files are changed as part of Node work
**/*.rs: Runcargo fmt --allto format all Rust code
Runcargo clippy --workspace --all-targets -- -D warningsto enforce all clippy lints as errors
**/*.rs: Runcargo fmt --allwhen Rust files changed as part of WebAssembly work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files changed as part of WebAssembly work
**/*.rs: If any Rust code changed, always runjust test-rust
If any Rust code changed, also runcargo fmt --all
If any Rust code changed, also runcargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting withcargo fmt --all
Run Rust linting withcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Usecargo fmtfor Rust code formatting
Runcargo clippy -- -D warningsto 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 withuv run pre-commit run --all-filesto enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rs
**/{Cargo.toml,**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain consistency between Rust package names in
Cargo.tomland their actual usage across the codebase
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.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/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rs
{crates/core,crates/adaptive}/**/*
📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Changes to
crates/coreorcrates/adaptivemust run the full language matrix
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_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/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.rs
crates/core/**/*.rs
📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)
If the change touched
crates/coreor shared runtime semantics, also usevalidate-changefor broader validation
crates/core/**/*.rs: UseJson = serde_json::Valuein Rust-facing runtime APIs where the existing code expects JSON payloads.
UseResult<T>withFlowErrorin core runtime paths. Keep errors explicit and binding-appropriate at the wrapper layer.
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_tests.rs
crates/{core,adaptive}/**
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
If
crates/coreorcrates/adaptivechanged, run the full matrix across Rust, Python, Go, Node.js, and WebAssembly
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_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/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.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 prefixednemo_relay_, Go usesPascalCasefor public APIs, Node.js usescamelCase.
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.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.
UseJson = serde_json::Valuein Rust-facing runtime APIs for JSON payload handling.
Files:
crates/core/src/plugin/dynamic/manifest.rscrates/cli/tests/coverage/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rscrates/cli/src/plugins/dynamic_editor.rscrates/cli/src/plugins/schema.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/dynamic/manifest.rscrates/core/tests/unit/plugin_dynamic_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/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_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/plugins_tests.rscrates/core/tests/unit/plugin_dynamic_tests.rs
🔇 Additional comments (8)
docs/build-plugins/plugin-configuration-files.mdx (1)
106-108: LGTM!Also applies to: 148-149, 158-216
crates/core/src/plugin/dynamic/manifest.rs (2)
335-335: 📐 Maintainability & Code QualityConfirm required Rust/core validation before merge.
This cohort changes
crates/core, so please attach results forcargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings,just test-rust, and the affected binding matrix/validate-changerun. As per coding guidelines, “Any Rust change must runjust test-rust”, “cargo fmt --all”, and “cargo clippy --workspace --all-targets -- -D warnings.” As per path instructions, “Changes tocrates/coreorcrates/adaptive` must run the full language matrix.”Sources: Coding guidelines, Path instructions
40-40: LGTM!Also applies to: 108-108, 349-375, 521-534
crates/core/tests/unit/plugin_dynamic_tests.rs (1)
743-763: LGTM!crates/cli/src/plugins/schema.rs (1)
24-30: LGTM!Also applies to: 116-153, 155-267, 270-310, 312-438, 845-950, 992-1033, 1210-1226, 1440-1480
crates/cli/src/plugins/dynamic_editor.rs (2)
205-208: LGTM!Also applies to: 714-717
205-208: 📐 Maintainability & Code QualityConfirm required Rust validation before merge.
Please confirm
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings, andjust test-rustwere run for this Rust change. As per coding guidelines,**/*.rs: “Any Rust change must runjust test-rust”, “Any Rust change must runcargo fmt --all”, and “Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings”.Also applies to: 575-578, 597-601, 714-717
Source: Coding guidelines
crates/cli/tests/coverage/plugins_tests.rs (1)
1498-1502: LGTM!Also applies to: 1540-1542, 1561-1565
Signed-off-by: Will Killian <wkillian@nvidia.com>
There was a problem hiding this comment.
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/plugins_lifecycle_tests.rs`:
- Around line 404-413: The tracked native plugin example tests are only writing
the rendered relay-plugin.toml, but the referenced example template now also
expects config.schema.json to exist alongside it. Update the test setup in the
plugin lifecycle test helper to copy or write the declared schema file into the
same temp directory before invoking plugins add, using the existing manifest
rendering flow around the relay-plugin.toml creation so schema loading succeeds
and the tests reach the intended lifecycle path.
🪄 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: 2959cfa3-f084-427a-9a15-e880ca2a99f6
📒 Files selected for processing (3)
crates/cli/tests/coverage/plugins_lifecycle_tests.rsexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/relay-plugin.toml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (24)
**/*.{rs,toml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Rust crate names and module prefixes during coordinated rename operations
Files:
examples/rust-native-plugin/relay-plugin.tomlcrates/cli/tests/coverage/plugins_lifecycle_tests.rs
**/*.{py,txt,toml,cfg,yaml,yml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update Python package names and top-level module imports during coordinated rename operations
Files:
examples/rust-native-plugin/relay-plugin.toml
{docs/**,examples/**,README.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Verify examples still run with documented commands for large or public-facing changes
Files:
examples/rust-native-plugin/relay-plugin.tomlexamples/rust-native-plugin/README.md
**/*.{md,mdx,py,sh,yaml,yml,toml,json}
📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Keep package names, repo references, and build commands current
Files:
examples/rust-native-plugin/relay-plugin.tomlexamples/rust-native-plugin/README.md
**/*.toml
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Include SPDX license header in TOML configuration files using hash comment syntax
Files:
examples/rust-native-plugin/relay-plugin.toml
**/*.{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:
examples/rust-native-plugin/relay-plugin.tomlexamples/rust-native-plugin/README.mdcrates/cli/tests/coverage/plugins_lifecycle_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:
- Scope stacks decide where work belongs and which scope-local behavior is visible.
- Middleware registries decide what guardrails and intercepts run around managed calls.
- Plugins install reusable runtime behavior from configuration.
- Events record runtime behavior in ATOF form.
- 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:
examples/rust-native-plugin/relay-plugin.tomlexamples/rust-native-plugin/README.mdcrates/cli/tests/coverage/plugins_lifecycle_tests.rs
**/*.{md,rst,html,txt}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)
**/*.{md,rst,html,txt}: Always spellNVIDIAin all caps. Do not useNvidia,nvidia,nVidia,nVIDIA, orNV.
Usean NVIDIAbefore a noun because the name starts with an 'en' sound.
Do not add a registered trademark symbol afterNVIDIAwhen referring to the company.
Use trademark symbols with product names only when the document type or legal guidance requires them.
Verify official capitalization, spacing, and hyphenation for product names.
Precede NVIDIA product names withNVIDIAon first mention when it is natural and accurate.
Do not rewrite product names for grammar or title-case rules.
Preserve third-party product names according to the owner's spelling.
Include the company name and full model qualifier on first use when it helps identify the model.
Preserve the official capitalization and punctuation of model names.
Use shorter family names only after the full name is established.
Spell out a term on first use and put the acronym in parentheses unless the acronym is widely understood by the intended audience.
Use the acronym on later mentions after it has been defined.
For long documents, reintroduce the full term if readers might lose context.
Form plurals of acronyms withs, not an apostrophe, such asGPUs.
In headings, common acronyms can remain abbreviated. Spell out the term in the first or second sentence of the body.
Common terms such asCPU,GPU,PC,API, andUIusually do not need to be spelled out for developer audiences.
Files:
examples/rust-native-plugin/README.md
**/*.{md,rst,html}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)
Link the first mention of a product name when the destination helps the reader.
Files:
examples/rust-native-plugin/README.md
**/*.md
📄 CodeRabbit inference engine (.agents/skills/contribute-integration/SKILL.md)
Documentation must be updated if activation or usage changed
**/*.md: Use title case consistently in technical documentation headings
Avoid quotation marks, ampersands, and exclamation marks in headings
Keep product, event, research, and whitepaper names in their official title case
Use title case for table headers
Do not force social-media sentence case into technical docs
Format code elements, commands, parameters, package names, and expressions in monospace
Format directories, file names, and paths in monospace using backticks
Use angle brackets inside monospace for variables inside paths, such as/home/<username>/.login
Format error messages and strings in quotation marks, keeping literal code strings in code formatting when clearer
Format UI buttons, menus, fields, and labels in bold
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use, sparingly and only when introducing the term
Use italics for publication titles
Format keyboard shortcuts in plain text, such as Press Ctrl+Alt+Delete
Use owner/repo link text for GitHub repositories, preferring[NVIDIA/NeMo](link)over prose references like 'the GitHub repo'
Introduce every code block with a complete sentence
Do not make a code block complete the grammar of the previous sentence
Do not continue a sentence after a code block
Use syntax highlighting when the format supports it for code blocks
Avoid the word 'snippet' unless the surrounding docs already use it as a term of art
Keep inline method, function, and class references consistent with nearby docs, omitting empty parentheses for prose readability when no call is shown
Use descriptive anchor text that matches the destination title when possible for links
Avoid raw URLs in running text
Avoid generic anchor text such as 'here,' 'this page,' and 'read more'
Include acronyms in link text when a linked term includes an acronym
Do not link long sentences or multiple sentences
Avoid links ...
Files:
examples/rust-native-plugin/README.md
**/{docs,examples,**/*.md,*.patch,*.diff,.github,*.sh,*.yaml,*.yml}
📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Update documentation, examples, CI configuration, and patch artifacts when performing rename operations
Files:
examples/rust-native-plugin/README.md
**/*.{md,rst,txt}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
Spell
NVIDIAin all caps. Do not useNvidia,nvidia, orNV.
Files:
examples/rust-native-plugin/README.md
**/*.{md,rst}
📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)
**/*.{md,rst}: Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text. Avoid raw URLs and weak anchors such as "here" or "read more."
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative steps. Keep steps parallel and split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English.
Usecanfor possibility and reservemayfor permission.
Useafterfor temporal relationships instead ofonce.
Preferrefer tooverseewhen the wording points readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical docs.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values.
Use numerals for 10 or greater and include commas in thousands.
Do not add trademark symbols to learning-oriented docs unless the source, platform, or legal guidance explicitly requires them.
Files:
examples/rust-native-plugin/README.md
{docs/**,README.md,CONTRIBUTING.md,**/*.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Run docs link validation with
just docs-linkcheckwhen links change
Files:
examples/rust-native-plugin/README.md
{docs/**,README.md,**/Cargo.toml,**/package.json,**/*.md}
📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Ensure renamed public surfaces are reflected consistently in manifests and docs for large or public-facing changes
Files:
examples/rust-native-plugin/README.md
**/*.{html,md,mdx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Include SPDX license header in HTML and Markdown files using HTML comment syntax
Files:
examples/rust-native-plugin/README.md
**/README.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update relevant crate or package README when that surface changed
Files:
examples/rust-native-plugin/README.md
**/*.rs
📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Use
snake_casenaming convention for Rust identifiers (e.g.,nemo_relay_tool_call)
**/*.rs: Any Rust change must runjust test-rust
Any Rust change must runcargo fmt --all
Any Rust change must runcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allfor all FFI work since it is Rust work
Runjust test-rustto validate FFI changes
Runcargo clippy --workspace --all-targets -- -D warningsto enforce strict linting on FFI workWhen Rust files changed as part of Go work, also run
cargo fmt --all,just test-rust, andcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Runcargo fmt --allwhen Rust files are changed as part of Node work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files are changed as part of Node work
Runjust test-rustwhen Rust files are changed as part of Node work
**/*.rs: Runcargo fmt --allto format all Rust code
Runcargo clippy --workspace --all-targets -- -D warningsto enforce all clippy lints as errors
**/*.rs: Runcargo fmt --allwhen Rust files changed as part of WebAssembly work
Runcargo clippy --workspace --all-targets -- -D warningswhen Rust files changed as part of WebAssembly work
**/*.rs: If any Rust code changed, always runjust test-rust
If any Rust code changed, also runcargo fmt --all
If any Rust code changed, also runcargo clippy --workspace --all-targets -- -D warnings
Run Rust formatting withcargo fmt --all
Run Rust linting withcargo clippy --workspace --all-targets -- -D warnings
**/*.rs: Usecargo fmtfor Rust code formatting
Runcargo clippy -- -D warningsto 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 withuv run pre-commit run --all-filesto enforce cargo fmt formatting check, cargo clippy lints, and cargo deny aud...
Files:
crates/cli/tests/coverage/plugins_lifecycle_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/plugins_lifecycle_tests.rs
**/{Cargo.toml,**/*.rs}
📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Maintain consistency between Rust package names in
Cargo.tomland their actual usage across the codebase
Files:
crates/cli/tests/coverage/plugins_lifecycle_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/plugins_lifecycle_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 prefixednemo_relay_, Go usesPascalCasefor public APIs, Node.js usescamelCase.
Files:
crates/cli/tests/coverage/plugins_lifecycle_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.
UseJson = serde_json::Valuein Rust-facing runtime APIs for JSON payload handling.
Files:
crates/cli/tests/coverage/plugins_lifecycle_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/plugins_lifecycle_tests.rs
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
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/plugins_lifecycle_tests.rs`:
- Around line 404-413: The tracked native plugin example tests are only writing
the rendered relay-plugin.toml, but the referenced example template now also
expects config.schema.json to exist alongside it. Update the test setup in the
plugin lifecycle test helper to copy or write the declared schema file into the
same temp directory before invoking plugins add, using the existing manifest
rendering flow around the relay-plugin.toml creation so schema loading succeeds
and the tests reach the intended lifecycle path.
🪄 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: 2959cfa3-f084-427a-9a15-e880ca2a99f6
📒 Files selected for processing (3)
crates/cli/tests/coverage/plugins_lifecycle_tests.rsexamples/rust-native-plugin/README.mdexamples/rust-native-plugin/relay-plugin.toml
🛑 Comments failed to post (1)
crates/cli/tests/coverage/plugins_lifecycle_tests.rs (1)
404-413: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Copy the declared schema alongside the rendered example manifest.
Line 405 now reuses
examples/rust-native-plugin/relay-plugin.toml, but Lines 412-413 only writerelay-plugin.toml. That template now declares[config_schema] path = "config.schema.json", andplugins addloads the schema before the trust/integrity checks these tests are meant to exercise. As written, bothtracked_native_plugin_example_*tests fail on schema loading instead of the intended lifecycle path.Proposed fix
fn materialize_native_example_manifest(dir: &Path) -> (PathBuf, PathBuf) { @@ let template = std::fs::read_to_string( repository_root.join("examples/rust-native-plugin/relay-plugin.toml"), ) .unwrap(); + let config_schema = std::fs::read( + repository_root.join("examples/rust-native-plugin/config.schema.json"), + ) + .unwrap(); let manifest = template .replace("<platform-library-file>", &artifact_name) .replace("<artifact-sha256>", &digest); let manifest_path = dir.join("relay-plugin.toml"); std::fs::write(&manifest_path, manifest).unwrap(); + std::fs::write(dir.join("config.schema.json"), config_schema).unwrap(); (manifest_path, artifact_path) }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.let repository_root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); let template = std::fs::read_to_string( repository_root.join("examples/rust-native-plugin/relay-plugin.toml"), ) .unwrap(); let config_schema = std::fs::read( repository_root.join("examples/rust-native-plugin/config.schema.json"), ) .unwrap(); let manifest = template .replace("<platform-library-file>", &artifact_name) .replace("<artifact-sha256>", &digest); let manifest_path = dir.join("relay-plugin.toml"); std::fs::write(&manifest_path, manifest).unwrap(); std::fs::write(dir.join("config.schema.json"), config_schema).unwrap();🤖 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/plugins_lifecycle_tests.rs` around lines 404 - 413, The tracked native plugin example tests are only writing the rendered relay-plugin.toml, but the referenced example template now also expects config.schema.json to exist alongside it. Update the test setup in the plugin lifecycle test helper to copy or write the declared schema file into the same temp directory before invoking plugins add, using the existing manifest rendering flow around the relay-plugin.toml creation so schema loading succeeds and the tests reach the intended lifecycle path.
Overview
Add a static, manifest-declared JSON Schema boundary so dynamic plugins can be configured through
nemo-relay plugins editwithout loading native code or starting workers. The editor now presents one top-level row per built-in or dynamic plugin and remains usable in small terminals.Details
[config_schema]section and enforce its bidirectional relationship with theconfig_schemacapability.writeOnlystrings as secrets by masking menus and previews, using hidden input, and preserving existing values unless explicitly replaced or cleared.plugins editinto built-in and dynamic plugin submenus with per-field and whole-plugin reset behavior, plus terminal-height-aware scrolling, truncation, and Page Up/Down and Home/End navigation.config_schemacapability and section must now be declared together.Validation performed:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningsjust test-rustjust test-python(382 passed)just test-gojust test-node(243 passed)just test-wasm(Rust checks and 80 JavaScript tests passed)just docsjust docs-linkcheckcargo deny checkty, which traversed a local untracked generatedpython/plugin/tree that is not part of this branch; the same type check excluding that directory exited successfully with two pre-existing warnings.Where should the reviewer start?
Start with
crates/cli/src/plugins/schema.rsfor the schema boundary and control mapping, thencrates/cli/src/plugins/dynamic_editor.rsfor editing and secret semantics, andcrates/cli/src/plugins/config_io.rsfor lossless TOML patching.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
New Features
config_schemacapability; CLI operations load and enforce it.Bug Fixes
plugins.tomlcontent when updating plugin configuration (including pricing).Documentation
config.schema.json.