Backplane.AgentRuntime.Codex.Readiness (backplane_agent_runtime v1.10.53)

Copy Markdown

Host-provided readiness and authorization gate with cancellable waits.

Summary

Functions

await(provider, timeout_ms, cancelled \\ fn -> false end)

@spec await((-> map()), non_neg_integer(), (-> boolean())) ::
  {:ok, map()} | {:error, Backplane.AgentRuntime.Error.t()}

await(provider, timeout_ms, cancelled, options)

@spec await((-> map()), non_neg_integer(), (-> boolean()), keyword()) ::
  {:ok, map()} | {:error, Backplane.AgentRuntime.Error.t()}

Waits with an optional exact :expected_environment_id supplied by the host.

Missing callback IDs bind logically to that expectation; successful observations are returned unchanged. Explicit terminal states require a valid environment ID.

execute_if_ready(state, fun)

@spec execute_if_ready(map(), (-> term())) ::
  {:ok, term()} | {:error, Backplane.AgentRuntime.Error.t()}

ready?(state)

@spec ready?(map()) :: boolean()