Own trace command runtime in plugin repository - #20
Merged
Conversation
Stephen Belanger (Qard)
force-pushed
the
agent/own-trace-setup-commands
branch
from
August 12, 2026 20:27
3d114a2 to
b6441c5
Compare
Stephen Belanger (Qard)
marked this pull request as ready for review
August 12, 2026 20:42
Stephen Belanger (Qard)
requested review from
Abhijeet Prasad (AbhiPrasad) and
Andrew Kent (realark)
August 12, 2026 20:43
Abhijeet Prasad (AbhiPrasad)
approved these changes
Aug 12, 2026
Abhijeet Prasad (AbhiPrasad)
approved these changes
Aug 12, 2026
Stephen Belanger (Qard)
added a commit
to braintrustdata/bt
that referenced
this pull request
Aug 12, 2026
## Summary - pin the plugin runtime from `braintrust-coding-agent-plugins#20` - mount the exported `bt_daemon::TraceArgs` tree under the top-level `bt trace` namespace - delete `src/agents.rs` and delegate the complete trace command to `bt_daemon::run_trace` - retain only a small host adapter for Braintrust credential leases and destination selection ## Ownership boundary `bt` no longer matches or interprets any coding-agent trace subcommand. It hands the parsed trace command to the plugin runtime with the current executable mount prefix and an implementation of the host-service interface. The plugin repository owns setup, daemon lifecycle, hooks, status, stop, imports, managed runs, output rendering, agent package identities, marketplace behavior, and settings reconciliation. `bt` continues to own its profile store, OAuth/API-key handling, project picker, and top-level Clap mount. This PR depends on `braintrustdata/braintrust-coding-agent-plugins#20` and pins its exact commit. ## Validation - `cargo fmt --all --check` - `cargo check --locked` - `cargo test --locked --test cli trace_` (13 passed) - `cargo test --locked --quiet -- --test-threads=1` (803 passed) - `cargo clippy --locked --all-targets --all-features -- -D warnings -A clippy::collapsible_match` - `git diff --check` Strict Clippy without the targeted allowance remains blocked by 12 existing `collapsible_match` findings in unrelated files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bt traceClap command tree and runtime frombt-daemonOwnership boundary
The plugin repository now owns the entire coding-agent trace namespace after the host mounts it. It derives internal
daemonandhookinvocations from the mount prefix supplied by the host, preserves fail-open hook behavior, initializes the daemon, resolves command-specific routing requirements, and renders shared command results.Embedding CLIs do not interpret trace subcommands. They supply only a version/output context, the mounted command prefix, and host services that resolve Braintrust credentials and destination choices. Credentials remain outside plugin settings, journals, and command arguments.
This fixes repeated setup accepting stale local marketplace installations such as
trace-codex0.2.0, while placing the fix and all other coding-agent command responsibilities in their source-of-truth repository.Validation
cargo fmt --manifest-path bt-daemon/Cargo.toml --all --checkcargo test --manifest-path bt-daemon/Cargo.toml --locked --all-features(97 passed, 4 live-agent tests ignored)cargo clippy --manifest-path bt-daemon/Cargo.toml --locked --all-targets --all-features -- -D warningstrace-claude-code2.0.1git diff --check