Expand description
enter_plan_mode / exit_plan_mode tools — agent-driven read-only planning.
When the agent calls enter_plan_mode, the runtime sets an exploring flag
that blocks any write tools until exit_plan_mode is called. exit_plan_mode
clears the flag, emits a AgentEvent::PlanProposed event (so TUI/HTTP
surfaces can render the review modal), and then blocks until the human
reviewer calls PlanApprovalGate::approve or PlanApprovalGate::reject.
§Concurrency safety
PlanApprovalGate::wait_for_approval reads the response without holding a
lock across any .await point, preventing deadlocks.
Structs§
- Enter
Plan Mode Tool - Tool that switches the agent into read-only planning mode.
- Exit
Plan Mode Tool - Tool that exits plan mode and presents the agent’s plan for human review.
- Plan
Approval Gate - Shared state for the agent-driven plan mode approval flow.
- Plan
Mode Request Gate - Gate for the plan-mode pre-confirmation step.
- Request
Plan Mode Tool - Tool that asks the user for permission before entering plan mode.
Enums§
- Plan
Approval Result - The human reviewer’s decision on an agent-proposed plan.
- Plan
Mode Request Result - Decision result for the pre-confirmation step.