feat: `tool report-event` for the Claude Code plugin's lineage report
Issue for this PR
Closes #1717
Type of change
- New feature
What does this PR do?
What changes for users: the Claude Code plugin can count how its offline lineage report gets used: the summary shown, Open report pressed, /lineage-report run, and the report built, failed, or found no browser. This goes through altimate-code's usage telemetry, under its usual opt-out.
altimate-code tool report-event <action> --session claude:<id>sends onelineage_reportevent: the action, the Claude Code session id and a timestamp. Nothing else.- Any other action, or a session that isn't
claude:<id>, exits 1 and sends nothing. So a path or a name can't ride along. - The event is added to the telemetry union and to the telemetry reference page.
Claims C1–C4 and residuals R1–R2 for review are in the review-log comment.
How did you verify your code works?
- New tests for each of the six actions, refused actions, and refused sessions, including a path and an overlong id.
- The command from source, with telemetry off: a valid call exits 0; a bad action and a bad session each exit 1 with the reason.
test/altimate/tool-cliand every telemetry test file, after mergingmain: 803 pass. The repo typecheck and Marker Guard pass. Linux only.
Cost side effects
None. One small usage event per action; no model calls, warehouse queries or cloud resources.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
- I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"
🤖 Generated with Claude Code
https://claude.ai/code/session_01VEmKQwEiHMwQ7BdwgPo9sb
Summary by cubic
Adds a tool report-event command so the Claude Code plugin can record how its offline lineage report is used, through the existing altimate-code telemetry and its usual opt-out. The report page itself makes no network requests.
altimate-code tool report-event <action> --session claude:<id> sends one lineage_report event with the action, session id, and timestamp. Only the six defined actions and a claude: session id are accepted; anything else exits 1 and sends nothing. The event is added to the telemetry union and documented on the telemetry reference page.
New Features
- Supports the actions
summary_shown,open_pressed,command_run,built,build_failed, andno_browser. - Rejects paths, names, or non-
claude:sessions, so no extra data can ride along. - Lists the command in
altimate-code tool --help. - Requires no changes to existing commands or events.
Summary by CodeRabbit
- New Features
- Added telemetry reporting for Claude Code lineage-report interactions, including summaries shown, reports opened or built, build failures, command runs, and unavailable browsers.
- Added a CLI command to submit supported report events with a valid Claude Code session ID.
- Documentation
- Documented the event details, the exclusion of report content and identifying names, and that the report page makes no network requests.