Modules§
- engine
- gate
- The workflow tool gate: the one decision both call paths apply — the
direct call (
server/call_tool/policy.rs::guard_workflow) and the inner tool ofctx_call(server/dispatch/mod.rs). They pass the active run and the tool name and act on the answer; neither decides anything itself. - store
- types
Structs§
Enums§
- Tool
Gate - What the gate answers for one tool call under an active run.
Constants§
- WORKFLOW_
PASSTHROUGH_ TOOLS - Tools that always pass through the workflow gate regardless of state.
Read-only tools should never be blocked — agents need them for context
recovery after crashes or session transitions. The server passes this
list to
tool_gateon both call paths. - WORKFLOW_
TTL_ SECS - TTL for expired workflow files (24 hours).
Functions§
- allowed_
transitions - can_
transition - cleanup_
expired - Remove workflow files older than
WORKFLOW_TTL_SECS. - clear_
active - clear_
active_ for_ agent - find_
transition - is_
run_ stale - Whether
runhas been inactive for longer than the stale threshold. The one stale rule, for the store and for both tool gates (workflow::gate). The stand-in for a withheld workflow is never stale: it ends when the stored workflow loads again or is stopped explicitly, not by the passing of time. - is_
withheld_ sentinel - Whether
runis the stand-inwithheld_sentinelbuilds. The one test for it: the store, the stale rule and the tool gate all ask here. The marker is the reserved name pair, which no stored workflow can carry —save_active_for_agentrefuses to write a run that has it. - load_
active - load_
active_ for_ agent - missing_
evidence_ for_ state - save_
active - save_
active_ for_ agent - tool_
gate - Decide
toolunderrun.passthroughis the server’s list of tools a real run never blocks. - validate_
spec