{ "openapi": "3.0.0", "paths": { "/api/system/audit": { "get": { "operationId": "AuditController_list", "parameters": [ { "name": "limit", "required": false, "in": "query", "schema": { "type": "number", "minimum": 1, "maximum": 500, "default": 200 } }, { "name": "subjectId", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "severity", "required": false, "in": "query", "description": "逗号分隔的多值,取值 info / warn / error,服务端按 IN 过滤;单值向后兼容(`severity=error`),「仅告警」= `severity=warn,error`;重复值去重,含非法值 → 400 VALIDATION_FAILED", "schema": { "type": "string" } }, { "name": "category", "required": false, "in": "query", "schema": { "enum": [ "sandbox", "project", "credential", "image", "system" ], "type": "string" } }, { "name": "to", "required": false, "in": "query", "description": "ISO 时间上界(与游标正交)", "schema": { "type": "string" } }, { "name": "from", "required": false, "in": "query", "description": "ISO 时间下界(与游标正交)", "schema": { "type": "string" } }, { "name": "before", "required": false, "in": "query", "description": "向老翻页:返回 seq < before", "schema": { "type": "number" } }, { "name": "since", "required": false, "in": "query", "description": "向新翻页:返回 seq > since", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditListResponseDto" } } } } }, "summary": "平台级审计流。since/before 为按 seq 的双向游标(互斥,同传 400 VALIDATION_FAILED);from/to 是与游标正交的时间过滤。响应恒按 seq 降序 + hasMore。", "tags": [ "system" ] } }, "/api/system/audit/export": { "get": { "operationId": "AuditController_export", "parameters": [], "responses": { "200": { "description": "tar.gz 归档字节流" } }, "summary": "导出 tar.gz:audit.jsonl + runtime.log + diagnose.json + export-range.json。取「最近 24h」与「50MB」先到者,实际截取范围写在 export-range.json 里。", "tags": [ "system" ] } }, "/api/access/unlock": { "post": { "operationId": "AccessController_unlock", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnlockRequestDto" } } } }, "responses": { "200": { "description": "" } }, "summary": "Submit the access passcode; sets the ap_session cookie on success", "tags": [ "access" ] } }, "/api/sse": { "get": { "operationId": "SseController_sse", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "Sse" ] } }, "/api/messages": { "post": { "operationId": "SseController_messages", "parameters": [], "responses": { "201": { "description": "" } }, "tags": [ "Sse" ] } }, "/api/mcp": { "post": { "operationId": "StreamableHttpController_handlePostRequest", "parameters": [], "responses": { "201": { "description": "" } }, "tags": [ "StreamableHttp" ] }, "get": { "operationId": "StreamableHttpController_handleGetRequest", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "StreamableHttp" ] }, "delete": { "operationId": "StreamableHttpController_handleDeleteRequest", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "StreamableHttp" ] } }, "/api/projects": { "post": { "operationId": "ProjectController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProjectDto" } } } }, "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseDto" } } } }, "409": { "description": "a project with that name already exists (I-PRJ-4)" } }, "summary": "Create a project (git ⇒ async clone, empty ⇒ ready); always 202", "tags": [ "project" ] }, "get": { "operationId": "ProjectController_list", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectResponseDto" } } } } } }, "summary": "List all projects", "tags": [ "project" ] } }, "/api/projects/{id}": { "get": { "operationId": "ProjectController_get", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseDto" } } } } }, "summary": "Get a project by id", "tags": [ "project" ] }, "delete": { "operationId": "ProjectController_delete", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteProjectDto" } } } }, "responses": { "204": { "description": "" } }, "summary": "Delete a project (optionally keeping its baseline)", "tags": [ "project" ] } }, "/api/projects/{id}/retry-clone": { "post": { "operationId": "ProjectController_retryClone", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseDto" } } } } }, "summary": "Retry a failed clone", "tags": [ "project" ] } }, "/api/projects/{id}/convert-to-empty": { "post": { "operationId": "ProjectController_convertToEmpty", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseDto" } } } } }, "summary": "Convert a failed git project into an empty one", "tags": [ "project" ] } }, "/api/projects/{id}/cancel-clone": { "post": { "operationId": "ProjectController_cancelClone", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseDto" } } } } }, "summary": "Cancel an in-progress clone", "tags": [ "project" ] } }, "/api/projects/{id}/branches": { "get": { "operationId": "ProjectController_listBranches", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } } }, "summary": "List the branches in the project's baseline (local refs; no network)", "tags": [ "project" ] } }, "/api/projects/{id}/sync": { "post": { "operationId": "ProjectController_sync", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponseDto" } } } }, "409": { "description": "the project is not ready (or has no remote)" } }, "summary": "Sync the baseline from its remote (git fetch --all)", "tags": [ "project" ] } }, "/api/projects/{id}/deletion-preview": { "get": { "operationId": "ProjectController_deletionPreview", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDeletionPreviewResponseDto" } } } } }, "summary": "Read authoritative project deletion blockers and consequence counts", "tags": [ "project" ] } }, "/api/retained-volumes": { "get": { "operationId": "RetainedVolumeController_list", "parameters": [ { "name": "projectId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RetainedVolumeResponseDto" } } } } } }, "summary": "List retained workspace volumes (cleaned-up ones excluded)", "tags": [ "project" ] } }, "/api/retained-volumes/{id}": { "delete": { "operationId": "RetainedVolumeController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" }, "404": { "description": "unknown id, or already cleaned up (I-RV-2)" } }, "summary": "Delete a retained volume now (the record stays, for audit)", "tags": [ "project" ] } }, "/api/retained-volumes/{id}/archive": { "get": { "operationId": "RetainedVolumeController_archive", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Uncompressed tar bytes (application/x-tar)", "headers": { "content-length": { "required": true, "description": "Exact archive size in bytes. It is computable BEFORE the first byte is sent precisely because the archive is not compressed — that is what keeps the browser's native download progress bar working.", "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } }, "404": { "description": "unknown id, already cleaned up, or gone from disk" } }, "summary": "Download the whole retained volume as an uncompressed tar stream", "tags": [ "project" ] } }, "/api/sandboxes": { "post": { "operationId": "SandboxController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSandboxDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SandboxResponseDto" } } } } }, "summary": "Create a sandbox (Task)", "tags": [ "sandbox" ] }, "get": { "operationId": "SandboxController_list", "parameters": [ { "name": "projectId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SandboxResponseDto" } } } } } }, "summary": "List sandboxes, optionally filtered by projectId", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}": { "get": { "operationId": "SandboxController_get", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SandboxResponseDto" } } } } }, "summary": "Get a sandbox by id", "tags": [ "sandbox" ] }, "delete": { "operationId": "SandboxController_destroy", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DestroySandboxDto" } } } }, "responses": { "204": { "description": "" } }, "summary": "Destroy a sandbox (optionally keeping its workspace)", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/start": { "post": { "operationId": "SandboxController_start", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SandboxResponseDto" } } } } }, "summary": "Start a stopped sandbox. Returns as soon as the start is accepted; progress on WS.", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/stop": { "post": { "operationId": "SandboxController_stop", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SandboxResponseDto" } } } } }, "summary": "Stop a running sandbox, keeping its instance and workspace", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/exec": { "post": { "operationId": "SandboxController_exec", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecInSandboxDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecResultResponseDto" } } } } }, "summary": "Run one non-interactive command in a sandbox (TTY goes over WS)", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/runtimes/{rt}/tasks": { "post": { "operationId": "AgentTaskController_run", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunAgentTaskDto" } } } }, "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTaskResponseDto" } } } } }, "summary": "Start a headless agent Task in a sandbox", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/tasks": { "get": { "operationId": "AgentTaskController_list", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgentTaskResponseDto" } } } } } }, "summary": "List the headless Tasks of a sandbox, newest first", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/tasks/{taskId}": { "get": { "operationId": "AgentTaskController_get", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "taskId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTaskResponseDto" } } } } }, "summary": "Get a headless Task by id", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/tasks/{taskId}/cancel": { "post": { "operationId": "AgentTaskController_cancel", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "taskId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTaskResponseDto" } } } } }, "summary": "Ask a running headless Task to stop (SIGTERM → 5s → SIGKILL)", "tags": [ "sandbox" ] } }, "/api/sandboxes/{id}/tasks/{taskId}/artifacts/{name}": { "get": { "operationId": "AgentTaskController_artifact", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "taskId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Raw artifact bytes (application/octet-stream)", "headers": { "content-length": { "required": false, "description": "Total bytes, present only when the platform could measure the file without guessing (a finished Task whose file plane reported a size). A client MUST treat its absence as normal and stream without a progress indicator.", "schema": { "type": "integer", "format": "int64", "minimum": 0 } } } } }, "summary": "Download one artifact a headless Task produced", "tags": [ "sandbox" ] } }, "/api/providers": { "get": { "operationId": "ProviderController_list", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProviderResponseDto" } } } } } }, "summary": "List registered sandbox providers with their capabilities", "tags": [ "sandbox" ] } }, "/api/credentials": { "get": { "operationId": "CredentialController_list", "parameters": [ { "name": "kind", "required": true, "in": "query", "schema": { "enum": [ "git" ], "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MaskedGitCredentialResponseDto" } } } } } }, "summary": "List git credentials (masked). `kind` is required and must be `git`.", "tags": [ "credential" ] } }, "/api/credentials/git": { "post": { "operationId": "CredentialController_store", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGitCredentialDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreGitCredentialResponseDto" } } } } }, "summary": "Store a git credential (ssh-key / https-token); same-protocol = replace", "tags": [ "credential" ] } }, "/api/credentials/git/test": { "post": { "operationId": "CredentialController_test", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/InlineGitTestDto" }, { "$ref": "#/components/schemas/StoredGitTestDto" } ], "discriminator": { "propertyName": "source", "mapping": { "inline": "#/components/schemas/InlineGitTestDto", "stored": "#/components/schemas/StoredGitTestDto" } } } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GitTestResultResponseDto" } } } } }, "summary": "Test a git credential via ls-remote (15s); inline (test-before-save) or stored; never returns refs", "tags": [ "credential" ] } }, "/api/credentials/git/{id}": { "delete": { "operationId": "CredentialController_revoke", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "summary": "Revoke a git credential (wipes ciphertext, keeps audit metadata)", "tags": [ "credential" ] } }, "/api/runtimes": { "get": { "operationId": "RuntimeController_list", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RuntimeResponseDto" } } } } } }, "summary": "List runtimes with aggregated credential status (no N+1)", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/credentials/status": { "get": { "operationId": "RuntimeController_status", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RuntimeResponseDto" } } } } }, "summary": "Single-runtime credential status (never returns plaintext)", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/auth/begin": { "post": { "operationId": "RuntimeController_beginAuth", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BeginAuthDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthChallengeResponseDto" } } } } }, "summary": "Start an interactive login in the auth helper (no sandbox)", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/auth/sessions/{challengeRef}": { "delete": { "operationId": "RuntimeController_cancelAuth", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "challengeRef", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "summary": "Cancel an interactive login and reclaim its helper process and temporary files", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/auth/status": { "get": { "operationId": "RuntimeController_pollStatus", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "challengeRef", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthStatusResultResponseDto" } } } } }, "summary": "Poll a device-code login (pending/success/expired/error)", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/auth/complete": { "post": { "operationId": "RuntimeController_completeAuth", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteAuthDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaskedCredentialResultResponseDto" } } } } }, "summary": "Submit the pasted setup-token code (written to helper stdin)", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/credentials/secret": { "post": { "operationId": "RuntimeController_submitSecret", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitSecretDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MaskedCredentialResultResponseDto" } } } } }, "summary": "Store a pasted secret directly — api-key or access-token (no helper/pty)", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/auth-mode": { "put": { "operationId": "RuntimeController_setAuthMode", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetAuthModeDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RuntimeSettingsResponseDto" } } } } }, "summary": "Switch the effective mode (account|api-key); 409 if unconfigured", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/credentials/{credentialId}/deletion-preview": { "get": { "operationId": "RuntimeController_deletionPreview", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "credentialId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RuntimeCredentialDeletionPreviewResponseDto" } } } } }, "summary": "List tasks actually bound to this credential and tasks still preparing, without decrypting secrets", "tags": [ "runtime" ] } }, "/api/runtimes/{rt}/credentials/{credentialId}": { "delete": { "operationId": "RuntimeController_revoke", "parameters": [ { "name": "rt", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "credentialId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "summary": "Revoke a runtime credential (restarts bound live sandboxes)", "tags": [ "runtime" ] } }, "/api/images": { "get": { "operationId": "ImageController_list", "parameters": [ { "name": "provider", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "runtimeId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ImageManifestResponseDto" } } } } } }, "summary": "List image manifests. `runtimeId` alone returns selectable versions. `provider` returns history with compatibility and the configured default, including disabled and invalid versions for the task-image selector.", "tags": [ "image" ] }, "post": { "operationId": "ImageController_register", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterImageDto" } } } }, "responses": { "200": { "description": "this digest was already known", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterImageResponseDto" } } } }, "201": { "description": "a new manifest row", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterImageResponseDto" } } } } }, "summary": "Register an image: resolve → validate → freeze the digest", "tags": [ "image" ] } }, "/api/images/validate": { "post": { "operationId": "ImageController_validate", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterImageDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationOutcomeResponseDto" } } } } }, "summary": "Pre-flight validate a reference — never persists a manifest", "tags": [ "image" ] } }, "/api/images/{id}/deletion-preview": { "get": { "operationId": "ImageController_deletionPreview", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageDeletionPreviewResponseDto" } } } } }, "summary": "Read versions and non-destroyed task references before deleting one image manifest", "tags": [ "image" ] } }, "/api/images/{id}/validate": { "post": { "operationId": "ImageController_revalidate", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevalidateOutcomeResponseDto" } } } } }, "summary": "Re-validate a registered manifest (04 §7 时刻②). A digest change is reported old → new — it is a coordinate migration, not a 「refresh succeeded」.", "tags": [ "image" ] } }, "/api/images/{id}": { "patch": { "operationId": "ImageController_patch", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchImageDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageManifestResponseDto" } } } } }, "summary": "Update alias on the shared Image, or version fields (isActive:false | imageConfig). `isActive:true` is refused with 400 pointing at /activate.", "tags": [ "image" ] }, "delete": { "operationId": "ImageController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "summary": "Hard-delete a manifest row; 409 when referenced or built-in", "tags": [ "image" ] } }, "/api/images/{id}/activate": { "post": { "operationId": "ImageController_activate", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageManifestResponseDto" } } } } }, "summary": "Make this row the current version of its tag — the same action for 「更新到新版本」 and 「回滚到旧版本」, in one transaction.", "tags": [ "image" ] } }, "/api/images/{id}/check-update": { "post": { "operationId": "ImageController_checkUpdate", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckImageUpdateResponseDto" } } } } }, "summary": "Re-resolve this row’s tag and compare digests. Stores nothing; 409 when the row is pinned by digest (no tag to re-resolve).", "tags": [ "image" ] } }, "/api/projects/{id}/automations": { "get": { "operationId": "ProjectAutomationController_list", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AutomationResponseDto" } } } } } }, "summary": "List a project's automation rules", "tags": [ "automation" ] }, "post": { "operationId": "ProjectAutomationController_create", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAutomationDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationResponseDto" } } } }, "404": { "description": "unknown project" }, "409": { "description": "AUTOMATION_LIMIT_REACHED — 20 rules per project (I-AUT-7)" } }, "summary": "Create an automation rule (timezone is snapshotted here)", "tags": [ "automation" ] } }, "/api/automations/{id}/deletion-preview": { "get": { "operationId": "AutomationController_deletionPreview", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationDeletionPreviewResponseDto" } } } } }, "summary": "Read authoritative run, artifact and active task deletion consequences", "tags": [ "automation" ] } }, "/api/automations/attention": { "get": { "operationId": "AutomationController_listAttention", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AutomationAttentionItemResponseDto" } } } } } }, "summary": "List degraded and automatically disabled rules across all projects", "tags": [ "automation" ] } }, "/api/automations/webhook-test": { "post": { "operationId": "AutomationController_webhookTest", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookTestRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookTestResultDto" } } } } }, "summary": "Send a sample webhook payload (same timeout + SSRF policy)", "tags": [ "automation" ] } }, "/api/automations/runs/{runId}": { "get": { "operationId": "AutomationController_getRun", "parameters": [ { "name": "runId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationRunResponseDto" } } } }, "404": { "description": "" } }, "summary": "Get one automation run", "tags": [ "automation" ] } }, "/api/automations/runs/{runId}/logs": { "get": { "operationId": "AutomationController_readRunLogs", "parameters": [ { "name": "runId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": false, "in": "query", "description": "absent ⇒ the trailing `limit` bytes", "schema": { "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "default 65536, max 1048576", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Raw log bytes as UTF-8 text", "headers": { "x-log-offset": { "description": "first byte of this slice", "schema": { "type": "integer" } }, "x-log-total": { "description": "total bytes on disk", "schema": { "type": "integer" } }, "x-log-eof": { "description": "\"true\" when this slice reaches EOF", "schema": { "type": "string" } } } }, "404": { "description": "" } }, "summary": "Read a byte range of a run log (defaults to the trailing 64KB)", "tags": [ "automation" ] } }, "/api/automations/{id}": { "get": { "operationId": "AutomationController_get", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationResponseDto" } } } }, "404": { "description": "" } }, "summary": "Get an automation rule", "tags": [ "automation" ] }, "put": { "operationId": "AutomationController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAutomationDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationResponseDto" } } } }, "404": { "description": "" } }, "summary": "Update a rule — omitting `timezone` keeps the snapshot (I-AUT-9)", "tags": [ "automation" ] }, "delete": { "operationId": "AutomationController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" }, "404": { "description": "" } }, "summary": "Delete a rule (its run history cascades)", "tags": [ "automation" ] } }, "/api/automations/{id}/enable": { "post": { "operationId": "AutomationController_enable", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationResponseDto" } } } }, "404": { "description": "" } }, "summary": "Re-enable a rule (clears failure count and the degraded flag)", "tags": [ "automation" ] } }, "/api/automations/{id}/disable": { "post": { "operationId": "AutomationController_disable", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationResponseDto" } } } }, "404": { "description": "" } }, "summary": "Disable a rule", "tags": [ "automation" ] } }, "/api/automations/{id}/runs": { "get": { "operationId": "AutomationController_listRuns", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "before", "required": false, "in": "query", "description": "run id; returns strictly older ones", "schema": { "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "default 20, max 100", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedAutomationRunsDto" } } } }, "404": { "description": "" } }, "summary": "List a rule’s run history, newest first (cursor)", "tags": [ "automation" ] } }, "/api/health": { "get": { "operationId": "HealthController_health", "parameters": [], "responses": { "200": { "description": "" } }, "summary": "Liveness probe (passcode-exempt)", "tags": [ "system" ] } }, "/api/system/init-status": { "get": { "operationId": "SystemController_initStatus", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InitStatusResponseDto" } } } } }, "summary": "冷启动首屏据此决定是否进初始化向导;附上次出网检测结果(不重跑检测,进向导直接渲染历史结果)", "tags": [ "system" ] } }, "/api/system/init": { "post": { "operationId": "SystemController_initialize", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InitRequestDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InitStatusResponseDto" } } } } }, "summary": "完成初始化:跑一轮出网检测(复用 /diagnose 的探测)+ 存代理 + 写 initialized=true。一次性操作,已初始化返 409", "tags": [ "system" ] } }, "/api/system/settings": { "get": { "operationId": "SystemController_getSettings", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SystemSettingsResponseDto" } } } } }, "summary": "运行期配置(代理 / 公开地址 / 版本)。⛔ 永不回显口令 hash", "tags": [ "system" ] }, "put": { "operationId": "SystemController_updateSettings", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSystemSettingsDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SystemSettingsResponseDto" } } } } }, "summary": "改运行期配置(proxyConfig / publicBaseUrl;null=清空,缺席=不改)。⚠️ 不写 initialized", "tags": [ "system" ] } }, "/api/system/access-passcode": { "put": { "operationId": "SystemController_setAccessPasscode", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessPasscodeRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessPasscodeResponseDto" } } } } }, "summary": "启用 / 重新生成 / 关闭访问口令。enable+regenerate 一次性返回 16 位明文,此后只存 hash;重新生成默认保留会话,invalidateSessions=true 使旧会话失效并为发起浏览器签发新会话", "tags": [ "system" ] } }, "/api/system/resources": { "get": { "operationId": "SystemController_getResources", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SystemResourcesResponseDto" } } } } }, "summary": "CPU / RAM / 磁盘水位 + 保留卷占用 + 活跃 Task 数", "tags": [ "system" ] } }, "/api/system/version": { "get": { "operationId": "SystemController_getVersion", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SystemVersionResponseDto" } } } } }, "summary": "当前实例的版本三元组(构建期注入)。⏳ 不含「检查更新」——那是 21-8 §4 的 v1.5 区块,缺的是更新源的裁决不是代码", "tags": [ "system" ] } }, "/api/system/providers": { "get": { "operationId": "SystemController_getProviders", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SystemProvidersResponseDto" } } } } }, "summary": "运维看板:已注册 provider / runtime / imageSpec + capabilities + 健康与最近 1h 失败率。⚠️ 与 GET /api/providers 是两个端点", "tags": [ "system" ] } }, "/api/system/providers/{id}/logs": { "get": { "operationId": "SystemController_getProviderLogs", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderLogsResponseDto" } } } } }, "summary": "读取指定沙箱环境最近20行运行日志;不可用时返回原因", "tags": [ "system" ] } }, "/api/system/diagnose": { "post": { "operationId": "SystemController_diagnose", "parameters": [], "responses": { "200": { "description": "SSE 帧流:event: start / check / done。帧的 TypeScript 类型是手写的(两仓 sse-protocol.ts,B5 跨仓对账),openapi 只声明 content-type", "content": { "text/event-stream": { "schema": { "type": "string" } } } } }, "summary": "逐项诊断,SSE 流式(帧类型见两仓 sse-protocol.ts)。各项并行、单项时限由 PARAM.DIAG_ITEM_TIMEOUT_MS 与首帧 timeoutMs 给出,整轮约等于最慢那项;断连即中止剩余检查", "tags": [ "system" ] } }, "/api/system/preset-image/provision": { "post": { "operationId": "SystemController_provisionPresetImage", "parameters": [], "responses": { "200": { "description": "SSE 帧流:event: stage(plan/fetch/verify/load/register)+ done。帧类型手写于两仓 sse-protocol.ts", "content": { "text/event-stream": { "schema": { "type": "string" } } } } }, "summary": "把预制镜像搬到位(只搬不建):本机 docker 库已有 ⇒ 直接推;发布资产清单命中 ⇒ 校验 sha256 后装载再推。搬不了返 409,已在搬返 409(两个码)", "tags": [ "system" ] } }, "/api/deployment/status": { "get": { "operationId": "DeploymentController_status", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentStatusDto" } } } } }, "summary": "Read-only deployment barrier, idle blockers and DB/SDK/image-registration readiness (no VM probe)", "tags": [ "system" ] } } }, "info": { "title": "Agent Platform API", "description": "", "version": "0.0.1", "contact": {} }, "tags": [], "servers": [], "components": { "schemas": { "AuditListResponseDto": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "seq": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "at": { "type": "string", "format": "date-time" }, "category": { "type": "string", "enum": [ "sandbox", "project", "credential", "image", "system" ] }, "type": { "type": "string" }, "severity": { "type": "string", "enum": [ "info", "warn", "error" ] }, "subjectType": { "type": "string" }, "subjectId": { "type": "string" }, "actor": { "type": "string", "minLength": 1 }, "summary": { "type": "string" }, "detail": { "type": "object", "additionalProperties": {} }, "durationMs": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "outcome": { "type": "string", "enum": [ "ok", "failed", "skipped" ] }, "errorCode": { "type": "string" } }, "required": [ "seq", "at", "category", "type", "severity", "actor", "summary" ] } }, "hasMore": { "type": "boolean" } }, "required": [ "items", "hasMore" ] }, "UnlockRequestDto": { "type": "object", "properties": { "passcode": { "type": "string", "minLength": 1 } }, "required": [ "passcode" ] }, "CreateProjectDto": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 40 }, "sourceType": { "type": "string", "enum": [ "git", "empty" ] }, "repoUrl": { "type": "string", "minLength": 1, "maxLength": 2048 }, "repoBranch": { "type": "string", "minLength": 1, "maxLength": 255 } }, "required": [ "name", "sourceType" ] }, "ProjectResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "sourceType": { "type": "string", "enum": [ "git", "empty" ] }, "cloneStatus": { "type": "string", "enum": [ "cloning", "ready", "failed" ] }, "cloneErrorCode": { "type": "string", "enum": [ "CLONE_FAILED_PERMISSION", "CLONE_FAILED_NOT_FOUND", "CLONE_FAILED_NETWORK", "TIMEOUT", "INTERRUPTED", "DISK_INSUFFICIENT" ], "nullable": true }, "taskCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "createdAt": { "type": "string", "format": "date-time" }, "repoUrl": { "type": "string" }, "repoBranch": { "type": "string" }, "baselineSizeBytes": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "name", "sourceType", "cloneStatus", "cloneErrorCode", "taskCount", "createdAt", "updatedAt" ] }, "DeleteProjectDto": { "type": "object", "properties": { "keepBaseline": { "type": "boolean" } } }, "ProjectDeletionPreviewResponseDto": { "type": "object", "properties": { "activeTasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } }, "retainedVolumeCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "automationCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "automationRunCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "taskCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "activeTasks", "retainedVolumeCount", "automationCount", "automationRunCount", "taskCount" ] }, "RetainedVolumeResponseDto": { "type": "object", "properties": { "sandboxName": { "type": "string" }, "sourceAutomationId": { "type": "string" }, "sourceAutomationName": { "type": "string" }, "id": { "type": "string" }, "projectId": { "type": "string" }, "sandboxId": { "type": "string" }, "source": { "type": "string", "enum": [ "manual-destroy", "automation-artifact" ] }, "retainedAt": { "type": "string", "format": "date-time" }, "retainUntil": { "type": "string", "format": "date-time" }, "diskBytes": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "downloadBytes": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "id", "projectId", "source", "retainedAt", "retainUntil", "diskBytes", "downloadBytes" ] }, "CreateSandboxDto": { "type": "object", "properties": { "projectId": { "type": "string", "minLength": 1 }, "branch": { "type": "string", "minLength": 1, "maxLength": 255 }, "runtime": { "type": "string", "minLength": 1 }, "image": { "type": "string" }, "provider": { "type": "string" }, "initialPrompt": { "type": "string" }, "headless": { "type": "boolean" }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ] }, "require": { "type": "object", "properties": { "spawnTty": { "type": "boolean" }, "volumeMount": { "type": "boolean" }, "updateResources": { "type": "boolean" }, "pauseResume": { "type": "boolean" }, "snapshot": { "type": "boolean" } } } }, "required": [ "projectId", "runtime" ] }, "SandboxResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "runtime": { "type": "string" }, "availableRuntimes": { "type": "array", "items": { "type": "string" } }, "provider": { "type": "string" }, "image": { "type": "string" }, "imageId": { "type": "string" }, "imageDigest": { "type": "string" }, "imageIsBuiltin": { "type": "boolean" }, "name": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "scheduling", "preparing-workspace", "creating", "starting", "running", "idle", "stopping", "stopped", "failed", "destroying", "destroyed" ] }, "headless": { "type": "boolean" }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ], "nullable": true }, "idleTimeoutSec": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "waitingInput": { "type": "boolean" }, "version": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "failureCode": { "type": "string" }, "failureOperation": { "type": "string", "enum": [ "provision", "start", "stop", "destroy" ] }, "sourceAutomationId": { "type": "string" }, "sourceAutomationName": { "type": "string" }, "hasRun": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "failureMessage": { "type": "string" }, "health": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "healthy", "unhealthy", "unknown", "starting" ] }, "lastCheckedAt": { "type": "string" }, "message": { "type": "string" }, "consecutiveFailures": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "state", "lastCheckedAt", "consecutiveFailures" ] } }, "required": [ "id", "projectId", "runtime", "availableRuntimes", "provider", "name", "status", "headless", "timeoutMinutes", "idleTimeoutSec", "waitingInput", "version" ] }, "ExecInSandboxDto": { "type": "object", "properties": { "command": { "type": "string", "minLength": 1, "maxLength": 8000 } }, "required": [ "command" ] }, "ExecResultResponseDto": { "type": "object", "properties": { "stdout": { "type": "string" }, "stderr": { "type": "string" }, "exitCode": { "type": "integer" } }, "required": [ "stdout", "stderr", "exitCode" ] }, "DestroySandboxDto": { "type": "object", "properties": { "keepVolume": { "type": "boolean" } } }, "RunAgentTaskDto": { "type": "object", "properties": { "prompt": { "type": "string", "minLength": 1 }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ] }, "resumeFrom": { "type": "string", "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-7][0-9A-HJKMNP-TV-Z]{25})$" }, "extraArgs": { "type": "array", "maxItems": 4, "items": { "type": "string", "enum": [ "--verbose" ] } } }, "required": [ "prompt" ] }, "AgentTaskResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "sandboxId": { "type": "string" }, "runtime": { "type": "string" }, "status": { "type": "string", "enum": [ "running", "succeeded", "failed", "killed", "timed_out" ] }, "exitCode": { "type": "integer" }, "sessionRef": { "type": "string" }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ] }, "lastSeq": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "artifacts": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "size": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "modifiedAt": { "type": "string", "format": "date-time" } }, "required": [ "name", "size" ] } }, "errorCode": { "type": "string", "enum": [ "TASK_FAILED", "TASK_KILLED", "TASK_TIMED_OUT", "SANDBOX_GONE", "RESUME_FAILED", "UNKNOWN_RUNTIME", "IMAGE_PULL_FAILED", "IMAGE_DIGEST_GONE", "RESOURCE_EXHAUSTED", "NOT_FOUND", "ALREADY_EXISTS", "TIMEOUT", "PERMISSION_DENIED", "INVALID_STATE", "PROVIDER_UNAVAILABLE", "UNSUPPORTED_CAPABILITY", "INTERNAL" ] }, "startedAt": { "type": "string", "format": "date-time" }, "finishedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "sandboxId", "runtime", "status", "timeoutMinutes", "lastSeq", "artifacts", "startedAt" ] }, "ProviderResponseDto": { "type": "object", "properties": { "name": { "type": "string" }, "capabilities": { "type": "object", "properties": { "spawnTty": { "type": "boolean" }, "volumeMount": { "type": "boolean" }, "updateResources": { "type": "boolean" }, "pauseResume": { "type": "boolean" }, "snapshot": { "type": "boolean" }, "watchEvents": { "type": "boolean" }, "headlessTask": { "type": "boolean" } }, "required": [ "spawnTty", "volumeMount", "updateResources", "pauseResume", "snapshot", "watchEvents", "headlessTask" ] }, "isDefault": { "type": "boolean" } }, "required": [ "name", "capabilities", "isDefault" ] }, "MaskedGitCredentialResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "git" ] }, "type": { "type": "string", "enum": [ "ssh-key", "https-token" ] }, "maskedIdentifier": { "type": "string" }, "platform": { "type": "string", "enum": [ "github", "gitlab", "gitee", "gitea", "other" ] }, "allowedHosts": { "type": "array", "items": { "type": "string" } }, "knownHosts": { "type": "array", "items": { "type": "object", "properties": { "host": { "type": "string" }, "keyType": { "type": "string" }, "fingerprint": { "type": "string" }, "firstSeenAt": { "type": "string", "format": "date-time" } }, "required": [ "host", "keyType", "fingerprint", "firstSeenAt" ] } }, "lastUsedAt": { "type": "string", "format": "date-time", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "kind", "type", "maskedIdentifier", "allowedHosts", "createdAt" ] }, "CreateGitCredentialDto": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ssh-key", "https-token" ] }, "secret": { "type": "string", "minLength": 1 }, "platform": { "type": "string", "enum": [ "github", "gitlab", "gitee", "gitea", "other" ] }, "allowedHosts": { "type": "array", "items": { "type": "string" }, "default": [] } }, "required": [ "type", "secret" ] }, "StoreGitCredentialResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "maskedIdentifier": { "type": "string" } }, "required": [ "id", "maskedIdentifier" ] }, "InlineGitTestDto": { "type": "object", "properties": { "source": { "type": "string", "enum": [ "inline" ] }, "type": { "type": "string", "enum": [ "ssh-key", "https-token" ] }, "secret": { "type": "string", "minLength": 1 }, "platform": { "type": "string", "enum": [ "github", "gitlab", "gitee", "gitea", "other" ] }, "allowedHosts": { "type": "array", "items": { "type": "string" }, "default": [] }, "repoUrl": { "type": "string", "minLength": 1, "maxLength": 2048 } }, "required": [ "source", "type", "secret" ] }, "StoredGitTestDto": { "type": "object", "properties": { "source": { "type": "string", "enum": [ "stored" ] }, "credentialId": { "type": "string" }, "repoUrl": { "type": "string", "minLength": 1, "maxLength": 2048 } }, "required": [ "source", "credentialId" ] }, "GitTestResultResponseDto": { "type": "object", "properties": { "ok": { "type": "boolean" }, "errorCode": { "type": "string", "enum": [ "CLONE_FAILED_PERMISSION", "CLONE_FAILED_NETWORK", "TIMEOUT" ] }, "message": { "type": "string" } }, "required": [ "ok" ] }, "RuntimeResponseDto": { "type": "object", "properties": { "pendingTeardownCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "id": { "type": "string" }, "displayName": { "type": "string" }, "vendor": { "type": "string" }, "authMethods": { "type": "array", "items": { "type": "string", "enum": [ "oauth-device", "setup-token", "api-key", "access-token-paste" ] } }, "apiKeyPrefix": { "type": "string" }, "credentialStatus": { "type": "string", "enum": [ "none", "active", "expiring", "expired" ] }, "maskedIdentifier": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" }, "activeAuthMethod": { "type": "string", "enum": [ "account", "api-key" ] }, "credentials": { "type": "array", "items": { "type": "object", "properties": { "credentialId": { "type": "string" }, "mode": { "type": "string", "enum": [ "account", "api-key" ] }, "maskedIdentifier": { "type": "string" }, "status": { "type": "string", "enum": [ "ok", "expiring", "expired" ] }, "expiresAt": { "type": "string", "format": "date-time" }, "lastUsedAt": { "type": "string", "format": "date-time" } }, "required": [ "credentialId", "mode", "maskedIdentifier", "status" ] } } }, "required": [ "id", "displayName", "vendor", "authMethods", "credentialStatus", "credentials" ] }, "BeginAuthDto": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "oauth-device", "setup-token" ] } }, "required": [ "method" ] }, "AuthChallengeResponseDto": { "type": "object", "properties": { "challengeRef": { "type": "string" }, "method": { "type": "string", "enum": [ "oauth-device", "setup-token", "api-key", "access-token-paste" ] }, "kind": { "type": "string", "enum": [ "url", "device-code", "paste-prompt" ] }, "verificationUrl": { "type": "string", "format": "uri" }, "userCode": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" }, "instructions": { "type": "string" } }, "required": [ "challengeRef", "method", "kind", "instructions" ] }, "AuthStatusResultResponseDto": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "pending", "success", "expired", "error" ] }, "maskedIdentifier": { "type": "string" } }, "required": [ "status" ] }, "CompleteAuthDto": { "type": "object", "properties": { "challengeRef": { "type": "string", "minLength": 1 }, "pastedText": { "type": "string", "minLength": 1, "maxLength": 4096 }, "cancel": { "type": "boolean" } }, "required": [ "challengeRef" ] }, "MaskedCredentialResultResponseDto": { "type": "object", "properties": { "maskedIdentifier": { "type": "string" } }, "required": [ "maskedIdentifier" ] }, "SubmitSecretDto": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "api-key", "access-token-paste" ] }, "secret": { "type": "string", "minLength": 1, "maxLength": 8192 } }, "required": [ "method", "secret" ] }, "SetAuthModeDto": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "account", "api-key" ] } }, "required": [ "method" ] }, "RuntimeSettingsResponseDto": { "type": "object", "properties": { "runtimeId": { "type": "string" }, "activeAuthMethod": { "type": "string", "enum": [ "account", "api-key" ] } }, "required": [ "runtimeId", "activeAuthMethod" ] }, "RuntimeCredentialDeletionPreviewResponseDto": { "type": "object", "properties": { "affectedTasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "runtime": { "type": "string" }, "status": { "type": "string" }, "headless": { "type": "boolean" } }, "required": [ "id", "name", "runtime", "status", "headless" ] } }, "preparingTasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "runtime": { "type": "string" }, "status": { "type": "string" }, "headless": { "type": "boolean" } }, "required": [ "id", "name", "runtime", "status", "headless" ] } } }, "required": [ "affectedTasks", "preparingTasks" ] }, "ImageManifestResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "imageId": { "type": "string" }, "imageName": { "type": "string" }, "imageAlias": { "type": "string", "nullable": true }, "isBuiltin": { "type": "boolean" }, "ref": { "type": "string" }, "version": { "type": "string" }, "baseImage": { "type": "string" }, "digest": { "type": "string" }, "entrypointContract": { "type": "object", "properties": { "workdir": { "type": "string" }, "entrypoint": { "type": "array", "items": { "type": "string" } }, "healthcheckCmd": { "type": "array", "items": { "type": "string" } } }, "required": [ "workdir", "entrypoint" ] }, "supportedRuntimes": { "type": "array", "items": { "type": "string" } }, "providerCompatibility": { "type": "object", "additionalProperties": { "type": "boolean" } }, "isProviderDefault": { "type": "boolean" }, "resourceDefaults": { "type": "object", "properties": { "cores": { "type": "number" }, "ramMb": { "type": "number" }, "diskMb": { "type": "number" } }, "required": [ "cores", "ramMb", "diskMb" ] }, "labelsRequired": { "type": "array", "items": { "type": "string" } }, "derivedFromDigest": { "type": "string", "nullable": true }, "validationStatus": { "type": "string", "enum": [ "pending", "valid", "warning", "invalid" ] }, "validationErrors": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] }, "nullable": true }, "isActive": { "type": "boolean" }, "imageConfig": { "type": "object", "properties": { "env": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "secret": { "type": "boolean" } }, "required": [ "key", "value", "secret" ] } }, "cmdOverride": { "type": "array", "items": { "type": "string" } } }, "required": [ "env" ], "nullable": true }, "registeredAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "imageId", "imageName", "imageAlias", "isBuiltin", "ref", "version", "baseImage", "digest", "entrypointContract", "supportedRuntimes", "resourceDefaults", "labelsRequired", "derivedFromDigest", "validationStatus", "validationErrors", "isActive", "imageConfig", "registeredAt", "resolvedAt" ] }, "RegisterImageDto": { "type": "object", "properties": { "ref": { "type": "string", "minLength": 1, "maxLength": 512 }, "copyConfigFromId": { "type": "string", "minLength": 1 }, "alias": { "type": "string", "nullable": true } }, "required": [ "ref" ] }, "RegisterImageResponseDto": { "type": "object", "properties": { "manifest": { "type": "object", "properties": { "id": { "type": "string" }, "imageId": { "type": "string" }, "imageName": { "type": "string" }, "imageAlias": { "type": "string", "nullable": true }, "isBuiltin": { "type": "boolean" }, "ref": { "type": "string" }, "version": { "type": "string" }, "baseImage": { "type": "string" }, "digest": { "type": "string" }, "entrypointContract": { "type": "object", "properties": { "workdir": { "type": "string" }, "entrypoint": { "type": "array", "items": { "type": "string" } }, "healthcheckCmd": { "type": "array", "items": { "type": "string" } } }, "required": [ "workdir", "entrypoint" ] }, "supportedRuntimes": { "type": "array", "items": { "type": "string" } }, "providerCompatibility": { "type": "object", "additionalProperties": { "type": "boolean" } }, "isProviderDefault": { "type": "boolean" }, "resourceDefaults": { "type": "object", "properties": { "cores": { "type": "number" }, "ramMb": { "type": "number" }, "diskMb": { "type": "number" } }, "required": [ "cores", "ramMb", "diskMb" ] }, "labelsRequired": { "type": "array", "items": { "type": "string" } }, "derivedFromDigest": { "type": "string", "nullable": true }, "validationStatus": { "type": "string", "enum": [ "pending", "valid", "warning", "invalid" ] }, "validationErrors": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] }, "nullable": true }, "isActive": { "type": "boolean" }, "imageConfig": { "type": "object", "properties": { "env": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "secret": { "type": "boolean" } }, "required": [ "key", "value", "secret" ] } }, "cmdOverride": { "type": "array", "items": { "type": "string" } } }, "required": [ "env" ], "nullable": true }, "registeredAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "imageId", "imageName", "imageAlias", "isBuiltin", "ref", "version", "baseImage", "digest", "entrypointContract", "supportedRuntimes", "resourceDefaults", "labelsRequired", "derivedFromDigest", "validationStatus", "validationErrors", "isActive", "imageConfig", "registeredAt", "resolvedAt" ] }, "validation": { "type": "object", "properties": { "digest": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "valid", "warning", "invalid" ] }, "errors": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } }, "required": [ "status", "errors", "warnings" ] } }, "required": [ "manifest", "validation" ] }, "ValidationOutcomeResponseDto": { "type": "object", "properties": { "digest": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "valid", "warning", "invalid" ] }, "errors": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } }, "required": [ "status", "errors", "warnings" ] }, "ImageDeletionPreviewResponseDto": { "type": "object", "properties": { "canDelete": { "type": "boolean" }, "tasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "oneOf": [ { "type": "string", "enum": [ "pending", "scheduling", "preparing-workspace", "creating", "starting", "running", "idle", "stopping", "stopped", "failed", "destroying", "destroyed" ] }, { "type": "string", "enum": [ "waiting_input" ] } ] }, "projectId": { "type": "string" }, "projectName": { "type": "string" } }, "required": [ "id", "name", "status", "projectId", "projectName" ] } }, "versions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "digest": { "type": "string" }, "isActive": { "type": "boolean" } }, "required": [ "id", "version", "digest", "isActive" ] } } }, "required": [ "canDelete", "tasks", "versions" ] }, "RevalidateOutcomeResponseDto": { "type": "object", "properties": { "digest": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "valid", "warning", "invalid" ] }, "errors": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } }, "currentDigest": { "type": "string" }, "upstreamDigest": { "type": "string" }, "digestChanged": { "type": "boolean" } }, "required": [ "status", "errors", "warnings", "currentDigest", "upstreamDigest", "digestChanged" ] }, "PatchImageDto": { "type": "object", "properties": { "isActive": { "type": "boolean" }, "imageConfig": { "type": "object", "properties": { "env": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "secret": { "type": "boolean" } }, "required": [ "key", "value" ] } }, "cmdOverride": { "type": "array", "items": { "type": "string" } } }, "required": [ "env" ] }, "alias": { "type": "string", "nullable": true } } }, "CheckImageUpdateResponseDto": { "type": "object", "properties": { "current": { "type": "object", "properties": { "digest": { "type": "string" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "digest", "resolvedAt" ] }, "upstream": { "type": "object", "properties": { "digest": { "type": "string" }, "validation": { "type": "object", "properties": { "digest": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "valid", "warning", "invalid" ] }, "errors": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } } }, "required": [ "status", "errors", "warnings" ] } }, "required": [ "digest", "validation" ], "nullable": true }, "changed": { "type": "boolean" } }, "required": [ "current", "upstream", "changed" ] }, "AutomationResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "runtime": { "type": "string" }, "prompt": { "type": "string" }, "scheduleKind": { "type": "string", "enum": [ "hourly", "daily", "weekly" ] }, "scheduleConfig": { "type": "object", "properties": { "minute": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 59, "exclusiveMaximum": false }, "time": { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, "days": { "type": "array", "minItems": 1, "maxItems": 7, "items": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 6, "exclusiveMaximum": false } } } }, "timezone": { "type": "string" }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ] }, "artifactRetentionDays": { "oneOf": [ { "type": "number", "minimum": 3, "maximum": 3 }, { "type": "number", "minimum": 7, "maximum": 7 }, { "type": "number", "minimum": 30, "maximum": 30 } ] }, "webhookUrl": { "type": "string", "format": "uri" }, "triggerOn": { "type": "string", "enum": [ "failure", "success", "all" ] }, "enabled": { "type": "boolean" }, "degraded": { "type": "boolean" }, "consecutiveFailures": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "lastTriggeredAt": { "type": "string", "format": "date-time" }, "nextTriggerAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "projectId", "name", "runtime", "prompt", "scheduleKind", "scheduleConfig", "timezone", "timeoutMinutes", "artifactRetentionDays", "triggerOn", "enabled", "degraded", "consecutiveFailures", "createdAt", "updatedAt" ] }, "CreateAutomationDto": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "maxLength": 500 }, "runtime": { "type": "string", "minLength": 1 }, "prompt": { "type": "string", "minLength": 1, "maxLength": 8000 }, "scheduleKind": { "type": "string", "enum": [ "hourly", "daily", "weekly" ] }, "scheduleConfig": { "type": "object", "properties": { "minute": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 59, "exclusiveMaximum": false }, "time": { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, "days": { "type": "array", "minItems": 1, "maxItems": 7, "items": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 6, "exclusiveMaximum": false } } } }, "timezone": { "type": "string", "minLength": 1, "maxLength": 64 }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ] }, "artifactRetentionDays": { "oneOf": [ { "type": "number", "minimum": 3, "maximum": 3 }, { "type": "number", "minimum": 7, "maximum": 7 }, { "type": "number", "minimum": 30, "maximum": 30 } ] }, "webhookUrl": { "type": "string", "minLength": 1, "maxLength": 2048 }, "triggerOn": { "type": "string", "enum": [ "failure", "success", "all" ] } }, "required": [ "name", "runtime", "prompt", "scheduleKind", "scheduleConfig", "timezone", "timeoutMinutes", "artifactRetentionDays" ] }, "AutomationDeletionPreviewResponseDto": { "type": "object", "properties": { "runCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "artifactCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "runningTasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "runCount", "artifactCount", "runningTasks" ] }, "AutomationAttentionItemResponseDto": { "type": "object", "properties": { "projectId": { "type": "string" }, "projectName": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": [ "autoDisabled", "degraded" ] }, "consecutiveFailures": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "projectId", "projectName", "id", "name", "status", "consecutiveFailures" ] }, "WebhookTestRequestDto": { "type": "object", "properties": { "url": { "type": "string", "minLength": 1, "maxLength": 2048 } }, "required": [ "url" ] }, "WebhookTestResultDto": { "type": "object", "properties": { "ok": { "type": "boolean" }, "errorCode": { "type": "string", "enum": [ "VALIDATION_FAILED", "HOST_NOT_ALLOWED", "TIMEOUT", "UPSTREAM_UNAVAILABLE" ] }, "message": { "type": "string" } }, "required": [ "ok", "message" ] }, "AutomationRunResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "automationId": { "type": "string" }, "sandboxId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "running", "success", "failed", "timeout", "resource-exhausted", "skipped", "missed" ] }, "errorCode": { "type": "string", "enum": [ "PREVIOUS_RUNNING", "AUTH_EXPIRED", "RESOURCE_EXHAUSTED" ] }, "errorMessage": { "type": "string" }, "retryCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 5, "exclusiveMaximum": false }, "retryAt": { "type": "string", "format": "date-time" }, "triggeredAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "durationMs": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "outputSummary": { "type": "string" }, "webhookStatus": { "type": "string", "enum": [ "sent", "failed", "skipped" ] } }, "required": [ "id", "automationId", "status", "retryCount", "triggeredAt" ] }, "UpdateAutomationDto": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 60 }, "description": { "type": "string", "maxLength": 500 }, "runtime": { "type": "string", "minLength": 1 }, "prompt": { "type": "string", "minLength": 1, "maxLength": 8000 }, "scheduleKind": { "type": "string", "enum": [ "hourly", "daily", "weekly" ] }, "scheduleConfig": { "type": "object", "properties": { "minute": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 59, "exclusiveMaximum": false }, "time": { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" }, "days": { "type": "array", "minItems": 1, "maxItems": 7, "items": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 6, "exclusiveMaximum": false } } } }, "timezone": { "type": "string", "minLength": 1, "maxLength": 64 }, "timeoutMinutes": { "oneOf": [ { "type": "number", "minimum": 30, "maximum": 30 }, { "type": "number", "minimum": 60, "maximum": 60 }, { "type": "number", "minimum": 120, "maximum": 120 }, { "type": "number", "minimum": 240, "maximum": 240 } ] }, "artifactRetentionDays": { "oneOf": [ { "type": "number", "minimum": 3, "maximum": 3 }, { "type": "number", "minimum": 7, "maximum": 7 }, { "type": "number", "minimum": 30, "maximum": 30 } ] }, "webhookUrl": { "type": "string", "minLength": 1, "maxLength": 2048 }, "triggerOn": { "type": "string", "enum": [ "failure", "success", "all" ] } } }, "PaginatedAutomationRunsDto": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "automationId": { "type": "string" }, "sandboxId": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "running", "success", "failed", "timeout", "resource-exhausted", "skipped", "missed" ] }, "errorCode": { "type": "string", "enum": [ "PREVIOUS_RUNNING", "AUTH_EXPIRED", "RESOURCE_EXHAUSTED" ] }, "errorMessage": { "type": "string" }, "retryCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false, "maximum": 5, "exclusiveMaximum": false }, "retryAt": { "type": "string", "format": "date-time" }, "triggeredAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "durationMs": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "outputSummary": { "type": "string" }, "webhookStatus": { "type": "string", "enum": [ "sent", "failed", "skipped" ] } }, "required": [ "id", "automationId", "status", "retryCount", "triggeredAt" ] } }, "hasMore": { "type": "boolean" } }, "required": [ "items", "hasMore" ] }, "InitStatusResponseDto": { "type": "object", "properties": { "initialized": { "type": "boolean" }, "initializedAt": { "type": "string", "format": "date-time" }, "lastConnectivityCheck": { "type": "array", "items": { "type": "object", "properties": { "target": { "type": "string" }, "ok": { "type": "boolean" }, "latencyMs": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "hint": { "type": "string" }, "modelApi": { "type": "boolean" }, "timedOut": { "type": "boolean" } }, "required": [ "target", "ok", "modelApi" ] } }, "lastConnectivityCheckAt": { "type": "string", "format": "date-time" } }, "required": [ "initialized" ] }, "InitRequestDto": { "type": "object", "properties": { "proxyConfig": { "type": "object", "properties": { "httpProxy": { "type": "string", "maxLength": 2048 }, "httpsProxy": { "type": "string", "maxLength": 2048 }, "noProxy": { "type": "string", "maxLength": 2048 } } }, "acknowledgeOffline": { "type": "boolean" } } }, "SystemSettingsResponseDto": { "type": "object", "properties": { "initialized": { "type": "boolean" }, "proxyConfig": { "type": "object", "properties": { "httpProxy": { "type": "string", "maxLength": 2048 }, "httpsProxy": { "type": "string", "maxLength": 2048 }, "noProxy": { "type": "string", "maxLength": 2048 } } }, "publicBaseUrl": { "type": "string" }, "accessPasscodeEnabled": { "type": "boolean" }, "accessPasscodeUpdatedAt": { "type": "string", "format": "date-time" }, "version": { "type": "object", "properties": { "platform": { "type": "string" }, "node": { "type": "string" } }, "required": [ "platform", "node" ] } }, "required": [ "initialized", "accessPasscodeEnabled", "version" ] }, "UpdateSystemSettingsDto": { "type": "object", "properties": { "proxyConfig": { "type": "object", "properties": { "httpProxy": { "type": "string", "maxLength": 2048 }, "httpsProxy": { "type": "string", "maxLength": 2048 }, "noProxy": { "type": "string", "maxLength": 2048 } }, "nullable": true }, "publicBaseUrl": { "type": "string", "maxLength": 2048, "nullable": true } } }, "AccessPasscodeRequestDto": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "enable", "regenerate", "disable" ] }, "invalidateSessions": { "type": "boolean" } }, "required": [ "action" ] }, "AccessPasscodeResponseDto": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "passcode": { "type": "string" } }, "required": [ "enabled" ] }, "SystemResourcesResponseDto": { "type": "object", "properties": { "capacity": { "type": "object", "properties": { "remainingTasks": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "registeredTasks": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "maxTasks": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "basis": { "type": "string" } }, "required": [ "remainingTasks", "registeredTasks", "maxTasks", "basis" ] }, "cpu": { "type": "object", "properties": { "cores": { "type": "number", "minimum": 0, "exclusiveMinimum": true }, "loadAvg1m": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "usedPercent": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "level": { "type": "string", "enum": [ "ok", "warn", "critical" ] } }, "required": [ "cores", "loadAvg1m", "usedPercent", "level" ] }, "ram": { "type": "object", "properties": { "totalBytes": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "usedBytes": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "usedPercent": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "level": { "type": "string", "enum": [ "ok", "warn", "critical" ] } }, "required": [ "totalBytes", "usedBytes", "usedPercent", "level" ] }, "disk": { "type": "object", "properties": { "path": { "type": "string" }, "totalBytes": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "usedBytes": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "availableBytes": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "usedPercent": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "level": { "type": "string", "enum": [ "ok", "warn", "critical" ] }, "reservedPercent": { "type": "number", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "path", "totalBytes", "usedBytes", "availableBytes", "usedPercent", "level", "reservedPercent" ] }, "retainedVolumes": { "type": "object", "properties": { "count": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "totalBytes": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "percentOfDisk": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "level": { "type": "string", "enum": [ "ok", "warn", "critical" ] }, "oldestExpiresAt": { "type": "string", "format": "date-time" }, "truncated": { "type": "boolean" } }, "required": [ "count", "totalBytes", "percentOfDisk", "level", "truncated" ] }, "activeTasks": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "cpu", "ram", "disk", "retainedVolumes", "activeTasks" ] }, "SystemVersionResponseDto": { "type": "object", "properties": { "version": { "type": "string", "minLength": 1, "nullable": true }, "commit": { "type": "string", "minLength": 1, "nullable": true }, "builtAt": { "type": "string", "format": "date-time", "nullable": true } }, "required": [ "version", "commit", "builtAt" ] }, "SystemProvidersResponseDto": { "type": "object", "properties": { "providers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "capabilities": { "type": "object", "properties": { "spawnTty": { "type": "boolean" }, "volumeMount": { "type": "boolean" }, "updateResources": { "type": "boolean" }, "pauseResume": { "type": "boolean" }, "snapshot": { "type": "boolean" }, "watchEvents": { "type": "boolean" }, "headlessTask": { "type": "boolean" } }, "required": [ "spawnTty", "volumeMount", "updateResources", "pauseResume", "snapshot", "watchEvents", "headlessTask" ] }, "isDefault": { "type": "boolean" }, "healthy": { "type": "boolean" }, "recentFailureRate": { "type": "number", "minimum": 0, "exclusiveMinimum": false, "maximum": 1, "exclusiveMaximum": false }, "sampleSize": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "failureCount": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "id", "capabilities", "isDefault", "healthy", "sampleSize", "failureCount" ] } }, "runtimes": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "displayName": { "type": "string" }, "vendor": { "type": "string" }, "authMethods": { "type": "array", "items": { "type": "string" } }, "credentialConfigured": { "type": "boolean" } }, "required": [ "id", "displayName", "vendor", "authMethods", "credentialConfigured" ] } }, "imageSpecs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "isDefault": { "type": "boolean" } }, "required": [ "id", "isDefault" ] } }, "healthWindowMs": { "type": "integer", "minimum": 0, "exclusiveMinimum": true }, "healthWarnRate": { "type": "number", "minimum": 0, "exclusiveMinimum": false, "maximum": 1, "exclusiveMaximum": false }, "healthErrorRate": { "type": "number", "minimum": 0, "exclusiveMinimum": false, "maximum": 1, "exclusiveMaximum": false } }, "required": [ "providers", "runtimes", "imageSpecs", "healthWindowMs", "healthWarnRate", "healthErrorRate" ] }, "ProviderLogsResponseDto": { "type": "object", "properties": { "lines": { "type": "array", "items": { "type": "string" } }, "unavailableReason": { "type": "string" } }, "required": [ "lines" ] }, "DeploymentStatusDto": { "type": "object", "properties": { "ready": { "type": "boolean" }, "draining": { "type": "boolean" }, "idle": { "type": "boolean" }, "readiness": { "type": "object", "properties": { "database": { "type": "boolean" }, "provider": { "type": "boolean" }, "image": { "type": "boolean" } }, "required": [ "database", "provider", "image" ] }, "inFlightHTTP": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "activeWS": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "credentialAuth": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "blockers": { "type": "object", "properties": { "sandboxes": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "agentTasks": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "automationRuns": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "enabledAutomations": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "resourceAllocations": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "cloningProjects": { "type": "integer", "minimum": 0, "exclusiveMinimum": false }, "projectCleanupJobs": { "type": "integer", "minimum": 0, "exclusiveMinimum": false } }, "required": [ "sandboxes", "agentTasks", "automationRuns", "enabledAutomations", "resourceAllocations", "cloningProjects", "projectCleanupJobs" ] } }, "required": [ "ready", "draining", "idle", "readiness", "inFlightHTTP", "activeWS", "credentialAuth", "blockers" ] }, "ErrorEnvelope": { "type": "object", "properties": { "retryAfterSec": { "type": "number", "minimum": 0, "exclusiveMinimum": false }, "code": { "type": "string" }, "message": { "type": "string" }, "retryable": { "type": "boolean" }, "sideEffectFree": { "type": "boolean" }, "traceId": { "type": "string" }, "details": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } }, "required": [ "code", "message", "retryable" ] } } } }