claude_cli: guard denies before the tool runs (hx#182) (#19)
This commit was merged in pull request #19.
This commit is contained in:
1 parent
a76c0ac16f
commit
9ce4756fad
5 files changed
+96
-25
No files matched your search
+4
-1
@@ -294,7 +294,10 @@ pub fn install(run: &str, wt: &Path, allow: &[String], read_roots: &[PathBuf]) -
|
||||
}
|
||||
std::fs::create_dir_all(cfg.parent().unwrap())?;
|
||||
let exe = std::env::current_exe()?.to_string_lossy().into_owned();
|
||||
let ext = toml::to_string(&json!({"extensions": [{
|
||||
// `permissions = "extensions-only"` (hx#182): in claude_cli mode a question is allowed only while a LIVE
|
||||
// `tool_call` extension guards it, so a dead or slow guard denies instead of "continue". hx ignores the value
|
||||
// for the direct provider's `-p` path, where orch's stream check is the second line of defence.
|
||||
let ext = toml::to_string(&json!({"permissions": "extensions-only", "extensions": [{
|
||||
"command": [exe, "guard", pp.to_string_lossy()], "timeout_secs": 10}]}))?;
|
||||
std::fs::write(cfg, format!("{MARK}\n{ext}"))?;
|
||||
Ok(pol)
|
||||
|
||||
Reference in new issue
Block a user