cayu.immutable_inputs
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.
DEFAULT_IMMUTABLE_INPUT_MAX_FILE_BYTES
Section titled “DEFAULT_IMMUTABLE_INPUT_MAX_FILE_BYTES”from cayu.environments import DEFAULT_IMMUTABLE_INPUT_MAX_FILE_BYTESDEFAULT_IMMUTABLE_INPUT_MAX_FILE_BYTES = 64 * 1024 * 1024Release source · Runtime guarantees · Capability guides
DEFAULT_IMMUTABLE_INPUT_MAX_FILES
Section titled “DEFAULT_IMMUTABLE_INPUT_MAX_FILES”from cayu.environments import DEFAULT_IMMUTABLE_INPUT_MAX_FILESDEFAULT_IMMUTABLE_INPUT_MAX_FILES = 100000Release source · Runtime guarantees · Capability guides
DEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTES
Section titled “DEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTES”from cayu.environments import DEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTESDEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTES = 2 * 1024 * 1024 * 1024Release source · Runtime guarantees · Capability guides
docker_immutable_input_capability
Section titled “docker_immutable_input_capability”from cayu.environments import docker_immutable_input_capabilityReturn Docker’s concrete manager-issued bind-mount capability.
docker_immutable_input_capability() -> ImmutableInputAdapterCapabilityRelease source · Runtime guarantees · Capability guides
DockerImmutableInputMount
Section titled “DockerImmutableInputMount”from cayu.environments import DockerImmutableInputMountOpaque manager-issued authority for one exact Docker read-only mount.
Decorators: @dataclass(frozen=True, slots=True, init=False).
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 |
|---|---|---|
source_path |
str |
required |
target_path |
str |
required |
projection_fingerprint |
str |
required |
attachment_id |
str |
required |
init (method)
Section titled “init (method)”DockerImmutableInputMount.__init__(*_args: object, **_kwargs: object) -> NoneRelease source · Runtime guarantees · Capability guides
IMMUTABLE_INPUT_FORMAT_VERSION
Section titled “IMMUTABLE_INPUT_FORMAT_VERSION”from cayu.environments import IMMUTABLE_INPUT_FORMAT_VERSIONIMMUTABLE_INPUT_FORMAT_VERSION = 'cayu.immutable-tree.v1'Release source · Runtime guarantees · Capability guides
ImmutableInputAdapterCapability
Section titled “ImmutableInputAdapterCapability”from cayu.environments import ImmutableInputAdapterCapabilityContent-free declaration of one adapter’s projection mechanism.
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 |
|---|---|---|
adapter |
str |
Field(max_length=128) |
capability |
ImmutableInputProjectionCapability |
required |
mechanism |
str | None |
Field(default=None, max_length=128) |
read_only_enforced |
StrictBool |
False |
shared_materialization |
StrictBool |
False |
durable_recovery |
StrictBool |
False |
explicit_copy_fallback |
StrictBool |
False |
reason_code |
str | None |
Field(default=None, max_length=128) |
validate_adapter (method)
Section titled “validate_adapter (method)”ImmutableInputAdapterCapability.validate_adapter(value: str) -> strvalidate_claims (method)
Section titled “validate_claims (method)”ImmutableInputAdapterCapability.validate_claims() -> SelfRelease source · Runtime guarantees · Capability guides
ImmutableInputAttachment
Section titled “ImmutableInputAttachment”from cayu.environments import ImmutableInputAttachmentDurable ownership of a verified materialization by one environment.
Decorators: @dataclass(frozen=True, slots=True, init=False).
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 |
|---|---|---|
attachment_id |
str |
required |
owner_id |
str |
required |
projection |
ImmutableInputProjection |
required |
materialization_path |
Path |
required |
reused |
bool |
required |
init (method)
Section titled “init (method)”ImmutableInputAttachment.__init__(*_args: object, **_kwargs: object) -> Nonedocker_mount (method)
Section titled “docker_mount (method)”ImmutableInputAttachment.docker_mount() -> DockerImmutableInputMountRelease source · Runtime guarantees · Capability guides
ImmutableInputAttachmentStateError
Section titled “ImmutableInputAttachmentStateError”from cayu.environments import ImmutableInputAttachmentStateErrorAn attachment identifier was reused after its durable release boundary.
Bases: RuntimeError.
init (method)
Section titled “init (method)”ImmutableInputAttachmentStateError.__init__(attachment_id: str, state: str) -> NoneRelease source · Runtime guarantees · Capability guides
ImmutableInputDiagnostic
Section titled “ImmutableInputDiagnostic”from cayu.environments import ImmutableInputDiagnosticBounded content-free diagnostics for one shared materialization.
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 |
|---|---|---|
projection_fingerprint |
str |
Field(pattern='^sha256:[0-9a-f]{64}$') |
content_root |
str |
Field(pattern='^sha256:[0-9a-f]{64}$') |
logical_bytes |
StrictInt |
Field(ge=0) |
physical_bytes |
StrictInt |
Field(ge=0) |
reference_count |
StrictInt |
Field(ge=0) |
attachment_count |
StrictInt |
Field(ge=0) |
reuse_count |
StrictInt |
Field(ge=0) |
cleanup_state |
Literal['retained', 'eligible', 'collecting', 'removed'] |
required |
wait_reason |
Literal['none', 'materialization_lock'] |
'none' |
Release source · Runtime guarantees · Capability guides
ImmutableInputMutationError
Section titled “ImmutableInputMutationError”from cayu.environments import ImmutableInputMutationErrorA supposedly immutable materialization no longer matches its identity.
Bases: RuntimeError.
init (method)
Section titled “init (method)”ImmutableInputMutationError.__init__(projection_fingerprint: str, reason_code: str) -> NoneRelease source · Runtime guarantees · Capability guides
ImmutableInputProjection
Section titled “ImmutableInputProjection”from cayu.environments import ImmutableInputProjectionExact content and policy identity for one read-only target projection.
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 |
|---|---|---|
content_root |
str |
Field(pattern='^sha256:[0-9a-f]{64}$') |
logical_bytes |
StrictInt |
Field(ge=0, le=DEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTES) |
file_count |
StrictInt |
Field(ge=0, le=DEFAULT_IMMUTABLE_INPUT_MAX_FILES) |
target_path |
str |
Field(max_length=4096) |
policy_fingerprint |
str |
Field(pattern='^sha256:[0-9a-f]{64}$') |
runtime_compatibility_fingerprint |
str |
Field(pattern='^sha256:[0-9a-f]{64}$') |
authorization_scope_fingerprint |
str |
Field(pattern='^sha256:[0-9a-f]{64}$') |
format_version |
Literal['cayu.immutable-tree.v1'] |
IMMUTABLE_INPUT_FORMAT_VERSION |
max_files |
StrictInt |
Field(default=DEFAULT_IMMUTABLE_INPUT_MAX_FILES, ge=1) |
max_file_bytes |
StrictInt |
Field(default=DEFAULT_IMMUTABLE_INPUT_MAX_FILE_BYTES, ge=1) |
max_total_bytes |
StrictInt |
Field(default=DEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTES, ge=1) |
validate_sha256 (method)
Section titled “validate_sha256 (method)”ImmutableInputProjection.validate_sha256(value: str, info: Any) -> strvalidate_target_path (method)
Section titled “validate_target_path (method)”ImmutableInputProjection.validate_target_path(value: str) -> strvalidate_bounds (method)
Section titled “validate_bounds (method)”ImmutableInputProjection.validate_bounds() -> Selffingerprint (property)
Section titled “fingerprint (property)”ImmutableInputProjection.fingerprint() -> strRelease source · Runtime guarantees · Capability guides
ImmutableInputProjectionCapability
Section titled “ImmutableInputProjectionCapability”from cayu.environments import ImmutableInputProjectionCapabilityTruthful environment-input behavior supplied by one adapter.
Bases: StrEnum.
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 |
|---|---|---|
SHARED_READ_ONLY |
class attribute |
'shared_read_only' |
MUTABLE_SYNC_BINDING |
class attribute |
'mutable_sync_binding' |
BOUNDED_COPY |
class attribute |
'mutable_sync_binding' |
WORKSPACE_MATERIALIZATION |
class attribute |
'workspace_materialization' |
UNSUPPORTED |
class attribute |
'unsupported' |
Release source · Runtime guarantees · Capability guides
ImmutableInputProjectionUnsupportedError
Section titled “ImmutableInputProjectionUnsupportedError”from cayu.environments import ImmutableInputProjectionUnsupportedErrorAn adapter cannot provide the requested immutable-input guarantees.
Bases: RuntimeError.
init (method)
Section titled “init (method)”ImmutableInputProjectionUnsupportedError.__init__(reason_code: str) -> NoneRelease source · Runtime guarantees · Capability guides
ImmutableInputStore
Section titled “ImmutableInputStore”from cayu.environments import ImmutableInputStoreDurable convergent registry and materializer for immutable local trees.
init (method)
Section titled “init (method)”ImmutableInputStore.__init__(root: str | os.PathLike[str]) -> Nonereserve_allocation_sync (method)
Section titled “reserve_allocation_sync (method)”ImmutableInputStore.reserve_allocation_sync(scope_id: str, projection_fingerprints: tuple[str, ...]) -> strReserve a durable incarnation until all its attachments are released.
Missing admissions and closing attachments retain the same incarnation. Callers must use the returned identity as their attachment owner ID.
attach (method)
Section titled “attach (method)”async ImmutableInputStore.attach(source: LocalImmutableInput, *, attachment_id: str, owner_id: str) -> ImmutableInputAttachmentMaterialize once and durably attach one exact environment owner.
attach_sync (method)
Section titled “attach_sync (method)”ImmutableInputStore.attach_sync(source: LocalImmutableInput, *, attachment_id: str, owner_id: str) -> ImmutableInputAttachmentrelease_allocation_sync (method)
Section titled “release_allocation_sync (method)”ImmutableInputStore.release_allocation_sync(owner_id: str) -> NoneTerminalize an exact allocation, including admissions not yet written.
The caller must first confirm disposal of the owned external resource.
release (method)
Section titled “release (method)”async ImmutableInputStore.release(attachment_id: str) -> Nonemark_container_closing (method)
Section titled “mark_container_closing (method)”async ImmutableInputStore.mark_container_closing(attachments: tuple[ImmutableInputAttachment, ...], *, container_id: str) -> Nonemark_container_closing_sync (method)
Section titled “mark_container_closing_sync (method)”ImmutableInputStore.mark_container_closing_sync(attachments: tuple[ImmutableInputAttachment, ...], *, container_id: str) -> Noneinterrupted_cleanup_container_id (method)
Section titled “interrupted_cleanup_container_id (method)”async ImmutableInputStore.interrupted_cleanup_container_id(attachment_ids: tuple[str, ...]) -> str | Noneinterrupted_cleanup_container_id_sync (method)
Section titled “interrupted_cleanup_container_id_sync (method)”ImmutableInputStore.interrupted_cleanup_container_id_sync(attachment_ids: tuple[str, ...]) -> str | Nonereconcile_interrupted_container_cleanup (method)
Section titled “reconcile_interrupted_container_cleanup (method)”async ImmutableInputStore.reconcile_interrupted_container_cleanup(attachment_ids: tuple[str, ...], *, container_id: str, container_exists: bool) -> boolreconcile_interrupted_container_cleanup_sync (method)
Section titled “reconcile_interrupted_container_cleanup_sync (method)”ImmutableInputStore.reconcile_interrupted_container_cleanup_sync(attachment_ids: tuple[str, ...], *, container_id: str, container_exists: bool) -> boolrelease_sync (method)
Section titled “release_sync (method)”ImmutableInputStore.release_sync(attachment_id: str) -> Noneinspect (method)
Section titled “inspect (method)”ImmutableInputStore.inspect() -> tuple[ImmutableInputDiagnostic, ...]collect (method)
Section titled “collect (method)”ImmutableInputStore.collect(projection_fingerprint: str) -> boolRemove one unreferenced materialization; active identities fail closed.
Release source · Runtime guarantees · Capability guides
inspect_local_immutable_input
Section titled “inspect_local_immutable_input”from cayu.environments import inspect_local_immutable_inputInspect a bounded local tree and return its exact projection identity.
inspect_local_immutable_input(root: str | os.PathLike[str], *, target_path: str, policy_fingerprint: str, runtime_compatibility_fingerprint: str, authorization_scope_fingerprint: str, max_files: int=DEFAULT_IMMUTABLE_INPUT_MAX_FILES, max_file_bytes: int=DEFAULT_IMMUTABLE_INPUT_MAX_FILE_BYTES, max_total_bytes: int=DEFAULT_IMMUTABLE_INPUT_MAX_TOTAL_BYTES) -> LocalImmutableInputRelease source · Runtime guarantees · Capability guides
LocalImmutableInput
Section titled “LocalImmutableInput”from cayu.environments import LocalImmutableInputA local source whose bytes must verify against an exact projection.
Decorators: @dataclass(frozen=True, slots=True).
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 |
|---|---|---|
root |
Path |
required |
projection |
ImmutableInputProjection |
required |
Release source · Runtime guarantees · Capability guides
require_immutable_input_projection
Section titled “require_immutable_input_projection”from cayu.environments import require_immutable_input_projectionFail closed unless an adapter can project or an explicit copy fallback is allowed.
require_immutable_input_projection(capability: ImmutableInputAdapterCapability, *, allow_bounded_copy_fallback: bool=False) -> ImmutableInputAdapterCapability