orchestrator_transition_task
Transition A2A tasks through the official 8-state v1.0.1 FSM with atomic expected_version compare-and-swap locking to reject invalid terminal-state changes and prevent TOCTOU resurrection bugs.
Instructions
Enforce the official 8-state A2A v1.0.1 Task Finite State Machine (TASK_STATE_SUBMITTED, TASK_STATE_WORKING, TASK_STATE_INPUT_REQUIRED, TASK_STATE_AUTH_REQUIRED, TASK_STATE_COMPLETED, TASK_STATE_FAILED, TASK_STATE_CANCELED, TASK_STATE_REJECTED) using atomic optimistic expected_version Compare-And-Swap (CAS) locking — deterministically rejecting transitions out of terminal states to eliminate TOCTOU resurrection bugs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tenant_id": "<tenant_id>",
"task_id": "<task_id>",
"target_state": "<target_state>",
"expected_version": "<expected_version>"
},
"name": "orchestrator_transition_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | Agent or worker identity recording this transition. | orchestrator |
| reason | No | Audit log reason or A2A status update text (DLP-scrubbed). | |
| task_id | Yes | Target A2A `Task.id`. | |
| tenant_id | Yes | Tenant namespace owning the task (`SPEC_CLASS_13`). | |
| target_state | Yes | Next A2A `v1.0.1` `TaskState` enum value. | |
| expected_version | Yes | Current optimistic lock `version` required for Compare-And-Swap (`CAS`) success. |