Get Workspace worker
get_workspace_workerCheck a Plori workspace worker's run, save, and change status by workspace and worker request ID to see if files were saved and changes accepted.
Instructions
Get one worker's status: whether it has started (run_id), how its run ended (run_status), whether its files are saved (save_state ready with saved_revision_id) and whether its changes were submitted and accepted (changeset_id, change_status; Plori submits the saved files of a normally completed run itself). A completed run alone does not mean the files are saved or in the Workspace; check save_state and change_status. get_run_result with run_id and workspace_id reads the worker's reply and its approval requests. No run starts and nothing changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | The Workspace UUID. | |
| worker_request_id | Yes | The worker_request_id that create_workspace_worker returned. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cause | No | Machine-readable cause of a run that did not finish normally. | |
| run_id | No | The worker's run, present once it has started. get_run_result reads its reply, steer_workspace_worker sends it a message while it runs, and cancel_run stops it. | |
| status | Yes | Where the worker is: received, ready or blocked while it waits to start (queue_reason says why it is blocked), starting, running, or terminal when its run has ended (run_status says how). | |
| activity | No | The worker's expiring activity hint; absent when expired or unavailable. The saved changeset is authoritative. | |
| agent_id | Yes | The agent that runs the worker. get_run_result and cancel_run take it with run_id. | |
| run_status | No | The run's status: running, awaiting_input (paused on an approval or question; get_run_result lists them), completed, error or cancelled. | |
| save_state | Yes | Whether the worker's files are saved: none (no run has ended), pending (saving), ready (saved as saved_revision_id), failed (see save_failure) or unconfirmed (the save could not be confirmed). | |
| session_id | Yes | The worker's own conversation id. It is private to the worker; send_workspace_message cannot select it. | |
| stop_reason | No | The stop reason of an ended run, when one was recorded. | |
| changeset_id | No | The changeset submitted for this worker's files, if any. | |
| queue_reason | No | Why a waiting worker has not started, such as a capacity or balance limit. | |
| save_failure | No | Why the save failed, when save_state is failed. | |
| workspace_id | Yes | The Workspace UUID. | |
| base_revision | Yes | The saved revision the worker's copy started from. | |
| change_status | Yes | unsubmitted until the worker's files are submitted (by Plori when the run completes normally with changed files, or by submit_workspace_changeset), then the changeset's state. | |
| task_group_id | Yes | The task group of the worker. get_workspace_costs and stop_workspace_task_group take it. | |
| working_copy_id | Yes | The copy of the Workspace files that this worker edits. The Workspace's current files do not change until its changes are accepted. | |
| saved_revision_id | No | The saved revision that holds the worker's files once save_state is ready. read_workspace_file reads files from it. | |
| worker_request_id | Yes | The worker's id; get_workspace_worker takes it. | |
| saved_operation_id | No | The save that produced saved_revision_id. |