mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-07-24 16:35:27 +00:00
Adds an opt-in `codeburn sync` command group: setup, push, status,
logout, reset. Developers authenticate via standard OIDC browser login
(Authorization Code + PKCE, provider-agnostic — Cognito, Auth0, Okta,
Keycloak, etc.) and push per-call usage metadata to a team-operated
OTLP/HTTP endpoint.
Privacy is structural: the payload builder has no field that can carry
prompts, responses, file contents, or bash commands. Only metadata
leaves the machine (provider, model, tokens, cost, project, tool names,
timestamps). There is deliberately no flag to include more.
Setup derives everything from a single URL:
GET {base}/.well-known/codeburn-export.json
→ issuer, client_id, traces_path, max_batch_size
Modules:
- discovery.ts discovery doc fetch/validation (version-gated)
- auth.ts OIDC discovery, PKCE, localhost callback (:19876-78),
token exchange/refresh/revoke
- credentials.ts refresh token in OS keychain (macOS security / Linux
libsecret / Windows DPAPI / 0600 file fallback). All
subprocess calls use execFileSync arg arrays; tokens
flow via stdin or env var — never shell-interpolated
- config.ts ~/.config/codeburn/sync.json
- ledger.ts client-side sent-ledger for exact dedup (no watermark
races), 6-month prune
- otlp.ts ParsedApiCall[] → ExportTraceServiceRequest JSON with
deterministic IDs: span=SHA256(dedupKey)[:8],
trace=SHA256(sessionId)[:16] — every retry idempotent
- push.ts orchestration with typed outcomes; pushes run to
completion — 429 Retry-After honored (≤120s/wait,
3 retries/batch) before deferring; partial_success is
batch-atomic (nothing ledgered, whole batch retries);
50K safety valve, no routine cap
- cli.ts command layer; --dry-run reports exact counts/cost
without sending
Preview feature: protocol may change between releases.
AI-Origin: human
72 lines
1.9 KiB
JSON
72 lines
1.9 KiB
JSON
{
|
|
"name": "codeburn",
|
|
"version": "0.9.15",
|
|
"description": "See where your AI spend goes - by task, tool, model, and project",
|
|
"type": "module",
|
|
"main": "./dist/cli.js",
|
|
"bin": {
|
|
"codeburn": "dist/cli.js"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"bundle-litellm": "node scripts/bundle-litellm.mjs",
|
|
"build": "node scripts/bundle-litellm.mjs && tsup && node -e \"const fs=require('fs'); fs.copyFileSync('src/cli.ts','dist/cli.js'); fs.chmodSync('dist/cli.js',0o755)\" && npm run build:dash",
|
|
"build:dash": "cd dash && npm install --no-audit --no-fund --silent && npm run build",
|
|
"dev": "NODE_OPTIONS=--no-deprecation tsx src/cli.ts",
|
|
"test": "vitest",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"claude-code",
|
|
"cursor",
|
|
"codex",
|
|
"kimi",
|
|
"devin",
|
|
"ibm-bob",
|
|
"opencode",
|
|
"pi",
|
|
"codebuff",
|
|
"ai-coding",
|
|
"token-usage",
|
|
"cost-tracking",
|
|
"observability",
|
|
"developer-tools"
|
|
],
|
|
"engines": {
|
|
"node": ">=22.13.0"
|
|
},
|
|
"author": "AgentSeal <hello@agentseal.org>",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/getagentseal/codeburn.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/getagentseal/codeburn/issues"
|
|
},
|
|
"homepage": "https://github.com/getagentseal/codeburn#readme",
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
"bonjour-service": "^1.4.1",
|
|
"chalk": "^5.4.1",
|
|
"commander": "^13.1.0",
|
|
"ink": "^7.0.0",
|
|
"react": "^19.2.5",
|
|
"selfsigned": "^5.5.0",
|
|
"strip-ansi": "^7.2.0",
|
|
"undici": "^7.27.2",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.19.17",
|
|
"@types/react": "^19.2.14",
|
|
"@types/selfsigned": "^2.0.4",
|
|
"playwright": "^1.61.1",
|
|
"tsup": "^8.4.0",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.8.0",
|
|
"vitest": "^3.1.0"
|
|
}
|
|
}
|