Repository navigation
[AI-2935] Report the harness list as JSON - #999
Conversation
A tool setting kcap up has to ask which coding agents to record, and the option list it should offer is the one this machine produces. `kcap harness list --json` emits that report as one document on stdout and nothing else, the contract `kcap import --discover --json` set. Every known harness is listed, present or not, so a consumer can tell unsupported from not-installed without carrying its own vendor list. The two detection signals stay apart rather than being ORed, as they are in the first-run machine report: a caller naming the signal it saw needs both. `--json` is refused on `dismiss` and `reset` rather than ignored.
PR Summary by QodoAdd machine-readable JSON output to harness list
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1. Four primary types share one file
|
…arness-list-json # Conflicts: # docs/CHANGES.md
|
NO FINDINGS. Reviewed the harness-list JSON shape, detection/wiring states, dismissal handling, and the added coverage by inspection. I did not build or run tests. |
realtonyyoung
left a comment
There was a problem hiding this comment.
Approved after code review; no actionable findings. Builds and tests were not run.
TUnit compares collections without regard to order unless told otherwise, so the assertion has to ask for matching order to fail on a renderer that sorts its rows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The payload records and their serializer context stay together: they are one wire shape and only make sense read side by side. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
NO FINDINGS on the updated head. I reviewed the four follow-up commits (ordering assertion, help text, renderer file split, and comment wording); they introduce no new actionable issue. I did not build or run tests. |
realtonyyoung
left a comment
There was a problem hiding this comment.
Approved the updated head after reviewing the follow-up commits. No actionable findings; no build or tests run.
What
kcap harness list --jsonemits the detected / wired / dismissed report as one JSON document on stdout and nothing else — the contractkcap import --discover --jsonalready sets. The human table is untouched.{"harnesses":[{"vendor":"claude","label":"Claude Code","binary_on_path":true, "config_found":false,"wired":false,"dismissed":false}]}Why
First step of AI-2935. A tool setting kcap up for someone has to ask which coding agents to record, and the only honest option list is the one this machine produces. That list already exists — it drives the new-harness nudges — but only as a formatted table, so anything reading it is parsing display text.
Shape, and why
binary_on_pathandconfig_found— rather than being ORed the wayHarnessInventoryfolds them. Same reasoning asFirstRunHarnessReport: a caller offering someone a choice can say which signal it saw, and one that only wants "is it here" ORs them itself.vendoris the stable key, the iddismissandresettake.labelis display text.--jsonis refused ondismissandresetrather than ignored, mirroring theimport --discoverguard — ignoring it would hand a caller expecting JSON a line of prose on a subcommand that writes.Testing
Five unit tests on the renderer, in the style of
ServiceStatusJsonTests: registry order and completeness, snake_case keys, the two signals staying apart, an absent harness, and a dismissal read back from the ledger. Ran the real command in the dev container for both the list and the refusal.