feat(cli): add redacted share bundles - #235
Conversation
|
Validation run on macOS arm64 with real local usage data. No project names, prompts, paths, session IDs, or internal product details are included here. Commands run:
Results:
Caveat: the generated bundle can still contain conversation text in |
|
Follow-up patch rebased onto current What changed:
Validation/proof:
No local project names, prompts, paths, session IDs, or usage details are included here. |
c6b2403 to
397a118
Compare
|
Closing this — it's an unsolicited feature PR that's gone stale, and per CONTRIBUTING these should start from an issue with maintainer buy-in. Cleaning up my open-PR queue; happy to revisit via an issue if there's interest. |
Summary
CodeBurn users sometimes need to share enough local telemetry to debug provider parsing, cost attribution, or a suspicious session, but the existing JSON/reporting surfaces are not safe to paste into GitHub issues. Raw reports can include project names, absolute local paths, prompts, shell fragments, emails, and tokens.
This adds
codeburn share, a local-only redacted JSON support bundle. It keeps the useful debugging structure (projects, sessions, turns, models, token usage, tools, activity categories, and costs) while replacing sensitive strings with stable placeholders such as[project:1],[path:1],[email:1], and[secret:1].What changed
codeburn sharewith period, custom date range, provider, project, exclude, output-path, and--include-promptsoptions.src/share.tsfor buildingcodeburn.share.v1bundles from parsed project summaries.userMessage: null; prompt text is only included through explicit--include-promptsopt-in.redaction.promptsmetadata so bundle consumers can distinguishomittedfromredacted.--projectand--exclude.Privacy model
The command does not upload anything and does not add a support service. It writes a local JSON file and tells users to review the output before posting it publicly. Redaction is intentionally best-effort: it covers common leak patterns while preserving enough structure for maintainers to understand parser and cost attribution issues.
Prompt text is omitted by default.
--include-promptsis intended only for cases where maintainers explicitly need prompt text, and even then prompt redaction is best-effort.The tests construct secret-like fixture values at runtime instead of storing literal credentials in the repository, so the redaction cases remain covered without tripping repository secret scanning.
Validation
npx vitest run tests/share.test.ts tests/export.test.ts tests/cli-date.test.ts— 25/25 tests passed.npm run build— passed.git diff --check— passed.redaction.prompts=omitted,non_null_user_messages=0; temporary bundle deleted after the check.