Skip to content

Graphorin API reference v0.12.1


Graphorin API reference / @graphorin/core / / ToolApproval

Interface: ToolApproval

Defined in: packages/core/src/types/tool.ts:297

Pending approval bookkeeping: a tool that needed human confirmation before execution. Stored on RunState.pendingApprovals until the caller resumes the run with a granted/denied decision.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
argsreadonlyunknown-packages/core/src/types/tool.ts:300
mode?readonly"ask" | "defer"E1: which permission verdict parked this approval. 'ask' wants an interactive human decision now; 'defer' is parked for asynchronous resolution (e.g. a workflow awakeable with a durable-timer auto-deny) - the harness routes the two differently. Absent on approvals raised by a plain needsApproval gate (semantically 'ask').packages/core/src/types/tool.ts:311
reason?readonlystring-packages/core/src/types/tool.ts:301
requestedAtreadonlystring-packages/core/src/types/tool.ts:302
subRunToolCallId?readonlystringW-001: set when this approval belongs to a PARKED sub-agent run. It is the PARENT's toolCallId of the parked handoff / sub-agent call (the RunState.pendingSubRuns key), never a child-local id. Operators echo it back on the matching ApprovalDecision so resume decisions match on the composite (toolCallId, subRunToolCallId) key - child-local toolCallIds of two different children may collide.packages/core/src/types/tool.ts:321
toolCallIdreadonlystring-packages/core/src/types/tool.ts:298
toolNamereadonlystring-packages/core/src/types/tool.ts:299