feat: telemetry#29
Draft
Cedric / ViaDézo1er (viadezo1er) wants to merge 52 commits into
Draft
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>
929eb4f to
9170c47
Compare
db772ed to
25afb45
Compare
9170c47 to
43ec18e
Compare
25afb45 to
dc8c718
Compare
release undici connection when rate-limited
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43ec18e to
3e6f487
Compare
dc8c718 to
6ca16ee
Compare
3e6f487 to
1b1de79
Compare
6ca16ee to
2065ab5
Compare
1b1de79 to
2779abc
Compare
2065ab5 to
23527ea
Compare
2779abc to
a6039cb
Compare
23527ea to
3e74894
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. Remove unused fuzzySelect import/dep from WizardDeps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
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.
Update credential collection and runInstrumentation to use the new providerCredentials: Record<string, string> shape from the wizard flow and instrument.ts harness. Supports multi-credential providers.
Update credential collection and runInstrumentation to use the new providerCredentials: Record<string, string> shape from the wizard flow and instrument.ts harness. Supports multi-credential providers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update credential collection and runInstrumentation to use the new providerCredentials: Record<string, string> shape from the wizard flow and instrument.ts harness. Supports multi-credential providers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3e74894 to
a030d11
Compare
Closed
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.
For future versions when the backend will accept the telemetry, can't be used in production for now.
Implements anonymous usage telemetry as a detached background process (
crank-telemetry).src/telemetry.ts— spawnscrank-telemetry.mjsat startup (detached, stdio piped); sends JSON-line updates (language, provider, stop-reason) over stdin; handles SIGINTsrc/crank-telemetry.ts— the background process: reads updates from stdin, waits up to 15 minutes, then POSTs the payload tobraintrust.dev/app/cli-telemetrywith a 5s timeout and one retry on failureTelemetry is disabled entirely when
CRANK_ENABLE_TELEMETRY=false(case-insensitive). The endpoint can be overridden viaCRANK_TELEMETRY_URLfor testing.Catch it locally with
node -e "const http=require('http');http.createServer((req,res)=>{let b='';req.on('data',d=>b+=d);req.on('end',()=>{console.log(req.method,req.headers['user-agent']);console.log(b);res.end('ok')})}).listen(3333,()=>console.log('ready'))"