Skip to content

feat: add coding-agent sidecar integrations#63

Draft
willkill07 wants to merge 12 commits intoNVIDIA:mainfrom
willkill07:wkk_coding-agent-sidecar-integrations
Draft

feat: add coding-agent sidecar integrations#63
willkill07 wants to merge 12 commits intoNVIDIA:mainfrom
willkill07:wkk_coding-agent-sidecar-integrations

Conversation

@willkill07
Copy link
Copy Markdown
Member

@willkill07 willkill07 commented May 5, 2026

Overview

Adds the Rust nemo-flow-sidecar binary and coding-agent integration surface for observing Claude Code, Codex, Cursor, and Hermes agent activity through hook ingestion, transparent sidecar execution, passthrough LLM gateway routes, ATIF export, and OpenInference export. The branch now covers the sidecar runtime, installer behavior, agent-specific hook bundles/docs, Hermes-specific shell hook support, best-effort LLM/tool correlation, token metrics extraction, and CI/release plumbing for publishing the sidecar crate and binary artifacts.

  • 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

  • Adds the nemo-flow-sidecar workspace crate with CLI entry points for serve, run, install, and hook-forward.
  • Adds hook endpoints and adapters for Claude Code, Codex, Cursor, and Hermes, including Hermes YAML config merge support and runtime NEMO_FLOW_SIDECAR_URL handling for ephemeral sidecar runs.
  • Adds sidecar session management for agent, subagent, tool, LLM, ATIF, and OpenInference lifecycle events, with shared extraction of task/session IDs, parent relationships, tool call IDs, results, and sidecar metadata.
  • Adds passthrough gateway routes for OpenAI Responses, OpenAI Chat Completions, Anthropic Messages, Anthropic token counting, and model listing, plus best-effort correlation between gateway LLM activity and hook-reported tool calls.
  • Updates ATIF export behavior to preserve the unwrapped LLM request payload, extract provider-native usage/token metrics, include cached-token variants, and improve source call correlation.
  • Adds installable Claude Code and Codex hook/plugin bundles plus a Cursor hook bundle under integrations/coding-agents/; Hermes is configured through the sidecar installer rather than a static bundle.
  • Adds end-to-end sidecar documentation, per-agent setup guides, Rust API index notes, install docs, and integration overview links.
  • Wires the sidecar into workspace metadata, release guidance, local dependency publishing helpers, attribution data, Codecov configuration, path filters, GitHub Actions, GitLab CI, and sidecar release-binary artifact publishing.
  • Adds sidecar CLI tests plus coverage for adapters, config, gateway behavior, installer merge/planning, transparent launcher behavior, server responses, session/export behavior, and ATIF exporter changes.
  • Follow-up CI fixes remove the stale sidecar generated-doc toctree entry and make the transparent launcher env/exit-code test use a platform-valid fake agent on Windows.

Validation recorded for this PR:

  • cargo test -p nemo-flow-sidecar
  • PATH="/opt/homebrew/bin:$PATH" /opt/homebrew/bin/just docs
  • cargo fmt --all
  • cargo test -p nemo-flow-sidecar launcher::tests::run_starts_sidecar_injects_env_and_returns_agent_exit_code
  • Previous branch validation included just test-rust, just docs, and cargo clippy -p nemo-flow-sidecar --all-targets -- -D warnings.
  • Commit pre-checks for the follow-up fix passed with lychee skipped because it still fails on unrelated generated Rust API doc links in docs/reference/api/rust/_generated/...; cargo fmt, cargo clippy, and cargo check passed with PyO3 pointed at Python 3.12.
  • Latest PR head is f5f9a385, which includes the follow-up fix commit 23315c09 plus the current main merge; GitHub CI is rerunning for this head.

Where should the reviewer start?

Start with crates/sidecar/src/session.rs for lifecycle normalization and export behavior, then crates/sidecar/src/gateway.rs and crates/sidecar/src/server.rs for the HTTP/gateway surface. For installation and user-facing behavior, review crates/sidecar/src/installer.rs, docs/integrate-frameworks/coding-agent-sidecar.md, and integrations/coding-agents/README.md.

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

  • Closes NMF-57
  • Closes NMF-58
  • Closes NMF-59
  • Closes NMF-60

Signed-off-by: Will Killian <wkillian@nvidia.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 89eb3f12-77ee-45c5-bd5a-c34e8ca171d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@github-actions github-actions Bot added size:XXL PR is very large feat PR introduces new feature or functionality lang:rust PR changes/introduces Rust code labels May 5, 2026
@willkill07 willkill07 self-assigned this May 5, 2026
@willkill07 willkill07 added this to the 0.2.0 milestone May 5, 2026
willkill07 and others added 5 commits May 5, 2026 16:06
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
  - Added Hermes as a first-class sidecar agent:
    --agent hermes, config support, command inference for hermes / hermes-agent, and AgentKind::Hermes.
  - Added a dedicated Hermes hook endpoint:
    /hooks/hermes now routes Hermes shell-hook payloads into the sidecar session manager.
  - Added a Hermes adapter:
    Maps Hermes lifecycle, tool, and subagent shell hooks into normalized NeMo Flow sidecar events.
  - Added Hermes installer support:
    nemo-flow-sidecar install hermes writes/merges .hermes/config.yaml hook config using YAML instead of JSON/TOML.
  - Added dynamic sidecar URL handling for Hermes:
    Hermes installed hooks prefer runtime NEMO_FLOW_SIDECAR_URL, so nemo-flow-sidecar run --agent hermes can use an ephemeral sidecar URL without reinstalling hooks.
  - Preserved Hermes hook consent semantics:
    The runner exports the dynamic sidecar URL but does not auto-enable HERMES_ACCEPT_HOOKS.
  - Improved ATIF LLM request fidelity:
    ATIF user steps now preserve the full unwrapped LLM request payload under extra.llm_request.
  - Improved ATIF token metrics extraction:
    Supports provider-native usage objects in addition to NeMo Flow token_usage, including cached-token variants from OpenAI/Anthropic-style payloads.
  - Expanded shared adapter extraction:
    Adds support for Hermes-friendly payload fields like task_id, parent_session_id, extra.tool_call_id, and extra.result.
  - Added test coverage:
    New/updated tests cover Hermes adapter mapping, config parsing, installer generation/merge behavior, runtime launcher behavior, server hook response shape, and ATIF request/usage export.

Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07 willkill07 force-pushed the wkk_coding-agent-sidecar-integrations branch from 9594050 to 841d583 Compare May 6, 2026 18:53
willkill07 and others added 3 commits May 6, 2026 18:58
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: GSD Agent <bbednarski@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07 willkill07 force-pushed the wkk_coding-agent-sidecar-integrations branch from 173bca9 to 1d896bf Compare May 6, 2026 23:14
willkill07 and others added 3 commits May 6, 2026 19:29
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat PR introduces new feature or functionality lang:rust PR changes/introduces Rust code size:XXL PR is very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants