Allow rules sqz init adds to Claude Code settings so the two parts the
ungrouped rewrite adds never need approval of their own. Neither runs
anything: one sets a shell option, the other reads stdin.
Every canonical tool name sqz knows about, in the same order
generate_hook_configs emits them. Used by the CLI to list valid
options in --only/--skip error messages, and by tests that
need to enumerate the supported set.
Path of the repo-level CI hook file, read by both local Copilot CLI
sessions in this repo and Copilot cloud agent jobs (the sandbox loads
only .github/hooks/*.json from the clone).
Whether sqz’s Claude Code hooks, as sqz init installs them, compress a
Bash command’s output in a default-mode session: the PreToolUse rewrite
takes it, or it exits 0 and the PostToolUse hook does. Followers and
background jobs never finish with output to replace.
Decide whether a Claude Code PostToolUse payload is worth compressing:
a Bash call the PreToolUse hook didn’t already pipe through sqz, with
text output that Claude Code hasn’t truncated. Claude Code only runs
PostToolUse after a command exits 0; a failure goes to
PostToolUseFailure, which can’t replace output.
Whether a Claude Code settings file has sqz’s PreToolUse hook but not
the allow rules or PostToolUse hook sqz init now writes, as an
install from an older sqz does. Without the rules the hook leaves
every command alone outside bypass mode.
Install the Copilot CLI hook file. Returns Ok(None) when Copilot CLI
is not installed (no ~/.copilot directory), Ok(Some(changed))
otherwise. Refreshes the file in place when the content is stale.
Like install_tool_hooks but lets the caller choose between
project-local and user-global scope. This is the function sqz init
and sqz init --global both call.
Remove sqz’s entries from a project’s .claude/settings.local.json,
keeping whatever else is in it, such as the permissions Claude Code
saves there when you pick “don’t ask again”. Same results as
remove_claude_global_hook.