Skip to content

MCP key embedding#115

Draft
ViaDézo1er / cedric (viadezo1er) wants to merge 43 commits intomainfrom
cedric-better-dx-pr4
Draft

MCP key embedding#115
ViaDézo1er / cedric (viadezo1er) wants to merge 43 commits intomainfrom
cedric-better-dx-pr4

Conversation

@viadezo1er
Copy link
Copy Markdown
Contributor

@viadezo1er ViaDézo1er / cedric (viadezo1er) commented Apr 15, 2026

Many of the commits are due to rebasing.

PR4 of #94

Rename/restructure CLI flags to improve UX without changing core behaviour:

BaseArgs:
- Remove --quiet/-q (BRAINTRUST_QUIET) and --no-input; quiet output is
  now the global default (set_quiet(true) in configure_output).
- Add verbose: bool as #[arg(skip)] — subcommands set it at runtime;
  set up output messages are shown only when verbose is active.

SetupArgs:
- --no-mcp-skill → --no-skills + --no-mcp (orthogonal opt-outs)
- Add --no-instrument (opt-out; instrument is the new default)
- Add --tui / --background (replace --interactive / --quiet in wizard)
- Add --language (repeatable), --interactive/-i, --verbose/-v at top level

AgentsSetupArgs:
- --agent (repeatable Vec) → --agent (single Option); drop AgentArg::All
- --yes removed from CLI (#[arg(skip)]); programmatic callers still set yes:true
- Add --no-workflow (conflicts with --workflow)

AgentsMcpSetupArgs:
- Same agents→agent and yes→skip treatment

InstrumentSetupArgs:
- --quiet → --background (run agent non-interactively, show spinner)
- --interactive → --tui (run agent in interactive TUI mode)
- --yes → #[arg(skip)]
- Add skip_launch: bool (#[arg(skip)]) for future wizard use

resolve_selected_agents: signature changes from &[AgentArg] to
Option<AgentArg>; None auto-detects all installed agents as before.

All call sites, struct literals in tests, and BaseArgs literals in
auth/switch/traces/functions updated to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- `bt setup instrument --interactive` now accepted as alias for --tui
- `bt setup instrument --quiet` now accepted as alias for --background
- `bt setup --no-mcp-skill` now accepted as hidden alias for --no-skills --no-mcp
- Explicit error when --json and --tui are both passed
move CLI coverage to integration tests
auth.rs:
- Remove login_interactive (method-chooser) and login_interactive_api_key
- Make login_interactive_oauth pub(crate) so setup can call it directly
- Auth output tweaks: Warning→Info in maybe_warn_api_key_override, drop the
  else branch (no-profile case doesn't need a warning when an API key is used)
- Add blank lines around the OAuth authorization URL for readability
- Add org description hint before the org selection prompt
- Add .report(false) to the OAuth callback manual-paste input
- Add set_quiet(false) in run() so bt auth output is never silenced by the
  global quiet default (unless --json is active)
- Add pub(crate) ensure_auth: credential recovery flow that falls back to
  OAuth when a stored profile's credentials are inaccessible
- Add pub(crate) is_missing_credential_error helper used by ensure_auth

setup/mod.rs:
- Replace local ensure_auth with auth::ensure_auth
- Remove local LoginContext import (no longer needed)
- Add maybe_create_api_key_for_oauth: after an OAuth login, auto-create a
  permanent API key, expose it via BRAINTRUST_API_KEY, and print it once
  (the key is never retrievable again from the API)
- Call maybe_create_api_key_for_oauth in run_setup_wizard after auth step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bt does not need an api key but the agent executing the code with instrumentation needs it
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

Latest downloadable build artifacts for this PR commit fbb6fb4164fe:

Available artifact names
  • ``artifacts-build-global
  • ``artifacts-build-local-x86_64-apple-darwin
  • ``artifacts-build-local-x86_64-pc-windows-msvc
  • ``artifacts-build-local-aarch64-apple-darwin
  • ``artifacts-build-local-x86_64-unknown-linux-musl
  • ``artifacts-build-local-x86_64-unknown-linux-gnu
  • ``artifacts-build-local-aarch64-unknown-linux-musl
  • ``artifacts-build-local-aarch64-unknown-linux-gnu
  • ``artifacts-plan-dist-manifest
  • ``cargo-dist-cache

@viadezo1er ViaDézo1er / cedric (viadezo1er) changed the title Cedric better dx pr4 MCP key embedding Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant