Anthropic::BetaEnvironmentWork
Self-hosted environment work queue (beta).
These endpoints are called automatically by the pre-built environment worker for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.
Constructors
new(client : Client)
SourceInstance methods
ack(work_id : String, environment_id : String, betas : Array(String) = [] of String) : BetaSelfHostedWork
Acknowledge receipt of a work item, transitioning it from queued
to starting and removing it from the queue
heartbeat(work_id : String, environment_id : String, desired_ttl_seconds : Int32 | Nil = nil, expected_last_heartbeat : String | Nil = nil, betas : Array(String) = [] of String) : BetaSelfHostedWorkHeartbeatResponse
Record a heartbeat for a work item to maintain the lease
list(environment_id : String, limit : Int32 = 20, page : String | Nil = nil, betas : Array(String) = [] of String) : BetaSelfHostedWorkListResponse
List work items in an environment
poll(environment_id : String, block_ms : Int32 | Nil = nil, reclaim_older_than_ms : Int32 | Nil = nil, betas : Array(String) = [] of String, anthropic_worker_id : String | Nil = nil) : BetaSelfHostedWork | Nil
Long poll for work items in the queue. Returns nil when no work
arrives before the poll window closes.
retrieve(work_id : String, environment_id : String, betas : Array(String) = [] of String, workspace_id : String | Nil = nil) : BetaSelfHostedWork
Retrieve detailed information about a specific work item
stats(environment_id : String, betas : Array(String) = [] of String, workspace_id : String | Nil = nil) : BetaSelfHostedWorkQueueStats
Get statistics about the work queue for an environment