Skip to content

cayu.artifacts.workspace

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.

from cayu.artifacts import ArtifactToWorkspaceResult

Decorators: @dataclass(frozen=True).

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
artifact ArtifactMetadata required
workspace_path str required
bytes_written int required
truncated bool False

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import copy_artifact_to_workspace

Copy one durable artifact into the mutable workspace.

The copy is explicit and one-way. The artifact remains unchanged, and later workspace edits do not modify the original artifact.

async copy_artifact_to_workspace(artifact_store: ArtifactStore, workspace: Workspace, artifact_id: str, workspace_path: str, *, max_bytes: int | None=DEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES, allow_truncated: bool=False) -> ArtifactToWorkspaceResult

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import copy_workspace_file_to_artifact

Store the current workspace file bytes as a new durable artifact.

async copy_workspace_file_to_artifact(workspace: Workspace, artifact_store: ArtifactStore, workspace_path: str, *, filename: str | None=None, content_type: str | None=None, scope: ArtifactScope=ArtifactScope.SESSION, session_id: str | None=None, agent_name: str | None=None, environment_name: str | None=None, metadata: dict[str, Any] | None=None, max_bytes: int | None=DEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES, allow_truncated: bool=False) -> WorkspaceToArtifactResult

Release source · Runtime guarantees · Capability guides

DEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES

Section titled “DEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES”
from cayu.artifacts import DEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES
DEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES = 64 * 1024 * 1024

Release source · Runtime guarantees · Capability guides

from cayu.artifacts import WorkspaceToArtifactResult

Decorators: @dataclass(frozen=True).

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
artifact ArtifactMetadata required
workspace_path str required
bytes_read int required
truncated bool False

Release source · Runtime guarantees · Capability guides