From 36b36267ec7399a7f67f31108fce7424894df9d8 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 25 May 2026 20:33:36 +0900 Subject: [PATCH] fix(#458): add status:ok to config JSON envelope; unknown section now emits status:error + error_kind:unsupported_config_section --- rust/crates/rusty-claude-cli/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 70508534..50d4427f 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -306,6 +306,8 @@ fn classify_error_kind(message: &str) -> &'static str { "plugin_not_found" } else if message.contains("skill source") && message.contains("not found") { "skill_not_found" + } else if message.contains("Unsupported config section") { + "unsupported_config_section" } else { "unknown" } @@ -7418,6 +7420,7 @@ fn render_config_json( let base = serde_json::json!({ "kind": "config", + "status": "ok", "cwd": cwd.display().to_string(), "loaded_files": loaded_paths.len(), "merged_keys": runtime_config.merged().len(), @@ -7436,6 +7439,8 @@ fn render_config_json( other => { return Ok(serde_json::json!({ "kind": "config", + "status": "error", + "error_kind": "unsupported_config_section", "section": other, "ok": false, "error": format!("Unsupported config section '{other}'. Use env, hooks, model, or plugins."),