@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    • 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.

      Parameters

      • workItem: string

        Claimed or running work item ID.

      • input: { error: Record<string, unknown>; lease_owner: string }

        Request body.

        • error: Record<string, unknown>

          JSON-serializable failure returned by the worker.

        • lease_owner: string

          Saved lease token.

      Returns Promise<void>

      No content

    • Extend a workflow work item lease

      Parameters

      • workItem: string

        Claimed or running work item ID.

      • input: { lease_owner: string; lease_seconds?: number }

        Request body.

        • lease_owner: string

          Saved lease token.

        • Optionallease_seconds?: number

          Replacement lease duration from 15 through 3600 seconds. Defaults to 300.

      Returns Promise<void>

      No content

    • 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.

      Parameters

      • Optionalparams: { afterCursor?: string; execution?: string; limit?: number }

        Query parameters.

        • OptionalafterCursor?: string

          Opaque cursor for the next page of older queued work.

        • Optionalexecution?: string

          Optional durable execution ID filter.

        • Optionallimit?: number

          Maximum work items per page. Defaults to 50; maximum is 100.

      Returns Promise<WorkflowWorkItemList>

      Successful response

    • Mark claimed workflow work as running

      Parameters

      • workItem: string

        Claimed work item ID.

      • input: { lease_owner: string }

        Request body.

        • lease_owner: string

          Saved lease token.

      Returns Promise<void>

      No content

    • 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.

      Parameters

      • workItem: string

        Claimed or running work item ID.

      • input: { lease_owner: string; result: Record<string, unknown> }

        Request body.

        • lease_owner: string

          Saved lease token.

        • result: Record<string, unknown>

          JSON-serializable output returned to the workflow.

      Returns Promise<void>

      No content