mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-28 16:36:45 +00:00
fix(#713): add missing action fields to acp and config json responses; acp->status, config bare->list, config section->show
This commit is contained in:
@@ -7591,3 +7591,5 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
|
||||
711. **`version`, `system-prompt`, `export`, and `init` `--output-format json` responses all lacked an `action` field — returned `null` or omitted entirely** — dogfooded 2026-05-26 on `42c17bc4`. All four commands emitted `kind` + `status` but no `action`, making them inconsistent with all other JSON surfaces that include the verb. Fix: added `action:"show"` to `version` and `system-prompt`, `action:"export"` to all three `export` paths, `action:"init"` to `init`; added contract-test assertions for each. Source: Jobdori dogfood on `42c17bc4`, 2026-05-26.
|
||||
|
||||
712. **`doctor`, `status`, `bootstrap-plan`, and `dump-manifests` `--output-format json` responses missing `action` field — consistent with batch of missing-action fixes in #710/#711** — dogfooded 2026-05-26 on `bae0099c`. `doctor` returned no `action`; `status` and `bootstrap-plan` same. `dump-manifests` had empty string. Fix: added `action:"doctor"` to doctor JSON, `action:"show"` to status and bootstrap-plan, `action:"dump"` to dump-manifests happy path. Source: Jobdori dogfood on `bae0099c`, 2026-05-26.
|
||||
|
||||
713. **`acp` and `config` (bare and section-show) `--output-format json` responses missing `action` field — continues sweep from #710–#712** — dogfooded 2026-05-26 on `fdde5e45`. `acp` had no action; `config` bare had no action; `config <section>` and the unknown-section error path both had no action. Fix: added `action:"status"` to acp, `action:"list"` to config bare, `action:"show"` to config section-show and unknown-section error path. Source: Jobdori dogfood on `fdde5e45`, 2026-05-26.
|
||||
|
||||
@@ -7308,6 +7308,7 @@ fn acp_status_json() -> serde_json::Value {
|
||||
json!({
|
||||
"schema_version": "1.0",
|
||||
"kind": "acp",
|
||||
"action": "status",
|
||||
"status": "unsupported",
|
||||
"phase": "discoverability_only",
|
||||
"supported": false,
|
||||
@@ -7472,6 +7473,7 @@ fn render_config_json(
|
||||
|
||||
let base = serde_json::json!({
|
||||
"kind": "config",
|
||||
"action": if section.is_some() { "show" } else { "list" },
|
||||
"status": "ok",
|
||||
"cwd": cwd.display().to_string(),
|
||||
"loaded_files": loaded_paths.len(),
|
||||
@@ -7491,6 +7493,7 @@ fn render_config_json(
|
||||
other => {
|
||||
return Ok(serde_json::json!({
|
||||
"kind": "config",
|
||||
"action": "show",
|
||||
"status": "error",
|
||||
"error_kind": "unsupported_config_section",
|
||||
"section": other,
|
||||
|
||||
Reference in New Issue
Block a user