claudewheel v0.24.2 /claudewheel.defaults
Edit
On this page

Default values for config, segments, options, state, and themes; canonical permission rules and hook wiring are derived from the guardrail model.

#claudewheel.defaults

#claudewheel.defaults

Default values for config, segments, options, state, and themes; canonical permission rules and hook wiring are derived from the guardrail model.

#canonical_hook_command

python
def canonical_hook_command(scripts_dir: Path, script: str) -> str

Return the canonical hook command string for script under scripts_dir.

Single source of truth for how a hook command path is composed. Reused by _build_canonical_hooks (which deploys the wirings) and by health.check_hooks_wired (which verifies them), so verification matches deployment exactly instead of doing a lax substring match.

#_build_canonical_hooks

python
def _build_canonical_hooks(scripts_dir: Path) -> dict[str, Any]

Build the hooks dict from the guardrail model's EXPECTED_HOOK_WIRINGS.

Each wiring is an (event, matcher, script-name) tuple. Wirings are grouped by event, and within each event by matcher, so several scripts sharing an (event, matcher) pair land in one entry's hooks list. The guardrail module is the single source of truth -- adding a wiring there flows through here automatically.

#build_canonical_shared_settings

python
def build_canonical_shared_settings(scripts_dir: Path) -> dict[str, Any]

Build the canonical shared-settings dict from current defaults.

The hooks section is derived from guardrail.EXPECTED_HOOK_WIRINGS. The disallowedTools section comes from DISALLOWED_TOOLS above. The profileDefaults permissions deny/ask arrays are derived from the guardrail model (canonical_deny_rules() / canonical_ask_rules()). The profileDefaults section contains default settings applied to new profiles when no clone source is specified (previously lived in profile-defaults.json).

Search