approve
Resume a workflow awaiting human confirmation after explicit consent, then continue execution or return remaining steps for dispatch.
Instructions
[WRITE] Approve a workflow that is waiting for human confirmation.
Use this only after showing the user the pending step and getting explicit human consent; use cancel_workflow instead when the approval is rejected. Only works when workflow state is 'awaiting_approval'. After approval, execution continues to the next steps.
Without --dispatch, the steps before the gate are 'not_executed': Pilot has no record that they ran, whatever the gate's message says. approve refuses (listing them in not_executed_before_gate) until acknowledge_not_executed=True — set it only after you performed each of those steps yourself and showed the user their results. They are then recorded as 'reported_done' and not handed out again.
Note: with --dispatch, approving runs the next steps (this call takes as long as they do; if it times out in your client, Pilot carries on — check get_workflow_status once it answers again, and never perform those steps yourself). Without it, the remaining steps are recorded as 'not_executed' and the result carries outcome='dispatch_required' with a 'pending_dispatch' list for you to perform (see run_workflow); the workflow then never reaches 'completed'.
Returns: Updated workflow state after resuming.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| approver | No | Name of the person approving (for audit trail). Over an authenticated network transport leave it empty: the approver is the caller's token name, and a different name is refused. | |
| workflow_id | Yes | The workflow ID to approve. | |
| acknowledge_not_executed | No | True says the steps before this gate were performed outside Pilot and their results were checked. |