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.
ArtifactToWorkspaceResult
Section titled “ArtifactToWorkspaceResult”from cayu.artifacts import ArtifactToWorkspaceResultDecorators: @dataclass(frozen=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 |
|---|---|---|
artifact |
ArtifactMetadata |
required |
workspace_path |
str |
required |
bytes_written |
int |
required |
truncated |
bool |
False |
Release source · Runtime guarantees · Capability guides
copy_artifact_to_workspace
Section titled “copy_artifact_to_workspace”from cayu.artifacts import copy_artifact_to_workspaceCopy 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) -> ArtifactToWorkspaceResultRelease source · Runtime guarantees · Capability guides
copy_workspace_file_to_artifact
Section titled “copy_workspace_file_to_artifact”from cayu.artifacts import copy_workspace_file_to_artifactStore 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) -> WorkspaceToArtifactResultRelease 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_BYTESDEFAULT_ARTIFACT_WORKSPACE_COPY_LIMIT_BYTES = 64 * 1024 * 1024Release source · Runtime guarantees · Capability guides
WorkspaceToArtifactResult
Section titled “WorkspaceToArtifactResult”from cayu.artifacts import WorkspaceToArtifactResultDecorators: @dataclass(frozen=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 |
|---|---|---|
artifact |
ArtifactMetadata |
required |
workspace_path |
str |
required |
bytes_read |
int |
required |
truncated |
bool |
False |