cayu.environments.docker_coding
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.
DOCKER_CODING_PROTECTED_DIRECTORY_NAMES
Section titled “DOCKER_CODING_PROTECTED_DIRECTORY_NAMES”from cayu.environments import DOCKER_CODING_PROTECTED_DIRECTORY_NAMESDOCKER_CODING_PROTECTED_DIRECTORY_NAMES = ('.cayu', '.git', '.runtime')Release source · Runtime guarantees · Capability guides
DockerCodingEnvironmentFactory
Section titled “DockerCodingEnvironmentFactory”from cayu.environments import DockerCodingEnvironmentFactoryCreate exact, non-networked Docker environments for explicitly trusted code.
git_baseline=False drops the ephemeral guest Git baseline, so the image
needs no git. Use it for sandboxes that only sync files in and out; keep
the default for coding products that publish Git changes.
Bases: EnvironmentFactory.
secret_resolution_scope (property)
Section titled “secret_resolution_scope (property)”DockerCodingEnvironmentFactory.secret_resolution_scope() -> Literal['static']Every native Docker coding result is credential-free.
execution_profile_identity (property)
Section titled “execution_profile_identity (property)”DockerCodingEnvironmentFactory.execution_profile_identity() -> ExecutionProfileBehaviorIdentityegress_authority_identity (property)
Section titled “egress_authority_identity (property)”DockerCodingEnvironmentFactory.egress_authority_identity() -> EgressAuthorityIdentity | NoneReturn the immutable egress authority proposed for future invocations.
execution_admission_candidate (method)
Section titled “execution_admission_candidate (method)”DockerCodingEnvironmentFactory.execution_admission_candidate(request: EnvironmentFactoryRequest) -> ExecutionAdmissionCandidateconstruction_admission_candidate (method)
Section titled “construction_admission_candidate (method)”DockerCodingEnvironmentFactory.construction_admission_candidate() -> ExecutionAdmissionCandidateexecution_environment_authority (method)
Section titled “execution_environment_authority (method)”DockerCodingEnvironmentFactory.execution_environment_authority() -> ExecutionEnvironmentAuthorityReturn the exact authority every runner from this factory preserves.
workload_authority (method)
Section titled “workload_authority (method)”DockerCodingEnvironmentFactory.workload_authority(name: str) -> RunnerWorkloadAuthority | NoneReturn configured authority for a workload every result must preserve.
configured_artifact_store (property)
Section titled “configured_artifact_store (property)”DockerCodingEnvironmentFactory.configured_artifact_store() -> ArtifactStore | NoneHost-side store shared by results; its lifetime belongs to the application.
allocation_scope (method)
Section titled “allocation_scope (method)”DockerCodingEnvironmentFactory.allocation_scope(request: EnvironmentFactoryRequest) -> EnvironmentAllocationScope | Nonecreate_recoverable (method)
Section titled “create_recoverable (method)”async DockerCodingEnvironmentFactory.create_recoverable(request: EnvironmentFactoryRequest, allocation: EnvironmentAllocationContext) -> EnvironmentFactoryResultreap_allocation (method)
Section titled “reap_allocation (method)”async DockerCodingEnvironmentFactory.reap_allocation(request: EnvironmentFactoryRequest, allocation: EnvironmentAllocationContext) -> Nonerecover_finalization_disposal (method)
Section titled “recover_finalization_disposal (method)”async DockerCodingEnvironmentFactory.recover_finalization_disposal(request: EnvironmentFactoryRequest, state: dict[str, Any]) -> Noneis_allocation_disposed (method)
Section titled “is_allocation_disposed (method)”async DockerCodingEnvironmentFactory.is_allocation_disposed(request: EnvironmentFactoryRequest) -> boolProve that a finished session’s exact container is gone.
Full Docker container IDs are never reused, so absence after a successful daemon lookup proves disposal and lets the next invocation of a completed session start a fresh container. A failed lookup raises instead of answering. Configuration is not compared: an image re-pin must not strand completed sessions. Factories with immutable inputs keep exact reconnect, since their attachments have their own disposal state.
deferred_materialization (property)
Section titled “deferred_materialization (property)”DockerCodingEnvironmentFactory.deferred_materialization() -> boolWhether sessions create their container on first runner use.
release_deferred_materialization (method)
Section titled “release_deferred_materialization (method)”async DockerCodingEnvironmentFactory.release_deferred_materialization(request: EnvironmentFactoryRequest) -> boolRemove the container a crashed run created under this allocation’s name.
release_idle_resources (method)
Section titled “release_idle_resources (method)”async DockerCodingEnvironmentFactory.release_idle_resources() -> NoneRemove idle warm spares; the next materialization refills the pool.
close_idle_resources (method)
Section titled “close_idle_resources (method)”async DockerCodingEnvironmentFactory.close_idle_resources() -> NoneClose the warm spare pool at shutdown; later sessions start cold.
create (method)
Section titled “create (method)”async DockerCodingEnvironmentFactory.create(request: EnvironmentFactoryRequest) -> EnvironmentFactoryResultinit (method)
Section titled “init (method)”DockerCodingEnvironmentFactory.__init__(*, source_workspace: LocalWorkspace, toolchain_profile: DockerCodingToolchainProfile, artifact_store: ArtifactStore | None=None, transfer_limits: DockerWorkspaceTransferLimits | None=None, runtime: str | None=None, seccomp_profile: str | None=None, docker_path: str | None=None, immutable_inputs: Sequence[LocalImmutableInput]=(), immutable_input_store: ImmutableInputStore | None=None, immutable_input_runtime_compatibility_fingerprint: str | None=None, git_baseline: bool=True, knowledge_store: KnowledgeStore | None=None, knowledge_access_scope: KnowledgeAccessScope | None=None, deferred: bool=False, warm_spares: int=0) -> Nonewarm_spare_pool (property)
Section titled “warm_spare_pool (property)”DockerCodingEnvironmentFactory.warm_spare_pool() -> WarmSparePool[Any] | NoneThe warm spare pool behind warm_spares, or None without one.
immutable_input_capability (property)
Section titled “immutable_input_capability (property)”DockerCodingEnvironmentFactory.immutable_input_capability() -> ImmutableInputAdapterCapabilityDescribe the concrete read-only projection mechanism used by this factory.
observe_command_receipt (method)
Section titled “observe_command_receipt (method)”async DockerCodingEnvironmentFactory.observe_command_receipt(identity: dict[str, Any], receipt: dict[str, Any])Read authenticated command evidence without allocating or attaching.
create_workspace_binding (method)
Section titled “create_workspace_binding (method)”DockerCodingEnvironmentFactory.create_workspace_binding(request: EnvironmentFactoryRequest, *, target_workspace: RunnerWorkspace, immutable_input_attachments: Sequence[ImmutableInputAttachment]=()) -> DockerCodingWorkspaceBindingConstruct the exact request-bound publication seam for an admitted runner.
Release source · Runtime guarantees · Capability guides
DockerCodingWorkspaceBinding
Section titled “DockerCodingWorkspaceBinding”from cayu.environments import DockerCodingWorkspaceBindingSync a projected host tree, optionally with an ephemeral guest Git baseline.
With git_baseline=False the guest needs no git executable: copy-in,
copy-back, recovery and disposal are unchanged, but no Git evidence is
captured and coding-product source-copy authority is unavailable.
Bases: SyncBinding.
bind (method)
Section titled “bind (method)”async DockerCodingWorkspaceBinding.bind(workspace: Workspace | None, runner: Runner | None, *, session_id: str, agent_name: str | None=None, environment_name: str | None=None, metadata: dict[str, Any] | None=None) -> BoundWorkspacefinalize (method)
Section titled “finalize (method)”async DockerCodingWorkspaceBinding.finalize(bound: BoundWorkspace, *, outcome: str | None=None, metadata: dict[str, Any] | None=None) -> WorkspaceSnapshot | Noneobserve_revision (method)
Section titled “observe_revision (method)”async DockerCodingWorkspaceBinding.observe_revision(bound: BoundWorkspace) -> WorkspaceRevisionObservationObserve the bounded guest file tree, excluding protected runtime paths.
input_capability (method)
Section titled “input_capability (method)”DockerCodingWorkspaceBinding.input_capability() -> ImmutableInputAdapterCapabilityobserve_writer_isolation (method)
Section titled “observe_writer_isolation (method)”DockerCodingWorkspaceBinding.observe_writer_isolation(bound: BoundWorkspace) -> WorkspaceWriterIsolationEvidenceReport inspectable writer-isolation evidence for one mutation window.
The compatibility default is deliberately unknown. Serial tool dispatch, a process-local lock, or a stable workspace identity does not prove that users, sibling processes, or background services cannot mutate the same resource.
abandon (method)
Section titled “abandon (method)”DockerCodingWorkspaceBinding.abandon(bound: BoundWorkspace) -> boolinit (method)
Section titled “init (method)”DockerCodingWorkspaceBinding.__init__(*, target_workspace: RunnerWorkspace, limits: DockerWorkspaceTransferLimits, source_copy_authority: CodingProductSourceCopyAuthority | None=None, immutable_input_store: ImmutableInputStore | None=None, immutable_input_attachments: Sequence[ImmutableInputAttachment]=(), path: str='/workspace', git_baseline: bool=True) -> Nonestaging_snapshot (method)
Section titled “staging_snapshot (method)”DockerCodingWorkspaceBinding.staging_snapshot() -> SyncBindingStagingSnapshotReturn content-free process-local staging capacity state.
Release source · Runtime guarantees · Capability guides
DockerWorkspaceTransferLimits
Section titled “DockerWorkspaceTransferLimits”from cayu.environments import DockerWorkspaceTransferLimitsFinite copy-in/copy-back limits for one coding container.
Bases: BaseModel.
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 |
|---|---|---|
max_files |
int |
Field(default=10000, ge=1, le=100000) |
max_file_bytes |
int |
Field(default=8 * 1024 * 1024, ge=1, le=64 * 1024 * 1024) |
max_total_bytes |
int |
Field(default=64 * 1024 * 1024, ge=1, le=1024 * 1024 * 1024) |
max_archive_bytes |
int |
Field(default=128 * 1024 * 1024, ge=1024, le=2 * 1024 * 1024 * 1024) |