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
BindComputerRequest
BytesResponse
CloneWorkspaceRequest
CmdOutput
Output of a command execution.
CommandPermitRequest
CommandResource
CommandSpec
CommandTransition
ComputerBinding
ComputerRecord
ComputerResource
ContentResponse
CreateCommandRequest
CreateComputerRequest
CreateDelegationRequest
CreatePreviewRequest
CreateSandboxRequest
CreateSnapshotRequest
CreateSnapshotResourceRequest
CreateSpaceChangeSetRequest
CreateSpaceGrantRequest
CreateSpaceRequest
CreateTemplateVersionRequest
CreateUploadRequest
CreateWorkspaceRequest
DelegationRecord
DelegationResource
DirEntry
A directory entry returned by list_dir.
EntriesResponse
EnvironmentDomainError
EnvironmentIdempotencyRecord
EnvironmentMetadataSnapshot
Durable metadata snapshot for one tenant/project scope.
ExecRequest
ExistsResponse
FileVisibilityOptions
Options for directory listing and recursive search operations.
FindFilesRequest
GrepMatch
A grep match result.
GrepRequest
GrepResponse
HeartbeatSpaceSessionRequest
IsDirResponse
IssueSpaceAccessTicketRequest
IssuedSpaceAccessTicket
IssuedSpaceAccessTicketResource
KeepAliveRequest
ListDirRequest
MigrateWorkspaceRequest
OpenSpaceSessionRequest
OperationTransition
OutputChunk
OutputPage
PathRequest
PathsResponse
PortUrl
Public preview URL for a port exposed by a workspace backend.
PortUrlRequest
PrincipalRef
ProviderCapabilities
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
ReleaseComputerBindingRequest
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.
Snapshot
SnapshotObjectRef
SnapshotRecord
SnapshotResource
SpaceAccessTicketRecord
SpaceAccessTicketResource
SpaceChangeSetRecord
SpaceChangeSetResource
SpaceCollaborationSession
SpaceCollaborationSessionResource
SpaceFileContent
SpaceGrant
SpaceGrantResource
SpaceRecord
SpaceResource
SpaceWriteLease
SpaceWriteLeaseResource
StaticPreviewServer
StoredChangeSet
StoredPreview
StoredSnapshot
TemplateVersionRecord
TemplateVersionResource
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
ComputerLifecycle
CreateSnapshotSource
EnvironmentErrorCode
EnvironmentIdempotencyState
OperationState
OutputStream
PrincipalKind
ProviderSandboxPlacement
ProviderSnapshotSource
ResourcePressureDimension
ResourcePressureSeverity
ResourceUsageStatus
SandboxLifecycle
SandboxPlacement
SnapshotLifecycle
SnapshotSourceRecord
SpaceAccessMode
SpaceCapability
SpaceLifecycle
SpacePersistence
SpaceSessionLifecycle
TemplateTarget
TemplateVersionState
UploadState
WorkspaceChangeSetStatus
WorkspaceFileChangeKind
WorkspaceLifecycle
WorkspacePatchOperation
WorkspaceSearchKind

Constants§

COMPUTERS_PATH
COMPUTER_BINDING_PATH
COMPUTER_BIND_PATH
COMPUTER_PATH
COMPUTER_RELEASE_PATH
DELEGATIONS_PATH
DELEGATION_REVOKE_PATH
ENVIRONMENT_MAX_FILE_BYTES
ENVIRONMENT_MAX_PATH_BYTES
SANDBOXES_PATH
SANDBOX_PATH
SANDBOX_STOP_PATH
SNAPSHOTS_PATH
SNAPSHOT_PATH
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_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_API_PREFIX
WORKSPACE_CAPABILITIES_PATH
WORKSPACE_CLONE_PATH
WORKSPACE_COMMANDS_PATH
WORKSPACE_COMMAND_CANCEL_PATH
WORKSPACE_COMMAND_OUTPUT_PATH
WORKSPACE_COMMAND_PATH
WORKSPACE_CREATE_DIR_ALL_PATH
WORKSPACE_EXEC_PATH
WORKSPACE_EXISTS_PATH
WORKSPACE_FIND_FILES_PATH
WORKSPACE_GREP_PATH
WORKSPACE_IS_DIR_PATH
WORKSPACE_LEASE_PATH
WORKSPACE_LIST_DIR_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_PORT_URL_PATH
WORKSPACE_PREVIEW_TTL_MS
WORKSPACE_READ_FILE_BYTES_PATH
WORKSPACE_READ_FILE_PATH
WORKSPACE_READ_FILE_TAIL_PATH
WORKSPACE_RECONCILE_PATH
WORKSPACE_REMOVE_FILE_PATH
WORKSPACE_RESOURCE_EXHAUSTED_CODE
WORKSPACE_RESOURCE_FILE_PATH
Resource-scoped file API used by new consumers. 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
WORKSPACE_WALK_TREE_PATH
WORKSPACE_WRITE_FILE_BYTES_PATH
WORKSPACE_WRITE_FILE_PATH

Traits§

CommandPermitRepository
ComputerProvider
EnvironmentMetadataRepository
EnvironmentProviderRegistry
PreviewLifecycleProvider
ProviderResiliencePolicy
Narrow strategy port for provider retry and circuit-opening decisions.
SandboxProvider
SecretResolver
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_workspace_operation_error
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
workspace_error_details