Skip to main content

Crate agent_workspace_contract

Crate agent_workspace_contract 

Source
Expand description

Provider-neutral workspace contracts and default capability behavior.

Structs§

AckResponse
AcquireSpaceWriteLeaseRequest
ApplySpaceChangeSetRequest
BuildBuiltinSnapshotRequest
BytesResponse
CloneWorkspaceRequest
CmdOutput
Output of a command execution.
CommandPermitRequest
CommandResource
CommandSpec
CommandTransition
ComputerBinding
ComputerCommandOutputChunk
ComputerCommandOutputPage
ComputerCommandResource
ComputerRecord
ComputerResource
ContentResponse
CreateCommandRequest
CreateComputerCommandRequest
CreateComputerRequest
CreateDelegationRequest
CreatePreviewRequest
CreateSandboxRequest
CreateSnapshotRequest
CreateSnapshotResourceRequest
CreateSpaceChangeSetRequest
CreateSpaceGrantRequest
CreateSpaceRequest
CreateTemplateVersionRequest
CreateUploadRequest
CreateWorkspaceRequest
DelegationRecord
DelegationResource
DirEntry
A directory entry returned by list_dir.
EntriesResponse
EnvironmentCatalogConfig
EnvironmentDomainError
EnvironmentIdempotencyRecord
EnvironmentMetadataSnapshot
Durable metadata snapshot for one tenant/project scope.
EnvironmentProviderAdminConfig
EnvironmentProviderSlotView
ExecRequest
ExistsResponse
FileVisibilityOptions
Options for directory listing and recursive search operations.
FindFilesRequest
GrepMatch
A grep match result.
GrepRequest
GrepResponse
HeartbeatSpaceSessionRequest
InstallSandboxSkillRequest
InstallSandboxSkillResource
IsDirResponse
IssueSpaceAccessTicketRequest
IssuedSpaceAccessTicket
IssuedSpaceAccessTicketResource
KeepAliveRequest
ListDirRequest
ListEnvironmentResourcesQuery
MigrateWorkspaceRequest
OpenSpaceSessionRequest
OperationTransition
OutputChunk
OutputPage
OwnerRef
PatchOwnersRequest
PathRequest
PathsResponse
PortUrl
Public preview URL for a port exposed by a workspace backend.
PortUrlRequest
PrincipalRef
ProviderBuildHandle
ProviderCapabilities
ProviderCommandOutput
Synchronous provider command result. The control plane may persist chunks.
ProviderComputerRequest
Provider-facing request after product identifiers and access tickets have been resolved. These DTOs cannot be supplied by HTTP callers.
ProviderFileContent
ProviderRequestFailure
Provider-neutral failure signal consumed by transport resilience policies.
ProviderResourceRef
ProviderSandboxMount
ProviderSandboxRequest
ProviderSpaceRequest
ProviderWriteResult
ProvisionedWorkspace
PutWorkspaceFileRequest
Body for the resource-scoped PUT .../files/{path} API. The path belongs to the URL so it cannot disagree with a second body field.
ReadFileTailRequest
ReadSpaceFileRequest
ReleaseSpaceWriteLeaseRequest
RemoveFileRequest
ResolvedBackendId
Resolved durable backend ID discovered while initializing a workspace. This remains provider-neutral on the wire.
ResourcePressure
ResourceScope
ResourceUsageValue
RevokeSpaceGrantRequest
SandboxMount
SandboxMountRecord
Persisted mount metadata. The bearer token from SandboxMount is deliberately replaced by its non-secret ticket id before persistence.
SandboxRecord
SandboxResource
SecretRef
Opaque reference resolved only by a trusted adapter. The secret value is deliberately impossible to serialize or expose through Debug.
SkillPackage
SkillPackageFile
SkillSearchItem
SkillSearchPage
SkillSearchQuery
Snapshot
SnapshotObjectRef
SnapshotRecord
SnapshotResource
SpaceAccessTicketRecord
SpaceAccessTicketResource
SpaceChangeSetRecord
SpaceChangeSetResource
SpaceCollaborationSession
SpaceCollaborationSessionResource
SpaceFileContent
SpaceGrant
SpaceGrantResource
SpaceRecord
SpaceResource
SpaceWriteLease
SpaceWriteLeaseResource
StaticPreviewServer
StoredChangeSet
StoredPreview
StoredSnapshot
TemplateVersionRecord
TemplateVersionResource
UpdateEnvironmentProviderAdminConfigRequest
UpdateEnvironmentProviderSlotRequest
UploadChunkRequest
UploadSession
VersionedFile
WalkTreeRequest
WorkspaceActionRequest
WorkspaceApiError
WorkspaceCapabilities
WorkspaceChangeSet
WorkspaceChangeSetRequest
WorkspaceChangeSummary
WorkspaceConfig
Provider-neutral provisioning input. Provider-specific SDK/configuration belongs to an adapter crate; the contract contains only a backend kind, opaque settings and secret references.
WorkspaceErrorDetails
WorkspaceFileChange
WorkspaceLease
WorkspaceLeaseKeepAlive
WorkspaceOperation
WorkspaceOperationError
WorkspacePage
WorkspaceRecord
WorkspaceResourceUsage
WorkspaceSearchRequest
One bounded typed search entry point. Fields that do not apply to the selected kind are rejected by the service rather than guessed.
WorkspaceSearchResponse
WorkspaceSession
WorkspaceStorageUsage
WorkspaceTextReplacement
WorkspaceVersionConflict
WriteFileBytesRequest
WriteFileRequest
WriteSpaceFileRequest

Enums§

ChangeSetLifecycle
CommandNetworkPolicy
CommandState
ComputerCommandOutputStream
ComputerCommandState
ComputerLifecycle
EnvironmentBuildStatus
EnvironmentErrorCode
EnvironmentIdempotencyState
OperationState
OutputStream
OwnerKind
Resource owner identity. At least one owner is required on every Environment resource; callers authenticate with runtime, agent, or user credentials.
OwnerValidationError
PrincipalKind
ProviderSandboxPlacement
ProviderSnapshotSource
ResourcePressureDimension
ResourcePressureSeverity
ResourceUsageStatus
SandboxLifecycle
SandboxPlacement
SnapshotBuildSpec
SnapshotLifecycle
SnapshotSourceRecord
SnapshotVisibility
SpaceAccessMode
SpaceCapability
SpaceLifecycle
SpacePersistence
SpaceSessionLifecycle
TemplateTarget
TemplateVersionState
UploadState
WorkspaceChangeSetStatus
WorkspaceFileChangeKind
WorkspaceLifecycle
WorkspacePatchOperation
WorkspaceSearchKind

Constants§

ADMIN_BUILD_BUILTIN_SNAPSHOTS_PATH
ADMIN_SNAPSHOTS_PATH
ADMIN_SNAPSHOT_PATH
BUILD_BUILTIN_SNAPSHOTS_PATH
CATALOG_SNAPSHOTS_PATH
CATALOG_SNAPSHOT_PATH
COMPUTERS_PATH
COMPUTER_COMMANDS_PATH
COMPUTER_COMMAND_CANCEL_PATH
COMPUTER_COMMAND_OUTPUT_PATH
COMPUTER_COMMAND_PATH
COMPUTER_OWNERS_PATH
COMPUTER_PATH
DELEGATIONS_PATH
DELEGATION_REVOKE_PATH
E2B_BUILTIN_TEMPLATE_IDS
E2B_PLATFORM_TEMPLATE_ID
Provider-owned images used when product create APIs omit every Workspace catalog snapshot/template selector. A configured catalog default still takes precedence and is resolved to its provider external id by Runtime.
ENVIRONMENT_MAX_FILE_BYTES
ENVIRONMENT_MAX_PATH_BYTES
MOULIN_PLATFORM_SNAPSHOT_ID
SANDBOXES_PATH
SANDBOX_PATH
SANDBOX_SKILLS_PATH
Product path for installing a Skills Hub package into a running Sandbox.
SANDBOX_SKILL_DEFAULT_PROVIDER
Default sandbox provider when the caller omits provider.
SANDBOX_SKILL_DEFAULT_VERSION
Default Skills Hub version selector when the caller omits version.
SANDBOX_SKILL_INSTALL_ROOT
Sandbox-root directory that receives unpacked skill packages.
SANDBOX_STOP_PATH
SKILLS_SEARCH_PATH
Product path for searching published Skills Hub packages.
SNAPSHOTS_PATH
SNAPSHOT_DOCKERFILE_MAX_BYTES
Product-facing snapshot recipe size limits. The build adapters impose additional limits on fetched repository contents and generated archives.
SNAPSHOT_PATH
SNAPSHOT_TEMPLATE_PACKAGES_MAX_BYTES
SPACES_PATH
SPACE_CHANGE_SETS_PATH
SPACE_CHANGE_SET_APPLY_PATH
SPACE_FILES_PATH
SPACE_FILES_READ_PATH
SPACE_GRANTS_PATH
SPACE_GRANT_REVOKE_PATH
SPACE_LEASES_PATH
SPACE_LEASE_PATH
SPACE_OWNERS_PATH
SPACE_PATH
SPACE_SESSIONS_PATH
SPACE_SESSION_CLOSE_PATH
SPACE_SESSION_HEARTBEAT_PATH
SPACE_TICKETS_PATH
TEMPLATES_PATH
TEMPLATE_VERSIONS_PATH
TEMPLATE_VERSION_DEPRECATE_PATH
TEMPLATE_VERSION_PATH
TEMPLATE_VERSION_PUBLISH_PATH
WORKSPACES_PATH
WORKSPACE_CLONE_PATH
WORKSPACE_COMMANDS_PATH
WORKSPACE_COMMAND_CANCEL_PATH
WORKSPACE_COMMAND_OUTPUT_PATH
WORKSPACE_COMMAND_PATH
WORKSPACE_LEASE_PATH
WORKSPACE_MAX_COMMAND_BYTES
WORKSPACE_MAX_COMMAND_CPU_MILLIS
WORKSPACE_MAX_COMMAND_DISK_BYTES
WORKSPACE_MAX_COMMAND_MEMORY_BYTES
WORKSPACE_MAX_COMMAND_OUTPUT_BYTES
WORKSPACE_MAX_COMMAND_PROCESSES
WORKSPACE_MAX_COMMAND_TIMEOUT_MS
WORKSPACE_MAX_FILE_BYTES
WORKSPACE_MAX_OUTPUT_CHUNKS
WORKSPACE_MAX_PAGE_SIZE
WORKSPACE_MAX_PATH_BYTES
WORKSPACE_MAX_RESULTS
WORKSPACE_MAX_RETENTION_MS
WORKSPACE_MAX_SEARCH_OUTPUT_BYTES
WORKSPACE_MAX_SNAPSHOT_BYTES
WORKSPACE_MAX_UPLOAD_BYTES
WORKSPACE_MIGRATE_PATH
WORKSPACE_MISSING_FILE_REVISION
Reserved compare-and-swap revision representing an absent file.
WORKSPACE_OPERATIONS_PATH
WORKSPACE_OPERATION_CANCEL_PATH
WORKSPACE_OUTPUT_CHUNK_BYTES
WORKSPACE_PATH
WORKSPACE_PREVIEW_TTL_MS
WORKSPACE_RECONCILE_PATH
WORKSPACE_RESOURCE_EXHAUSTED_CODE
WORKSPACE_RESOURCE_FILE_PATH
Resource-scoped file API used by leftover managed callers. filePath is an axum catch-all and therefore may contain workspace-relative / separators.
WORKSPACE_RESOURCE_SEARCH_PATH
WORKSPACE_RESUME_PATH
WORKSPACE_SERVICE_NAME
WORKSPACE_SNAPSHOTS_PATH
WORKSPACE_SNAPSHOT_ARCHIVE_MAGIC
WORKSPACE_SNAPSHOT_RESTORE_PATH
WORKSPACE_SUSPEND_PATH
WORKSPACE_UPLOADS_PATH
WORKSPACE_UPLOAD_CHUNK_BYTES
Resumable uploads deliberately use small chunks so request memory is bounded independently from the maximum completed file size.
WORKSPACE_UPLOAD_PATH
WORKSPACE_UPLOAD_TTL_MS
WORKSPACE_USAGE_PATH
WORKSPACE_VERSION_CONFLICT_CODE

Traits§

CommandPermitRepository
ComputerProvider
EnvironmentBuildPort
Build-only port. Implementations must not create Computer or Sandbox instances.
EnvironmentMetadataRepository
EnvironmentProviderRegistry
PreviewLifecycleProvider
ProviderResiliencePolicy
Narrow strategy port for provider retry and circuit-opening decisions.
SandboxProvider
SecretResolver
SkillHubClient
Downloads a published skill archive. Implementations live in adapter crates.
SnapshotObjectReader
Bounded, random-access reader used across application and object-store ports. Implementations must never return more than max_bytes.
SnapshotObjectStore
SnapshotObjectUpload
SnapshotProvider
SnapshotProviderPort
SpaceProvider
TemplateProviderPort
Workspace
The core workspace trait. All filesystem and command execution flows through this.
WorkspaceAdvancedRepository
WorkspaceCommandExecutor
WorkspaceCommands
Narrow command capability. Possession of this port is an explicit privilege.
WorkspaceControlRepository
WorkspaceFiles
Narrow file capability for consumers that must not gain command execution.
WorkspaceProviderAdapter
WorkspaceProviderRegistry
WorkspaceRepository
Aggregate metadata port used by the application layer. Concrete SQL/storage technology belongs in adapter crates.
WorkspaceSearch
Narrow bounded-search capability.
WorkspaceSessionResolver
WorkspaceUploadWriter

Functions§

content_revision
Collision-resistant content revision shared by CAS and idempotency paths.
is_workspace_resource_exhausted_message
normalize_owners
Normalize owners: non-empty, deduplicated, stable order.
normalize_workspace_operation_error
owners_intersect
True when caller and resource owners share at least one identity.
owners_subset_of
True when candidate is a subset of parent (every element of candidate in parent).
required_workspace_capability
Return the capability required by both the public Gateway alias and the internal Workspace service route. Keeping this decision in the contract prevents the Gateway-issued downstream credential from drifting away from the capability independently enforced by the Workspace server.
revision_matches
snapshot_digest
space_directory_path
Logical directory for a Space on its parent Computer filesystem.
strip_environment_api_prefix
Strip /internal/v1 or /v1, then the Environment domain prefix /workspace when it is a full path segment. /workspaces (plural managed API) is left intact.
workspace_error_details