Per-job access to cancellation state and oll host capabilities.
The SDK supplies a context to every action handler. Do not construct or retain it after the handler finishes. Host calls and artifact transfers are scoped to the current job and may raise if the job is cancelled or its deadline expires.
Summary
Functions
Returns whether oll has requested cancellation of the current job.
Raises if oll has requested cancellation of the current job.
Reads configuration at path.
Performs a raw oll host call.
Invokes a configuration function with protobuf configuration values.
Writes a structured log record through oll.
Stores an artifact through oll.
Types
Functions
Returns whether oll has requested cancellation of the current job.
@spec check_cancellation!(t()) :: :ok
Raises if oll has requested cancellation of the current job.
@spec get_config(t(), Oll.Protocol.ConfigPath.t() | nil) :: {:ok, Oll.Protocol.GetConfigResponse.t()} | {:error, term()}
Reads configuration at path.
Passing nil reads the root. On success the returned protobuf response
contains the requested value.
@spec host_call( t(), {atom(), struct()} ) :: {:ok, Oll.Protocol.HostCallResponse.t()} | {:error, term()}
Performs a raw oll host call.
request is a {variant, protobuf_request} tuple accepted by the
Oll.Protocol.HostCallRequest.call oneof. Prefer a specialized helper when
one is available.
@spec invoke_config_function( t(), Oll.Protocol.ConfigFunctionRef.t(), [Oll.Protocol.ConfigValue.t()] ) :: {:ok, Oll.Protocol.InvokeConfigFunctionResponse.t()} | {:error, term()}
Invokes a configuration function with protobuf configuration values.
Writes a structured log record through oll.
Field values must be serializable protobuf configuration values. Function references are not serializable and are rejected.
@spec store_artifact(t(), Oll.Protocol.ArtifactDescriptor.t(), Enumerable.t()) :: {:ok, Oll.Protocol.ArtifactStored.t()}
Stores an artifact through oll.
chunks is consumed once and spooled while its size and SHA-256 digest are
checked against artifact. Every chunk must be a nonempty binary no larger
than the limit negotiated with oll. Include the descriptor in the terminal
result with Onelastleaf.PluginSDK.ActionResult.with_artifacts/2 only after
this function returns successfully.