/** * v1.2.9 §E — translate the workspace dev-capability master toggle into the * Claude Code spawn permission flags Chief's `claude --print` session runs * with. This is what actually lets (or stops) agents from writing files and * running git in the headless bot, and fixes the v1.2.6-era hang where an * unapproved Write/Bash blocked forever waiting for a TTY prompt. * * dev ON → `acceptEdits` + a broad allow-list (Read/Edit/Write/Bash/Task/…) * so file edits + git add/commit/checkout/branch + npm run without a * prompt, with push/merge/close + destructive commands denied. * dev OFF → no permission mode, but Bash/Edit/Write DENIED (deny removes the * tool, so the agent can't trigger a prompt → no hang). Chief is told * to suggest `/grant` when a task needs write access. * * NOTE: `git push` / `gh pr merge` / `gh pr close` stay denied even when dev is * ON — those "external-effect" commands are gated by the per-command approval * (v1.3.0 dev-confirm gate), not by the coarse dev toggle. */ /** dev ON: tools auto-approved (no prompt) in the headless spawn. */ export declare const DEV_ON_ALLOWED_TOOLS: readonly string[]; /** * Always denied when dev is ON — destructive commands with no approval path. * Deny beats allow, so these win over `Bash` in the allow-list. * * Specifier syntax (`Bash(:*)`) follows Claude Code's tool-rule form; * verify against the live CLI during manual QA — the exact matcher is not * fully documented. */ export declare const DEV_ON_DESTRUCTIVE_DISALLOWED_TOOLS: readonly string[]; /** * External-effect commands (push / PR-merge / PR-close). These are gated by the * v1.3.0 dev-confirm approval hook, NOT a static deny — a static deny would * block even an *approved* push (the hook's exit-0 "allow" cannot override an * explicit `--disallowed-tools` deny rule). They are added to the deny list * ONLY as a fail-closed fallback when the approve-hook settings file could not * be written (no hook ⇒ block outright, matching pre-v1.3.0 behavior). */ export declare const DEV_ON_EXTERNAL_EFFECT_DISALLOWED_TOOLS: readonly string[]; /** * @deprecated v1.3.0 — kept for back-compat with callers/tests that referenced * the combined list. New code uses the split constants above: destructive are * always denied; external-effect are denied only when the hook isn't wired. */ export declare const DEV_ON_DISALLOWED_TOOLS: readonly string[]; /** dev OFF: deny write/exec tools so they can't prompt (→ no hang). */ export declare const DEV_OFF_DISALLOWED_TOOLS: readonly string[]; export interface ChiefSpawnPermissions { /** Whether dev mode (file write + git) is enabled for this workspace. */ devEnabled: boolean; permissionMode?: "acceptEdits"; allowedTools?: string[]; disallowedTools?: string[]; /** * v1.2.9 §E — path to a Claude Code settings file registering the * PreToolUse Bash deny hook (→ `--settings`). The hook blocks `git push` / * `gh pr merge` / `gh pr close` even inside compound commands * (`cd && git push`), which the CLI `--disallowed-tools` rule can't. * Only set in dev-ON mode. Undefined when the settings file can't be written * (falls back to deny-only — single-segment push still blocked). */ settingsPath?: string; } /** * Resolve the spawn permission flags from `workspace.yaml.dev_capability`. * `workspace` omitted ⇒ resolved from the ambient workspace root. */ export declare function resolveChiefSpawnPermissions(workspace?: string): ChiefSpawnPermissions;