feat: add instrument.ts harness bridge#26
Merged
Cedric / ViaDézo1er (viadezo1er) merged 45 commits intoMay 18, 2026
Merged
Conversation
LOGO_PATTERN only matched ▀▄ (half-blocks from PNG rendering) but not █ (full-blocks from the fallback logo). In environments where the PNG fails to load, all three logo-presence assertions would fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
631014f to
362e114
Compare
2d58db1 to
c91eb23
Compare
362e114 to
e944e5f
Compare
release undici connection when rate-limited
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Luca Forstner (lforst)
requested changes
May 12, 2026
Comment on lines
+9
to
+25
| const HARNESS_PACKAGE_BIN = | ||
| "@braintrust/bt-wizard-harness/bin/bt-wizard-harness.mjs"; | ||
|
|
||
| function resolveHarnessPath(): | ||
| | { readonly ok: true; readonly path: string } | ||
| | { readonly ok: false; readonly reason: string } { | ||
| try { | ||
| const require = createRequire(import.meta.url); | ||
| return { ok: true, path: require.resolve(HARNESS_PACKAGE_BIN) }; | ||
| } catch (err) { | ||
| return { | ||
| ok: false, | ||
| reason: err instanceof Error ? err.message : String(err), | ||
| }; | ||
| } | ||
| } | ||
|
|
e944e5f to
9505984
Compare
c91eb23 to
8c28ff9
Compare
8c28ff9 to
75a11f8
Compare
33024f9 to
602893c
Compare
75a11f8 to
2fc0466
Compare
602893c to
a17984f
Compare
2fc0466 to
1899c3c
Compare
Replace the single password prompt for provider API keys with collectCredentials(), which loops over provider.credentials for multi-field providers (Bedrock, Vertex, Azure) and falls back to a single secret prompt for single-key providers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All wizard source, tests, and build configs move from the repo root into packages/braintrust-wizard so nothing lives half at root / half in packages. Root package.json becomes a lean workspace root that delegates scripts via --filter and -r. The bt-wizard-harness scaffold gains ESLint, TypeScript, and Prettier configs plus the corresponding devDependencies and scripts.
parseArgs is async but was called without await, making parsed a Promise and causing parsed.options to be undefined at runtime. Awaiting it fixes the crash. The manual --help branch and helpText export are removed since yargs' built-in .help() already handles --help by printing and exiting during parseAsync.
Drop bin/files/typings from bt-wizard-harness (no source files yet), fix typebox → @sinclair/typebox, and resolve two exactOptionalPropertyTypes errors in clack-wizard.ts and providers.test.ts so pnpm -r run typings passes.
All wizard source, tests, and build configs move from the repo root into packages/braintrust-wizard so nothing lives half at root / half in packages. Root package.json becomes a lean workspace root that delegates scripts via --filter and -r. The bt-wizard-harness scaffold gains ESLint, TypeScript, and Prettier configs plus the corresponding devDependencies and scripts.
737e73e to
31052d3
Compare
outdated comment
Replace the providerEnvVar/providerApiKey pair with providerCredentials?: Record<string, string>, spread directly into the child process env. Supports multi-credential providers (Bedrock, Vertex, Azure) alongside existing single-key providers.
e95def8 to
d332b37
Compare
Collaborator
Author
|
Rebased against |
Declare a bin entry in @braintrust/bt-wizard-harness and resolve it from the wizard via import.meta.resolve + fileURLToPath. Drops the createRequire shim and the harness-not-found result branch — if resolution fails, that's a broken install, so let it throw at module load.
212dae0 to
21edc1c
Compare
Collaborator
Author
|
Fixed formatting. |
Luca Forstner (lforst)
approved these changes
May 18, 2026
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.
Adds
src/instrument.ts: the bridge between the wizard and the harness.ensureBtOnPath— installsbtviacurl -fsSL https://bt.dev/cli/install.sh | bashon macOS/Linux if it's not already onPATHwritePromptToTemp— writes the rendered prompt to a temp file and returns the pathbuildHarnessCommand— constructs the copy-paste command to resume the agent sessionrunInstrumentation— resolves the harness binary, spawns it withBRAINTRUST_API_KEYin the env, and returns the trace permalink and resume command when done