Skip to main content

Module hooks

Module hooks 

Source

Structs§

BashRiskHooks
Always-on catastrophic-shell guard. Stateless — a unit struct is the entire type.
HooksSet
Ordered set of hook implementations run at every hook point.
PlanModeHandle
A cheap, cloneable on/off switch shared between the PlanModeHooks (read from the run task) and the toggle that flips it (the actor, via Agent::set_plan_mode). Default is off.
PlanModeHooks
Plan-mode enforcement (D3/D4): while the mode is on, block workspace-mutating tools and mutating bash commands. A no-op when the mode is off.
ReadOnlyHooks
Enforced read-only (D1): while installed, refuse the workspace-mutating tools and mutating bash/bg. A guardrail, NOT a sandbox (the same FP/FN budget as plan mode’s bash gate — docs/plan-mode.md §2.4). Stateless: a unit struct.
ToolCall
Loop-local view of ContentBlock::ToolCall.

Constants§

MUTATING_TOOLS
The workspace-mutating tools blocked in plan mode (D3). Read-only tools (read/grep/find/ast_search/session_search) and the plan-recording todo (and the team tools task/peers/message) are deliberately absent.

Traits§

Hooks