ArchAstro. V1. WorkItems
(archastro v0.2.0)
Copy Markdown
WorkItem API resource.
Summary
Functions
Fail workflow work and route its durable execution
Extend a workflow work item lease
List active workflow work available to the viewer
Mark claimed workflow work as running
Submit workflow work output and wake its durable execution
Functions
@spec fail( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PostApiV1WorkItemsWorkItemFail.Input.t() ) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Fail workflow work and route its durable execution
Atomically records command failure, marks the work item failed, and either wakes the workflow at the node's error edge or fails the owning run when no error edge exists. Retrying the same lease and error is idempotent; a different terminal payload conflicts.
No content
@spec heartbeat( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PostApiV1WorkItemsWorkItemHeartbeat.Input.t() ) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Extend a workflow work item lease
No content
@spec list( ArchAstro.Client.t(), ArchAstro.Types.Operations.GetApiV1WorkItems.Params.t() ) :: {:ok, ArchAstro.Types.WorkflowWorkItemList.t()} | {:error, ArchAstro.Error.reason()}
List active workflow work available to the viewer
Lists queued, claimed, and running external work yielded by durable workflows. The top-level collection includes work for every agent the viewer can execute; the agent-nested collection limits results to that agent. This discovery response never includes lease tokens. Use the agent claim endpoint to acquire new work or resume a saved lease.
Successful response
@spec start( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PostApiV1WorkItemsWorkItemStart.Input.t() ) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Mark claimed workflow work as running
No content
@spec submit( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.PostApiV1WorkItemsWorkItemSubmit.Input.t() ) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Submit workflow work output and wake its durable execution
Atomically records the command completion, marks the work item succeeded, advances the journal sequence, and enqueues the owning workflow continuation. Retrying the same lease and result is idempotent; a different result conflicts.
No content