Approval requests and decisions
Record an explicit human decision and resume only the intended pending operation.
Represent a pending decision
ApprovalGate creates and resolves records for a run and step. Context is a bounded JSON snapshot describing what is being reviewed; do not persist credentials or raw provider payloads.
import {
InMemoryApprovalGate,
type ApprovalGate,
} from "@smoothie-framework/runtime/governance";A policy requiring a human decision must have an approval path. Without one, do not silently treat the Tool as automatically approved. The in-memory gate is suitable for local tests, not restart-safe production decisions.
Authorize the reviewer before resolving
The application authenticates the reviewer, checks resource permissions and binds the decision to the exact pending token/run/action. Resolution records approve or reject; expiry is a distinct state. Do not accept an approver identity supplied by arbitrary browser input.
Persist approval state alongside the run's recovery requirements. Reusing a stale decision for changed arguments or bindings is not renewed consent. Resume through the supported run/control path; a saved approval does not by itself replay an effect.
See Tool effect recovery for uncertain dispatch and Agent recovery for run ownership.