Skip to content

Commit d5798c2

Browse files
authored
feat(cli): add nemo-flow plugins edit (NVIDIA#98)
#### Overview Adds a plugin-driven observability configuration flow centered on `plugins.toml`, including an interactive editor for the built-in Observability component and a clean removal of legacy exporter configuration surfaces. - [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license. - [x] I searched existing issues and open pull requests, and this does not duplicate existing work. #### Details - Adds `nemo-flow plugins edit` with user/project/global scope handling, keyboard-driven menus, preview, save, reset, clear, and schema/type-backed editor metadata from core config types. - Moves gateway observability setup to plugin activation from `plugins.toml`, removes legacy exporter flags/config parsing, and updates doctor/setup/session handling accordingly. - Canonicalizes plugin config discovery around `plugins.toml`, including layered system/project/user merge behavior, duplicate component-kind checks, and clearer legacy config errors. - Adds comprehensive docs for plugin configuration file behavior and updates coding-agent observability docs and examples. - Adds Rust and CLI coverage for Observability schema/editor behavior, plugin config path resolution and merge semantics, doctor reporting, and legacy config removal. Validation run locally: - `cargo fmt --check` - `cargo clippy -p nemo-flow-cli -- -D warnings` - `cargo test -p nemo-flow-cli` - `cargo test -p nemo-flow --features schema` - `just docs` - `just test-rust` #### Where should the reviewer start? Start with `crates/cli/src/plugins.rs` for the interactive `plugins.toml` editor, then review `crates/cli/src/config.rs` for plugin file discovery and merge behavior, and `docs/build-plugins/plugin-configuration-files.md` for the documented operator contract. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to: none ## Summary by CodeRabbit * **New Features** * Interactive "plugins edit" terminal editor to manage scoped plugin configs (user/project/global) and observability components; preview and save TOML. * CLI now exposes a top-level plugins subcommand and shows exporter status in run/dry‑run output. * **Documentation** * Docs and guides updated to use plugins.toml, with discovery/merge/validation rules and editor workflow. * **Breaking Changes** * Observability/exporter settings moved to plugins.toml; legacy CLI flags, env vars, headers, and config sections removed/renamed. * **Other** * Optional JSON Schema/editor metadata support for plugin/observability configs (feature-gated). [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/NeMo-Flow/pull/98) Authors: - Will Killian (https://github.com/willkill07) - Ajay Thorve (https://github.com/AjayThorve) Approvers: - Ajay Thorve (https://github.com/AjayThorve) - https://github.com/Salonijain27 URL: NVIDIA#98
1 parent 3c80bcc commit d5798c2

50 files changed

Lines changed: 3604 additions & 1988 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ATTRIBUTIONS-Rust.md

Lines changed: 250 additions & 0 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 56 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ The table below summarizes the support level for each binding surface.
128128
| Python | ✅ Fully Supported | Fully documented with Quick Start and Guides |
129129
| Node.js | ✅ Fully Supported | Fully documented with Quick Start and Guides |
130130
| Rust | ✅ Fully Supported | Fully documented with Quick Start and Guides |
131+
| Coding-Agent CLI | 🚧 Experimental | Install with `cargo install nemo-flow-cli`. |
131132
| Go | 🚧 Experimental | Source-first under `go/nemo_flow`. |
132133
| WebAssembly | 🚧 Experimental | Source-first under `crates/wasm`. |
133134
| FFI | 🚧 Experimental | Source-first under `crates/ffi`. |
@@ -161,6 +162,7 @@ The following table summarizes maintained third-party integrations and whether e
161162
| [LangChain](third_party/README-langchain.md), [LangGraph](third_party/README-langgraph.md), [LangChain NVIDIA](third_party/README-langchain-nvidia.md) | 🚧 Patch | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
162163
| [opencode](third_party/README-opencode.md) | 🚧 Patch | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
163164
| [OpenClaw](integrations/openclaw/README.md) | `nemo-flow-openclaw` package, `nemo-flow` plugin ID | ✅ Yes | ❌ No | ❌ No | ❌ No |
165+
| [Coding-Agent CLI](docs/integrate-frameworks/coding-agent-gateway.md) | `nemo-flow-cli` package for closed harnesses | ✅ Yes | ❌ No | ❌ No | ❌ No |
164166
| [Hermes Agent](third_party/README-hermes-agent.md) | 🚧 Patch | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
165167

166168
Patch-based integrations offer experimental support. Our roadmap includes switching over to first-party plugins and packages where upstream extension points allow it.

crates/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ axum = "0.8"
2323
bytes = "1"
2424
clap = { version = "4", features = ["derive", "env"] }
2525
clap_complete = "4"
26+
console = "0.16"
2627
futures-util = "0.3"
2728
http = "1"
2829
http-body-util = "0.1"

crates/cli/README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SPDX-License-Identifier: Apache-2.0
1212
[![npm wasm](https://img.shields.io/npm/v/nemo-flow-wasm?label=nemo-flow-wasm&color=CC3534&logo=npm)](https://www.npmjs.com/package/nemo-flow-wasm)
1313
[![Crates.io](https://img.shields.io/crates/v/nemo-flow?label=nemo-flow&color=B7410E&logo=rust)](https://crates.io/crates/nemo-flow)
1414
[![Crates.io](https://img.shields.io/crates/v/nemo-flow-adaptive?label=nemo-flow-adaptive&color=B7410E&logo=rust)](https://crates.io/crates/nemo-flow-adaptive)
15+
[![Crates.io](https://img.shields.io/crates/v/nemo-flow-cli?label=nemo-flow-cli&color=B7410E&logo=rust)](https://crates.io/crates/nemo-flow-cli)
1516
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/NVIDIA/NeMo-Flow)
1617

1718
# nemo-flow-cli
@@ -50,10 +51,10 @@ with the installed `nemo-flow` command rather than link against the crate.
5051

5152
## Installation
5253

53-
Install the CLI from a repository checkout:
54+
Install the CLI:
5455

5556
```bash
56-
cargo install --path crates/cli
57+
cargo install nemo-flow-cli
5758
```
5859

5960
That command installs the binary as:
@@ -103,19 +104,30 @@ Project config lives at `./.nemo-flow/config.toml`; user config lives at
103104
The project layer overrides system config, and the user layer overrides the
104105
project layer.
105106

106-
Exporter config uses nested per-backend tables:
107+
Observability exporters are configured through the plugin config. Edit the user
108+
plugin config with:
109+
110+
```bash
111+
nemo-flow plugins edit
112+
```
113+
114+
The canonical plugin file is `plugins.toml`; user config lives at
115+
`~/.config/nemo-flow/plugins.toml` or
116+
`$XDG_CONFIG_HOME/nemo-flow/plugins.toml`. Project config lives at
117+
`.nemo-flow/plugins.toml`.
118+
119+
Minimal ATIF example:
107120

108121
```toml
109-
[exporters.atif]
110-
dir = "./atif"
122+
version = 1
111123

112-
[exporters.atof]
113-
dir = "./atof"
114-
mode = "append"
115-
filename_template = "{session_id}.jsonl"
124+
[[components]]
125+
kind = "observability"
126+
enabled = true
116127

117-
[exporters.openinference]
118-
endpoint = "http://localhost:6006/v1/traces"
128+
[components.config.atif]
129+
enabled = true
130+
output_directory = "./atif"
119131
```
120132

121133
## Documentation

0 commit comments

Comments
 (0)