fix(hermes): acknowledge Claude bypass mode
This commit is contained in:
parent
091a73d268
commit
10092a1d12
@ -19,6 +19,7 @@ def configure_claude_state(path: Path) -> None:
|
||||
loaded = {}
|
||||
if isinstance(loaded, dict):
|
||||
value = loaded
|
||||
value["bypassPermissionsModeAccepted"] = True
|
||||
value["resumeReturnDismissed"] = True
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(json.dumps(value, indent=2) + "\n", encoding="utf-8")
|
||||
|
||||
@ -176,10 +176,23 @@ def test_claude_resume_prompt_is_persistently_suppressed(tmp_path: Path):
|
||||
|
||||
value = yaml.safe_load(state.read_text(encoding="utf-8"))
|
||||
assert value["promptQueueUseCount"] == 4
|
||||
assert value["bypassPermissionsModeAccepted"] is True
|
||||
assert value["resumeReturnDismissed"] is True
|
||||
assert state.stat().st_mode & 0o777 == 0o600
|
||||
|
||||
|
||||
def test_claude_unattended_state_is_created_for_a_new_home(tmp_path: Path):
|
||||
state = tmp_path / ".claude" / ".claude.json"
|
||||
|
||||
client_config.configure_claude_state(state)
|
||||
|
||||
value = yaml.safe_load(state.read_text(encoding="utf-8"))
|
||||
assert value == {
|
||||
"bypassPermissionsModeAccepted": True,
|
||||
"resumeReturnDismissed": True,
|
||||
}
|
||||
|
||||
|
||||
def test_agent_config_uses_bounded_noninteractive_approvals():
|
||||
configmap = yaml.safe_load((HERMES / "agent-configmap.yaml").read_text())
|
||||
config = yaml.safe_load(configmap["data"]["config.yaml"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user