cayu.evals.external_container
Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.
external_container_environment_revision
Section titled “external_container_environment_revision”from cayu.evals import external_container_environment_revisionReturn the exact public identity of the hardened execution environment.
external_container_environment_revision(*, image: str, runtime: str, memory: str='1g', cpus: str='1.0', pids_limit: int=256) -> strRelease source · Runtime guarantees · Capability guides
EXTERNAL_CONTAINER_MAX_INPUT_BYTES
Section titled “EXTERNAL_CONTAINER_MAX_INPUT_BYTES”from cayu.evals import EXTERNAL_CONTAINER_MAX_INPUT_BYTESEXTERNAL_CONTAINER_MAX_INPUT_BYTES = 48 << 20Release source · Runtime guarantees · Capability guides
EXTERNAL_CONTAINER_MAX_OUTPUT_BYTES
Section titled “EXTERNAL_CONTAINER_MAX_OUTPUT_BYTES”from cayu.evals import EXTERNAL_CONTAINER_MAX_OUTPUT_BYTESEXTERNAL_CONTAINER_MAX_OUTPUT_BYTES = 1 << 20Release source · Runtime guarantees · Capability guides
EXTERNAL_CONTAINER_RESET_CONTRACT_REVISION
Section titled “EXTERNAL_CONTAINER_RESET_CONTRACT_REVISION”from cayu.evals import EXTERNAL_CONTAINER_RESET_CONTRACT_REVISIONEXTERNAL_CONTAINER_RESET_CONTRACT_REVISION = 'sha256:' + sha256(b'fresh-container:no-network:no-mounts:read-only-root:tmpfs-workspace:v1').hexdigest()Release source · Runtime guarantees · Capability guides
EXTERNAL_CONTAINER_RUNNER_REVISION
Section titled “EXTERNAL_CONTAINER_RUNNER_REVISION”from cayu.evals import EXTERNAL_CONTAINER_RUNNER_REVISIONEXTERNAL_CONTAINER_RUNNER_REVISION = 'sha256:' + sha256(b'cayu.external-container.runner.v2').hexdigest()Release source · Runtime guarantees · Capability guides
EXTERNAL_CONTAINER_STREAM_PROTOCOL
Section titled “EXTERNAL_CONTAINER_STREAM_PROTOCOL”from cayu.evals import EXTERNAL_CONTAINER_STREAM_PROTOCOLEXTERNAL_CONTAINER_STREAM_PROTOCOL = 'cayu.external-container.v2'Release source · Runtime guarantees · Capability guides
ExternalContainerLaunchRequestV1
Section titled “ExternalContainerLaunchRequestV1”from cayu.evals import ExternalContainerLaunchRequestV1Authority-free input copied into a fresh container before it starts.
Bases: _ExternalContainerModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
schema_version |
Literal[1] |
1 |
protocol |
Literal['cayu.external-process.v1'] |
EXTERNAL_PROCESS_PROTOCOL_VERSION |
envelope |
ExternalTrialEnvelopeV1 |
required |
request |
dict[str, object] |
required |
Release source · Runtime guarantees · Capability guides
ExternalContainerOperationAdapter
Section titled “ExternalContainerOperationAdapter”from cayu.evals import ExternalContainerOperationAdapterExecute immutable candidates in fresh, recoverable hardened containers.
Every operation has a deterministic container name derived from the exact external trial identity. Provider start keys are durable aliases to that scientific effect, so a redispatch cannot create a second container for the same trial. The body and input are copied into a stopped container before launch; runtime execution then has no mounts, network, Linux capabilities, writable root, or host credentials. Daemon state and bounded logs are the external-effect reconciliation surface after restart.
Bases: ProviderOperationAdapter.
start (method)
Section titled “start (method)”async ExternalContainerOperationAdapter.start(request: ProviderOperationStartRequest) -> ProviderOperationConnectionretrieve (method)
Section titled “retrieve (method)”async ExternalContainerOperationAdapter.retrieve(state: ProviderOperationState) -> ProviderOperationSnapshotreconnect (method)
Section titled “reconnect (method)”async ExternalContainerOperationAdapter.reconnect(state: ProviderOperationState) -> ProviderOperationConnectionstart_idempotency_support (property)
Section titled “start_idempotency_support (property)”ExternalContainerOperationAdapter.start_idempotency_support() -> ProviderOperationStartIdempotencySupportrecover_start (method)
Section titled “recover_start (method)”async ExternalContainerOperationAdapter.recover_start(request: ProviderOperationStartRecoveryRequest) -> ProviderOperationConnectioncancellation_support (property)
Section titled “cancellation_support (property)”ExternalContainerOperationAdapter.cancellation_support() -> ProviderOperationCancellationSupportcancel (method)
Section titled “cancel (method)”async ExternalContainerOperationAdapter.cancel(state: ProviderOperationState) -> ProviderOperationSnapshotinit (method)
Section titled “init (method)”ExternalContainerOperationAdapter.__init__(*, identity: ExternalProcessTargetIdentityV1, body_root: str | Path, state_root: str | Path, image: str, runtime: str, docker_path: str | None=None, memory: str='1g', cpus: str='1.0', pids_limit: int=256, poll_seconds: float=0.1, _client: _DockerClient | None=None) -> NoneRelease source · Runtime guarantees · Capability guides
ExternalContainerOutputV1
Section titled “ExternalContainerOutputV1”from cayu.evals import ExternalContainerOutputV1Bounded candidate output returned through daemon-retained container logs.
Bases: _ExternalContainerModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
schema_version |
Literal[1] |
1 |
output |
StrictStr |
Field(max_length=EXTERNAL_CONTAINER_MAX_OUTPUT_BYTES) |
usage |
ExternalContainerUsageV1 |
required |
Release source · Runtime guarantees · Capability guides
ExternalContainerUsageV1
Section titled “ExternalContainerUsageV1”from cayu.evals import ExternalContainerUsageV1Untrusted diagnostic usage reported by the candidate-private runtime.
Bases: _ExternalContainerModel.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
input_tokens |
StrictInt |
Field(ge=0) |
output_tokens |
StrictInt |
Field(ge=0) |
total_tokens |
StrictInt |
Field(ge=0) |
validate_total_tokens (method)
Section titled “validate_total_tokens (method)”ExternalContainerUsageV1.validate_total_tokens(value: int, info) -> int