claude_cli: tool calls on the event bus, extensions can block, permissions deny/extensions-only (#182)

This commit is contained in:
hermes committed 2026-11-13 19:38:29 +00:00
1 parent 6ebf1c3180
commit 6978aad27a
12 files changed
+297 -12

No files matched your search

+4 -1
View File
@@ -1096,8 +1096,11 @@ async fn main() -> Result<()> {
// claude asks here (via `hx mcp-serve`) before running its tools
let (p, cx) = (hx_core::approve::sock_path(), agent.cx.clone());
let _ = CLAUDE_CX.set(cx.clone());
let bus = agent.bus.clone();
// only -p has no prompt; `permissions = "deny" | "extensions-only"` closes it
let mode = hx_core::approve::Unanswered::from_config(cfg.permissions.as_deref());
tokio::spawn(async move {
let _ = hx_core::approve::serve(&p, cx).await;
let _ = hx_core::approve::serve(&p, cx, bus, mode).await;
});
}
let Some(prompt) = cli.print else {