Skip to content

Cli install sdk evals#85

Merged
ViaDézo1er / cedric (viadezo1er) merged 11 commits intomainfrom
cedric/cli-install-sdk-evals
Apr 1, 2026
Merged

Cli install sdk evals#85
ViaDézo1er / cedric (viadezo1er) merged 11 commits intomainfrom
cedric/cli-install-sdk-evals

Conversation

@viadezo1er
Copy link
Copy Markdown
Contributor

@viadezo1er ViaDézo1er / cedric (viadezo1er) commented Mar 27, 2026

bt setup instrument: interactive mode, language selection, and scoped permissions

Adds three new flags to bt setup instrument and wires them end-to-end through agent invocation and task generation.

--interactive / -i opens the agent in its interactive TUI (Claude Code, etc.) so the user can review and approve each tool use.
--yolo runs the agent in the background with bypassPermissions — no approval prompts.
--language <LANG> restricts instrumentation to specific languages (python, typescript, go, java, ruby, csharp); repeatable; omit to let the agent auto-detect.

Run-mode prompt (interactive terminal, no flags)

When none of the above flags are passed and the terminal is interactive, the user is asked how to run the agent. Background mode uses acceptEdits with --allowedTools scoped to the package managers for the selected language(s) only (e.g. uv for Python, npm/yarn/pnpm for TypeScript, dotnet for C#). Interactive TUI mode opens the agent's terminal UI.

Language selection prompt

A multi-select prompt is shown between the workflow and run-mode prompts. Selecting "All languages" (the default) lets the agent auto-detect; selecting specific languages also narrows the background tool allowlist.

You'll notice since the mcp can be setup (and is the default option) when using bt setup, adding the mcp resources to this repo can make them redondant. However they are needed in case the mcp isn't setup.

Adds an optional, repeatable `--language` flag to `bt setup instrument`
that lets callers specify the target language(s) directly, bypassing the
agent's language auto-detection step.

Accepted values (case-insensitive):
  python, typescript, javascript, go, csharp, c#, java, ruby

`typescript` and `javascript` are treated as the same language;
duplicate values are deduplicated before being passed to the agent.

When one or more languages are provided the rendered task prompt
includes a "Language Override" section telling the agent to skip Step 2
(auto-detection) and instrument the specified language(s) directly.

Also fixes a pre-existing compile error in tests where
`render_instrument_task` was already called with a `workflows` argument
that the implementation didn't accept, and adds the `{WORKFLOW_CONTEXT}`
placeholder so non-instrument workflows inject `bt` CLI guidance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@viadezo1er
Copy link
Copy Markdown
Contributor Author

ViaDézo1er / cedric (viadezo1er) commented Mar 27, 2026

CI passes after git rebase origin/main cedric/cli-install-sdk-evals

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

Latest downloadable build artifacts for this PR commit 7ea0bdf008b5:

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's give this a try!

Comment on lines +1056 to +1061
1 => Some(LanguageArg::Python),
2 => Some(LanguageArg::TypeScript),
3 => Some(LanguageArg::Go),
4 => Some(LanguageArg::Java),
5 => Some(LanguageArg::Ruby),
6 => Some(LanguageArg::CSharp),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid the magic indices?

If the SDK does not print a URL, construct one manually using the URL format documented in `{SDK_INSTALL_DIR}/braintrust-url-formats.md`:

```
https://www.braintrust.dev/app/{org}/p/{project_name}/logs?r={root_span_id}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL might be different for self hosted.

They should use BRAINTRUST_APP_URL to help construct the URL.

@viadezo1er ViaDézo1er / cedric (viadezo1er) merged commit 688454c into main Apr 1, 2026
34 checks passed
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.

3 participants