{ "openapi": "3.1.0", "info": { "title": "Qwen Managed Agent Public and WebShell API", "version": "1.120.0", "description": "Canonical first-release contract for the public Managed Agent resources and the WebShell adapter. Implemented routes and fields describe the current matching Server, Broker, Harness and WebShell build. Partial entries have remaining implementation or contract-test work; planned entries are not current server capabilities and must be excluded from production SDKs. Turn submission and cancellation always return the durable operation identifier and its persisted admission and delivery state. Session-list cursors are bound to the normalized archive state and title query. Earlier development API shapes, checkpoints and database catalogs are unsupported; initialize fresh state for this build. Runtime feature capabilities and deployment policy still govern optional execution modes. Public conversation history reads directly from mutable message projections; persisted conversation snapshots and fixed-content paging are no longer provided. Retained removed MCP-management entries stay in the response snapshot: only non-removed entries count toward the 32-server selection capacity, so the servers array may exceed 32 while preserving tombstones." }, "servers": [ { "url": "/" } ], "security": [ { "trustedTenant": [], "trustedActor": [] }, { "trustedTenant": [], "trustedActor": [], "qwenSignature": [] } ], "tags": [ { "name": "Public Sessions" }, { "name": "Public Resources" }, { "name": "WebShell" } ], "paths": { "/v1/agents": { "post": { "tags": ["Public Resources"], "operationId": "createAgent", "description": "Stores revision 1 of a new tenant-scoped definition under a server-generated agent ID. The same Idempotency-Key with the same body replays the original revision; a different body answers 409 idempotency_conflict. Sessions may be created from a stored definition by agent_id (v1.41): an explicit agent_revision pins that revision, an omitted one resolves the latest at admission, and permission_policy, tools, model and instructions then take effect for that Session (model must be on the deployment's agent-model allowlist, the tool profile on its tool-profile allowlist); content that cannot take effect yet is refused at admission with 409 agent_definition_unsupported.", "x-qwen-implementation-status": "implemented", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentDefinitionRequest" } } } }, "responses": { "202": { "description": "Immutable agent revision published.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/{agentId}": { "parameters": [ { "name": "agentId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "getAgent", "description": "Reads the latest revision, or the one named by revision. An unknown agent ID or revision answers 404 agent_not_found.", "x-qwen-implementation-status": "implemented", "parameters": [ { "name": "revision", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 128 } } ], "responses": { "200": { "description": "Requested or current agent revision.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": ["Public Resources"], "operationId": "updateAgent", "description": "Stores the next immutable revision. Content whose digest equals the latest revision stores nothing and answers with that revision. The same Idempotency-Key and request replay the recorded revision. If another update takes the same next revision number, the losing write answers 409 agent_revision_conflict without recording its key, so that key can be retried. The returned revision may be superseded by a concurrent update before the response arrives.", "x-qwen-implementation-status": "implemented", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentDefinitionRequest" } } } }, "responses": { "202": { "description": "The next immutable revision, or the latest revision unchanged when the submitted content digest already equals it; no revision is appended in that case.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentDefinition" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/sessions": { "post": { "tags": ["Public Sessions"], "operationId": "createSession", "x-qwen-implementation-status": "implemented", "description": "Workspace selection is persisted with the original actor-scoped creation receipt. With the deployment's G0 file admission opt-in, qwen-code Sessions in an authorized, preregistered Workspace may include initial input under the server-selected profile, and a Session pinned to a stored definition may include initial input when its single tools entry selected a profile from the deployment's definition tool-profile allowlist. Otherwise Workspace creation must have empty input. Newly bound qwen-code Sessions, including empty creation, persist hosted-workspace-shell/1 with mandatory default/auto-edit approval when the Shell deployment opt-in is enabled; otherwise they persist hosted-workspace-files/1 with the configured file approval mode. The switch does not override a stored AgentDefinition's compiled profile or approval mode. Public callers cannot select the built-in profile. Any caller holding the OPERATOR role may submit later Turns and rename the Session under the same opt-in, while the Workspace registry row stays ACTIVE and still backs the binding, the actor recorded by the Workspace create command keeps OPERATOR or above, and the Session is active and undeleted and is either a qwen-code Session on the frozen execution profile or pinned to a stored definition; Workspace close follows its separate close capability and lifecycle admission; the same caller may cancel a running Turn (its delivery re-checks no grants); archive and unarchive follow their separate retention capabilities after reliable Workspace close; delete supports idle ACTIVE Sessions through their admitted Workspace lifecycle protocol, including v2 Shell/MCP, or reliably CLOSED/ARCHIVED Sessions; directory-change submission is retired; previously admitted durable cwd_change operations remain queryable and continue settling. This surface has no per-caller capability flag for later Turns, so callers must handle a refused later Turn — 403 session_operation_forbidden below the role and 409 workspace_unavailable past it, or 404 session_not_found without Workspace read. Check replay before resolving defaults; a durable binding is not proof of Runtime readiness. A stored AgentDefinition may be selected by agent_id: an explicit agent_revision pins that revision, an omitted one resolves the latest revision at admission and pins it for the Session's life, an unknown agent or revision answers 404 agent_not_found, and definition content that cannot take effect yet answers 409 agent_definition_unsupported with error.field naming the refused field. Shell Sessions additionally require the Shell opt-in and valid persisted approval for fresh Turns; disabling only Shell admission preserves original-key replay and accepted approvals and cancellation while Workspace files remain enabled and persisted approval remains valid. Qualified new public Shell Sessions expose agent by default under the public-child deployment switch and runtime/Harness admission; existing Sessions retain their original tool scope. Invalid approval or files-off can refuse attachment. Public Shell close and active delete require lifecycle v2 and reliable original-Worker stop support; archive and unarchive require completed close proof. ", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionRequest" } } } }, "responses": { "202": { "description": "Session accepted after durable command admission.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "get": { "tags": ["Public Sessions"], "operationId": "listSessions", "x-qwen-implementation-status": "implemented", "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" }, { "name": "archive_state", "in": "query", "required": false, "description": "Filter before pagination. Omission preserves all Sessions. Cursors are bound to the selected filters.", "schema": { "type": "string", "enum": ["all", "unarchived", "archived"], "default": "all" } }, { "name": "title_query", "in": "query", "required": false, "description": "Case-insensitive literal title substring, with surrounding whitespace stripped. Empty means no title filter; %, _ and backslash are literal characters. The cursor is bound to the stripped query.", "schema": { "type": "string", "maxLength": 512 } } ], "responses": { "200": { "description": "Sessions ordered by immutable creation time and Session ID. Filters apply before pagination and every page enforces tenant and Workspace access. This is not a snapshot: renames, archive changes and deletions between pages can change membership.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicSessionList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/sessions/{sessionId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Sessions"], "operationId": "getSession", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Session state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } }, "patch": { "tags": ["Public Sessions"], "operationId": "updateSession", "x-qwen-implementation-status": "partial", "description": "Renames the Session. Shipped before the v1.10 lifecycle review, which does not cover it.", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSessionRequest" } } } }, "responses": { "200": { "description": "Renamed Session.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } }, "delete": { "tags": ["Public Sessions"], "operationId": "deleteSession", "x-qwen-implementation-status": "implemented", "description": "Unbound Sessions accept active, closed or archived state. Returns 409 turn_active while a Turn is active and session_operation_active while another lifecycle change is pending. The same key from the same actor returns the original operation, also after the Session was deleted. Workspace-bound ACTIVE deletion supports idle hosted-workspace-files/1 Sessions when L3 lifecycle protocol and reliable Runtime stop are available. Only the Session's recorded owner (owner_actor_key, with the pre-V40 creator fallback) with current read access may admit it; accepted, running, cancelling or approval-waiting Turns return 409 turn_active. Admission persists a lifecycle-only execution fence and a versioned actor-scoped operation. SessionEnd settles before SessionDelete; committed Hook results are verified in Session Store and saved before permanent draining, attachment cleanup and original worker stop. Unknown outcomes or missing original stop evidence remain recovery_blocked and are never replayed on a replacement worker. CLOSED/ARCHIVED deletion retains L2: completed reliable-close evidence is required and no Harness or Hook is invoked. Completion atomically commits retirement, tombstone, receipt and terminal event, retaining shared Workspace files and neighboring holders. Authorized same-actor/key replays return the original operation, including after deletion; a readable non-owner returns 403. Missing lifecycle capability or close evidence returns 409 workspace_unavailable.", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "202": { "description": "Deletion accepted. The Session stops accepting input and reads deleting. For a supported ACTIVE Workspace files Session, SessionEnd and then SessionDelete settle under L3 before permanent draining and verified original Runtime stop; CLOSED/ARCHIVED Workspace Sessions use independent L2 retirement. Unbound Sessions retain their existing lifecycle flow. Completion leaves a tombstone: Session reads return 404, while its operations stay readable. The shared Workspace is never deleted, and no Session content is erased yet. 202 does not mean that tools have stopped.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/sessions/{sessionId}/events": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "postSessionEvent", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionEventRequest" } } } }, "responses": { "202": { "description": "Input or cancellation durably accepted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnCommandAdmission" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "description": "Admits the command durably and returns its operation identity, admission stage and delivery state. Replaying the same idempotency key returns the original command operation. Existing Session and actor authorization checks apply." }, "get": { "tags": ["Public Sessions"], "operationId": "getSessionEvents", "x-qwen-implementation-status": "implemented", "description": "Returns JSON by default. Accept text/event-stream or stream=true to receive SSE. Last-Event-ID takes precedence over after. A cursor strictly below replay_floor_sequence gets 409 cursor_expired as JSON; SSE sends one agent.session.resync_required frame and closes. Projection rebuilds preserve the floor and invalidate message-page cursors. Reload current Items after the projection catches up; expired event positions do not become readable again.", "parameters": [ { "$ref": "#/components/parameters/AfterSequence" }, { "$ref": "#/components/parameters/EventLimit" }, { "name": "stream", "in": "query", "schema": { "type": "boolean", "default": false } }, { "name": "Last-Event-ID", "in": "header", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "Event page or SSE stream.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicEventList" } }, "text/event-stream": { "schema": { "type": "string", "description": "SSE frames whose id is the public sequence and whose data is a PublicEvent. An expired cursor ends the stream with one agent.session.resync_required frame that has no id; x-qwen-resync-frame is its data." }, "x-qwen-resync-frame": { "$ref": "#/components/schemas/SessionResyncRequired" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/CursorExpired" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/sessions/{sessionId}/turns": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "listTurns", "x-qwen-implementation-status": "implemented", "description": "Turns of this Session, newest first: by creation time in milliseconds, which created_at shows in whole seconds, then by id, both descending. next_cursor names the last Turn of the page and is null on the last page; a page never repeats or skips a Turn that existed when the first page was read. 400 invalid_limit for a 32-bit integer limit outside 1 to 100, invalid_request for a limit that is not a 32-bit integer, and invalid_cursor for a cursor that does not decode to the createdAt:turnId form this server issues. 404 session_not_found for an unknown, deleted or unreadable Session.", "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" } ], "responses": { "200": { "description": "Turn page.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicTurnList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/v1/agents/sessions/{sessionId}/turns/{turnId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/TurnId" } ], "get": { "tags": ["Public Resources"], "operationId": "getTurn", "x-qwen-implementation-status": "implemented", "description": "404 session_not_found for an unknown, deleted or unreadable Session, and turn_not_found for a Turn that this Session does not have; an id that differs from a Turn's only by trailing spaces does not find it. 400 invalid_request for a Turn id longer than 64 characters.", "responses": { "200": { "description": "Turn state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicTurn" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/v1/agents/sessions/{sessionId}/items": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "listItems", "x-qwen-implementation-status": "partial", "parameters": [ { "name": "after", "in": "query", "schema": { "oneOf": [ { "type": "integer", "format": "int64", "minimum": 0 }, { "type": "string", "maxLength": 4096 } ], "default": 0 }, "description": "Exclusive first_sequence boundary on the first page, or an opaque message cursor. Explicit cursor takes precedence." }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 4096 }, "description": "Opaque current-message continuation cursor bound to scope, direction, membership range and projection generation. Old snapshot cursors are rejected." }, { "$ref": "#/components/parameters/ListLimit" } ], "responses": { "200": { "description": "Current message Items and the initial sequence membership upper bound.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicItemList" } } } }, "400": { "$ref": "#/components/responses/InvalidMessagePage" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "409": { "$ref": "#/components/responses/MessageProjectionChanged" }, "413": { "$ref": "#/components/responses/MessagePageTooLarge" }, "503": { "$ref": "#/components/responses/MessageProjectionPending" } }, "description": "Requires current Session read authorization on every page. Read bounded current message-table pages in chronological order. The first request fixes a sequence membership upper bound; later pages retain that range but read current bodies and statuses. Numeric after excludes every Item with first_sequence at or below that value. Explicit cursor takes precedence; nonnumeric after is an existing cursor alias. Continuation uses the complete (first_sequence,item_id) position. Cursors bind tenant, Session, direction and projection generation, and are rejected after a projection rebuild. Old signed snapshot cursors are invalid. snapshot_through_sequence retains its wire name and denotes the initial membership bound, not immutable content. A lagging initial projection returns retryable message_projection_pending; canonical history and writer ownership are unchanged." } }, "/v1/agents/sessions/{sessionId}/artifacts": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "listArtifacts", "x-qwen-implementation-status": "implemented", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 2048 } }, { "$ref": "#/components/parameters/ListLimit" } ], "responses": { "200": { "description": "Authorized artifact metadata page.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicArtifactList" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "description": "Authorized artifacts, newest first by creation sequence and then artifact ID. Opaque cursors are bound to tenant, Session and the first page watermark; pages do not repeat or skip retained artifacts present at that watermark. next_cursor names the last artifact and is null on the last page. 400 invalid_limit rejects limits outside 1..100; 400 invalid_cursor rejects malformed cursors or cursors from another tenant or Session. Discard an invalid cursor and restart from the first page." } }, "/v1/agents/sessions/{sessionId}/artifacts/{artifactId}/content": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/ArtifactId" } ], "get": { "tags": ["Public Resources"], "operationId": "getArtifactContent", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Exact immutable bytes; streamed with bounded memory.", "headers": { "ETag": { "schema": { "type": "string" } }, "Repr-Digest": { "schema": { "type": "string" } }, "Content-Length": { "schema": { "type": "string" } }, "Content-Disposition": { "schema": { "type": "string" } }, "Accept-Ranges": { "schema": { "type": "string" } }, "Cache-Control": { "schema": { "type": "string" } } }, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "206": { "description": "Exact immutable bytes; streamed with bounded memory.", "headers": { "ETag": { "schema": { "type": "string" } }, "Repr-Digest": { "schema": { "type": "string" } }, "Content-Length": { "schema": { "type": "string" } }, "Content-Disposition": { "schema": { "type": "string" } }, "Accept-Ranges": { "schema": { "type": "string" } }, "Cache-Control": { "schema": { "type": "string" } }, "Content-Range": { "schema": { "type": "string" } } }, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "410": { "description": "Reserved for future retention support; O3 does not expire retained representations.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "412": { "description": "If-Match mismatch.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "416": { "description": "Unsatisfiable range.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }, "headers": { "Content-Range": { "schema": { "type": "string" } } } }, "429": { "description": "Reader limit reached.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } }, "headers": { "Retry-After": { "schema": { "type": "string" } } } } }, "parameters": [ { "name": "revision", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[0-9a-f]{64}$" } }, { "name": "Range", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "If-Match", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "If-Range", "in": "header", "required": false, "schema": { "type": "string" } } ], "description": "Requires a trusted actor and current Workspace read/raw-content grants. revision is mandatory. One range up to 1 MiB; malformed, multiple, or oversized ranges return 400. A mismatched If-Range selects the full response. Authorization precedes validators and range parsing. No latest-version fallback or transparent compression." } }, "/api/agent/web-shell/v1/sessions/query": { "post": { "tags": ["WebShell"], "operationId": "webShellListSessions", "x-qwen-implementation-status": "implemented", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellListRequest" } } } }, "responses": { "200": { "description": "WebShell session page.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/sessions/get": { "post": { "tags": ["WebShell"], "operationId": "webShellGetSession", "x-qwen-implementation-status": "implemented", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } }, "responses": { "200": { "description": "WebShell session.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/sessions/terminal-ticket": { "post": { "tags": ["WebShell"], "operationId": "webShellTerminalTicket", "x-qwen-implementation-status": "implemented", "description": "Mint the single-use, short-lived ticket a browser offers on the terminal WebSocket upgrade. The request travels the authenticated WebShell surface and runs the full terminal admission (readable, active, Shell capability and OPERATOR access) here, where the deployment authentication headers are available; the upgrade itself then only consumes the ticket. Mounted only with the Runtime Broker. The ticket is never carried in a URL and is consumed exactly once.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTerminalTicketRequest" } } } }, "responses": { "200": { "description": "Single-use terminal upgrade ticket and its lifetime in seconds.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTerminalTicket" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/api/agent/web-shell/v1/sessions/rename": { "post": { "tags": ["WebShell"], "operationId": "webShellRenameSession", "x-qwen-implementation-status": "implemented", "description": "Synchronously rename a Session in one local SQL transaction under the same authorization as public PATCH. The public SQL row is the display authority: HTTP 200 confirms the SQL title is persisted, while the Harness journal copy is updated by a best-effort notification after commit and may lag or be skipped when the Harness is unavailable or does not support fenced titles. Workspace-bound fresh renames require current OPERATOR access and the original binding's execution facts; unbound Sessions use the existing tenant-scoped rename authorization. An active Turn does not itself block rename. Reuse the same idempotency key only for the same Session and title; completed replay returns the Session's current persisted title without another notification, including the existing last-visible result after deletion. Fresh-rename capability changes do not preclude authorized replay. The result title is authoritative and can differ from the requested title when a later rename already completed.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRenameRequest" } } } }, "responses": { "200": { "description": "Confirmed persisted Session title, or an authorized completed replay.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" }, "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRenameResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/api/agent/web-shell/v1/transcript/query": { "post": { "tags": ["WebShell"], "operationId": "webShellTranscript", "x-qwen-implementation-status": "implemented", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTranscriptRequest" } } } }, "responses": { "200": { "description": "Event transcript page.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTranscript" } } } }, "400": { "$ref": "#/components/responses/InvalidMessagePage" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/MessagePageTooLarge" }, "409": { "$ref": "#/components/responses/MessageProjectionChanged" }, "503": { "$ref": "#/components/responses/MessageProjectionPending" } }, "description": "Requires current Session read authorization. Read the most recent limit current message Items and selected bounded Turn control events; olderCursor pages toward older Items. Bodies and statuses remain live. The response coveredSequence and lastSequence both identify actual message projection coverage for SSE continuation, never an unmaterialized event tail. No persisted conversation snapshot or whole-history replay is read. Projection rebuild invalidates cursors. If projection coverage is below the replay floor, return retryable message_projection_pending." } }, "/api/agent/web-shell/v1/events/stream": { "post": { "tags": ["WebShell"], "operationId": "webShellStreamEvents", "x-qwen-implementation-status": "implemented", "description": "POST SSE consumed through fetch response.body. An afterSequence strictly below the durable replay floor ends the stream with one agent.session.resync_required frame. Projection rebuilds preserve that floor and invalidate message-page cursors. On the resync frame, reload the transcript and resume after its lastSequence.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellStreamRequest" } } } }, "responses": { "200": { "description": "SSE stream.", "content": { "text/event-stream": { "schema": { "type": "string", "description": "SSE frames whose id is the public sequence and whose data is a WebShellEvent. The agent.session.resync_required frame has no id; x-qwen-resync-frame is its data." }, "x-qwen-resync-frame": { "$ref": "#/components/schemas/WebShellResyncRequired" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/sessions/create": { "post": { "tags": ["WebShell"], "operationId": "webShellCreateSession", "x-qwen-implementation-status": "implemented", "description": "Maps workspaceId/cwdRelative to public Workspace selection without using environmentId or absolute cwd. Shares G0's opt-in initial file-tool Turn admission with public Session creation: the server-selected profile for the built-in qwen-code agent, and the profile selected by a stored definition's single allowlisted hosted_profile tools entry for a definition-pinned Session. Newly bound qwen-code Sessions, including empty creation, persist hosted-workspace-shell/1 with mandatory default/auto-edit approval when the Shell deployment opt-in is enabled; otherwise they persist hosted-workspace-files/1 with the configured file approval mode. The switch does not override a stored AgentDefinition's compiled profile or approval mode. Public callers cannot select the built-in profile. Any caller holding the OPERATOR role may submit later Turns and rename the Session under the same opt-in, while the Workspace registry row stays ACTIVE and still backs the binding, the actor recorded by the Workspace create command keeps OPERATOR or above, and the Session is active and undeleted and is either a qwen-code Session on the frozen execution profile or pinned to a stored definition; Workspace close follows its separate close capability and lifecycle admission; the same caller may cancel a running Turn (its delivery re-checks no grant it needs survives the cancellation), and the Session's own liveness keeps OPERATOR access even when its Workspace's background-exit observation closes some other bound Session; cancel is always allowed for its own running Turn even outside the Workspace files opt-in. A definition-pinned Session keeps its pinned revision's tool profile, model and instructions for its whole life, and a replay of the create command reuses the original pin; a WebShell Session inherits its Workspace's default Workspace selection when the request omits one. Shell Sessions additionally require the Shell opt-in and valid persisted approval for fresh Turns; disabling only Shell admission preserves original-key replay and accepted approvals and cancellation while Workspace files remain enabled and persisted approval remains valid. Qualified new public Shell Sessions expose agent by default under the public-child deployment switch and runtime/Harness admission; existing Sessions retain their original tool scope. Invalid approval or files-off can refuse attachment. Public Shell close and active delete require lifecycle v2 and reliable original-Worker stop support; archive and unarchive require completed close proof. Fresh Shell sending also requires foregroundShell=true; workspaceTurns alone is not sufficient Shell Turn admission. Manual rename uses the independent rename capability.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCreateRequest" } } } }, "responses": { "202": { "description": "Session admitted.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellAdmission" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/api/agent/web-shell/v1/turns/submit": { "post": { "tags": ["WebShell"], "operationId": "webShellSubmitTurn", "x-qwen-implementation-status": "partial", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSubmitRequest" } } } }, "responses": { "202": { "description": "Turn admitted.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTurnAdmission" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "description": "Admits the command durably and returns its operation identity, admission stage and delivery state. Replaying the same idempotency key returns the original command operation. Existing Session and actor authorization checks apply." } }, "/api/agent/web-shell/v1/turns/cancel": { "post": { "tags": ["WebShell"], "operationId": "webShellCancelTurn", "x-qwen-implementation-status": "partial", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCancelRequest" } } } }, "responses": { "202": { "description": "Cancellation durably admitted.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTurnAdmission" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "description": "Admits the command durably and returns its operation identity, admission stage and delivery state. Replaying the same idempotency key returns the original command operation. Existing Session and actor authorization checks apply." } }, "/v1/agents/workspaces": { "get": { "tags": ["Public Resources"], "operationId": "listWorkspaces", "x-qwen-implementation-status": "partial", "description": "Only readable preregistered workspaces, ordered by stable workspace id. Opaque cursors are bound to tenant, actor and filters; ACLs are rechecked on each page. Return actor-specific creation hints, pre-Session capability discovery and the authorized explicit default even when it is outside this page. No physical paths are exposed and no Runtime is started.", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 2048 } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } } ], "responses": { "200": { "description": "Authorized durable resource view; no Runtime startup required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicWorkspaceList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/workspaces/{workspaceId}": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "getWorkspace", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Authorized durable resource view; no Runtime startup required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicWorkspace" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/sessions/{sessionId}/operations/{operationId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 64 } } ], "get": { "tags": ["Public Sessions"], "operationId": "getSessionCwdOperation", "x-qwen-implementation-status": "implemented", "description": "Reads one operation of the Session: close, archive, delete, cwd change, action response, task cancel, and the submit_input and cancel operations of its Turns. 404 operation_not_found for an unknown operation.", "responses": { "200": { "description": "Authorized operation with its latest durable status, readable without Runtime startup and after the Session was deleted. Reading is not a replay, so replayed is false.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/agent/web-shell/v1/workspaces/query": { "post": { "tags": ["WebShell"], "operationId": "webShellQueryWorkspaces", "x-qwen-implementation-status": "partial", "description": "Same authorization, paging, explicit default and pre-Session capability discovery as listWorkspaces, with camelCase fields. Listing errors must not cause silent fallback to a default directory.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceQueryRequest" } } } }, "responses": { "200": { "description": "Authorized durable resource view; no Runtime startup required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspacePage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/operations/query": { "post": { "tags": ["WebShell"], "operationId": "webShellQueryCwdOperation", "x-qwen-implementation-status": "implemented", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellOperationRequest" } } } }, "responses": { "200": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/sessions/{sessionId}/actions": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Sessions"], "operationId": "listSessionActions", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Authorized pending Actions; use original action lookup to query terminal state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicActionList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound", "description": "Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found)." }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" }, { "name": "include_children", "in": "query", "required": false, "schema": { "type": "boolean", "default": false }, "description": "Aggregate pending Actions from this public root Session and its direct children; responses use each Action owning Session." } ], "description": "Serves Hosted permission and structured question Actions. Question answers preserve the original question and option IDs, allow one to four answers, and are bounded to 32 KiB of canonical UTF-8 JSON. vote_recorded remains planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision." } }, "/v1/agents/sessions/{sessionId}/actions/{actionId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/ActionId" } ], "get": { "tags": ["Public Sessions"], "operationId": "getSessionAction", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current durable Action view, including terminal decisions.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAction" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound", "description": "Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found)." }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "description": "Serves Hosted permission and structured question Actions. Question answers preserve the original question and option IDs, allow one to four answers, and are bounded to 32 KiB of canonical UTF-8 JSON. vote_recorded remains planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision." } }, "/v1/agents/sessions/{sessionId}/actions/{actionId}/responses": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/ActionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "respondToSessionAction", "x-qwen-implementation-status": "implemented", "responses": { "202": { "description": "Response durably queued for the original arbiter. 202 is not final approval.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound", "description": "Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found)." }, "409": { "$ref": "#/components/responses/Conflict", "description": "Idempotency conflict, a non-active Session (session_inactive), or an ended Action (action_expired, action_cancelled, action_already_resolved). An existing matching response replays before the Session-state check." }, "403": { "$ref": "#/components/responses/Forbidden", "description": "Responding requires the Session's recorded owner or a Workspace OPERATOR (action_forbidden); a Shell Session's Actions may be answered only by its recorded owner. An unbound Session with no recorded creator and no recorded create command (anonymous open-mode creation, or an unbound Session created before the V40 migration that also has no Workspace creation record) answers to any caller in its tenant, matching its read ACL; a bound Session with no recorded owner answers through the create-command actor recorded for it, or through the Workspace role arm. The tenant filter's 403 actor_scope_mismatch also applies on this route." }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionResponseRequest" } } } }, "description": "Serves Hosted permission and structured question Actions. Question answers preserve the original question and option IDs, allow one to four answers, and are bounded to 32 KiB of canonical UTF-8 JSON. vote_recorded remains planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision." } }, "/v1/agents/sessions/{sessionId}/close": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "closeSession", "x-qwen-implementation-status": "implemented", "description": "Accepts an active Session; 409 session_state_conflict otherwise. Supported hosted-workspace-files/1 Sessions may close when session_close is true. Only the Session's recorded owner (owner_actor_key, with the pre-V40 creator fallback) with current read access may close a bound Session: unreadable returns 404, a readable non-owner returns 403. Active, cancelling or approval-waiting Turns return 409 turn_active; another pending lifecycle operation returns session_operation_active. Unsupported Workspace close returns workspace_unavailable. The same actor and key replay the original operation. New L3 Workspace close operations run SessionEnd only, retain data, and finish after durable effects verification and original Runtime stop. SessionDelete is reserved for ACTIVE delete. Missing protocol support rejects new admission; previously admitted operations retain their saved protocol. Unknown outcomes remain recovery_blocked.", "responses": { "202": { "description": "Close durably accepted. The Session stops accepting input and reads closing. A bound Session completes only after its permanent Runtime admission fence is stored, no valid journal writer or unsettled execution remains, all original Runtime Sessions and holders are released, and original worker stop proof is persisted; the Session then reads closed. Unknown original identities or executions report recovery_blocked with a stable failure_code and keep the Session closing. History, Artifacts and Workspace files are retained. 202 does not mean that tools have stopped.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] } }, "/v1/agents/sessions/{sessionId}/archive": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "archiveSession", "x-qwen-implementation-status": "implemented", "description": "Accepts a closed Session; 409 session_state_conflict otherwise, session_operation_active while another lifecycle change is pending. Workspace-bound archive requires a closed Session with completed reliable-close evidence and the Session's recorded owner with current read access. It completes atomically during admission, preserves data and the permanent close fence, and calls neither Harness nor Runtime. A readable non-owner returns 403; missing close evidence returns 409 workspace_unavailable.", "responses": { "202": { "description": "Archive requires a closed Session and retains history. Java is its only authority, so a new archive is complete when it is admitted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] } }, "/v1/agents/sessions/{sessionId}/unarchive": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "unarchiveSession", "x-qwen-implementation-status": "partial", "description": "Synchronously restores an archived Session to closed. Workspace-bound Sessions require completed reliable-close evidence and the Session's recorded owner with current read access (404 unreadable, 403 readable non-owner). Bound keys are tenant/Session/actor scoped. Replay returns the recorded outcome without repeating the mutation; a replay after delete answers with the Session as last visible — its pre-delete status — rather than 404. The permanent close fence is preserved and no Harness or Runtime call is made.", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "200": { "description": "Restored Session.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/agent/web-shell/v1/actions/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellActions", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellActionPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound", "description": "Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found)." }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellActionQueryRequest" } } } }, "description": "Serves Hosted permission and structured question Actions. Question answers preserve the original question and option IDs, allow one to four answers, and are bounded to 32 KiB of canonical UTF-8 JSON. vote_recorded remains planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision." } }, "/api/agent/web-shell/v1/actions/get": { "post": { "tags": ["WebShell"], "operationId": "getWebShellAction", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellAction" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound", "description": "Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found)." }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellActionGetRequest" } } } }, "description": "Serves Hosted permission and structured question Actions. Question answers preserve the original question and option IDs, allow one to four answers, and are bounded to 32 KiB of canonical UTF-8 JSON. vote_recorded remains planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision." } }, "/api/agent/web-shell/v1/actions/respond": { "post": { "tags": ["WebShell"], "operationId": "respondWebShellAction", "x-qwen-implementation-status": "implemented", "responses": { "202": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound", "description": "Unknown or unreadable Session (session_not_found), or unknown Action (action_not_found)." }, "409": { "$ref": "#/components/responses/Conflict", "description": "Idempotency conflict, a non-active Session (session_inactive), or an ended Action (action_expired, action_cancelled, action_already_resolved). An existing matching response replays before the Session-state check." }, "403": { "$ref": "#/components/responses/Forbidden", "description": "Responding requires the Session's recorded owner or a Workspace OPERATOR (action_forbidden); a Shell Session's Actions may be answered only by its recorded owner. An unbound Session with no recorded creator and no recorded create command (anonymous open-mode creation, or an unbound Session created before the V40 migration that also has no Workspace creation record) answers to any caller in its tenant, matching its read ACL; a bound Session with no recorded owner answers through the create-command actor recorded for it, or through the Workspace role arm. The tenant filter's 403 actor_scope_mismatch also applies on this route." }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellActionRespondRequest" } } } }, "description": "Serves Hosted permission and structured question Actions. Question answers preserve the original question and option IDs, allow one to four answers, and are bounded to 32 KiB of canonical UTF-8 JSON. vote_recorded remains planned. Reads follow Session authorization; the Session's recorded owner or any caller holding OPERATOR on the bound Workspace may respond; a Shell Session's Actions may be answered only by its recorded owner (an unbound Session with no recorded creator and no recorded create command answers to any caller in its tenant, matching its read ACL; a bound Session without an owner record answers through the create-command actor recorded for it, or through the Workspace role arm). Responses are durable operations, reconciled against the original journal decision." } }, "/api/agent/web-shell/v1/sessions/close": { "post": { "tags": ["WebShell"], "operationId": "closeWebShellSession", "x-qwen-implementation-status": "implemented", "responses": { "202": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellLifecycleRequest" } } } }, "description": "Uses the same close admission, owner authorization and durable cleanup semantics as the public close route. sessionClose describes deployment support; it does not grant actor authorization. New L3 Workspace close operations run SessionEnd only, retain data, and finish after durable effects verification and original Runtime stop. SessionDelete is reserved for ACTIVE delete. Missing protocol support rejects new admission; previously admitted operations retain their saved protocol. Unknown outcomes remain recovery_blocked." } }, "/api/agent/web-shell/v1/sessions/archive": { "post": { "tags": ["WebShell"], "operationId": "archiveWebShellSession", "x-qwen-implementation-status": "implemented", "responses": { "202": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellLifecycleRequest" } } } }, "description": "Workspace-bound archive requires a closed Session with completed reliable-close evidence and the Session's recorded owner with current read access. It completes atomically during admission, preserves data and the permanent close fence, and calls neither Harness nor Runtime. A readable non-owner returns 403; missing close evidence returns 409 workspace_unavailable." } }, "/api/agent/web-shell/v1/sessions/delete": { "post": { "tags": ["WebShell"], "operationId": "deleteWebShellSession", "x-qwen-implementation-status": "implemented", "responses": { "202": { "description": "Same authorized operation semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellLifecycleRequest" } } } }, "description": "Workspace-bound ACTIVE deletion supports idle hosted-workspace-files/1 Sessions when L3 lifecycle protocol and reliable Runtime stop are available. Only the Session's recorded owner (owner_actor_key, with the pre-V40 creator fallback) with current read access may admit it; accepted, running, cancelling or approval-waiting Turns return 409 turn_active. Admission persists a lifecycle-only execution fence and a versioned actor-scoped operation. SessionEnd settles before SessionDelete; committed Hook results are verified in Session Store and saved before permanent draining, attachment cleanup and original worker stop. Unknown outcomes or missing original stop evidence remain recovery_blocked and are never replayed on a replacement worker. CLOSED/ARCHIVED deletion retains L2: completed reliable-close evidence is required and no Harness or Hook is invoked. Completion atomically commits retirement, tombstone, receipt and terminal event, retaining shared Workspace files and neighboring holders. Authorized same-actor/key replays return the original operation, including after deletion; a readable non-owner returns 403. Missing lifecycle capability or close evidence returns 409 workspace_unavailable." } }, "/api/agent/web-shell/v1/workspaces/get": { "post": { "tags": ["WebShell"], "operationId": "webShellGetWorkspace", "x-qwen-implementation-status": "partial", "description": "Read one authorized Workspace by its logical ID; absent or unreadable Workspaces return 404. No Runtime is started.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceGetRequest" } } } }, "responses": { "200": { "description": "Authorized durable resource view; no Runtime startup required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspace" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/sessions/{sessionId}/tasks": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Sessions"], "operationId": "listSessionTasks", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Tasks of this Session, newest first (created_at descending, then id descending), merged from the record domains the server projects — Monitor runs today, the others arrive with their stages. Settled tasks stay listed. The projection is rebuilt from durable domain records, so task IDs and order survive a restart. A task.updated Session event, with data.taskId and data.state, announces each change of a task's view.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicTaskList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } }, "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" } ] } }, "/v1/agents/sessions/{sessionId}/tasks/{taskId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/TaskId" } ], "get": { "tags": ["Public Sessions"], "operationId": "getSessionTask", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Current task view, including settled tasks. 404 task_not_found covers tasks outside the caller scope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicTask" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/v1/agents/sessions/{sessionId}/tasks/{taskId}/events": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/TaskId" } ], "get": { "tags": ["Public Sessions"], "operationId": "listSessionTaskEvents", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Task events strictly after the cursor, oldest first, published as a committed prefix per task: no event may become visible at or before any previously returned event, page or output_cursor position. 400 invalid_event_cursor rejects a malformed cursor or one from another task. The durable retention floor is the position after the newest expired event, initially the stream start; only an oldest prefix expires. 409 cursor_expired means strictly below that floor, even when no events remain; equality is valid. Its replay_floor_sequence and snapshot_through_sequence stay absent because task cursors are opaque. Cursor identity, logical position, payload and accepted schema/projection versions survive rebuilds, restarts and archival; retention may still expire a cursor. Any output-producing task requires capabilities.artifacts. An output event holds back its own expiry and every later event until its full text is durably readable in an Artifact and discoverable by subsequent recovery reads, including through a potentially lagging task projection. Time retention is a target under healthy archival, not an unconditional deletion deadline. Archival failure pins the floor; H3 must bound durable backlog and apply producer backpressure and admission blocking before capacity is exhausted, or leave output-producing tasks disabled. Never silently discard accepted output. After cursor_expired, read one event page from the floor without after and save next_cursor; do not wait for has_more=false because an active producer may never catch up. Then read a fresh task view and discover/read its Artifacts, then resume from the saved page cursor, including events held back by the first page limit, not the new view's output_cursor. If the floor overtakes the reader, restart recovery; never treat another 409 as an empty page. Until older Artifacts can be enumerated and attributed to the task, H3 must prevent rotation beyond the 100 artifact_refs entries; afterward recovery must also enumerate older Artifacts. Recovery is guaranteed while the task and its Artifacts remain readable under their retention and authorization rules. Stage H3 defines stable output segments for joining Artifacts and events without overlap. 400 unsupported_feature when the Session does not serve tasks (capabilities.tasks is false).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicTaskEventList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/TaskCursorExpired" } }, "parameters": [ { "$ref": "#/components/parameters/TaskEventCursor" }, { "$ref": "#/components/parameters/ListLimit" } ] } }, "/v1/agents/sessions/{sessionId}/tasks/{taskId}/cancel": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/TaskId" } ], "post": { "tags": ["Public Sessions"], "operationId": "cancelSessionTask", "x-qwen-implementation-status": "partial", "responses": { "202": { "description": "Java durably accepted the cancellation and owns delivery; 202 does not prove owner acceptance or physical stop. After the tenant/actor filter and request decoding, validate Idempotency-Key (missing: 400 invalid_request; malformed: 400 invalid_idempotency_key), then current access (404 for an unreadable Session/task, then 403 task_forbidden for a readable task the actor may not cancel), then idempotent replay. The domain is tenant/session/operation-kind/actor/key; the digest includes task_id and excludes trace-only request IDs. While the record is retained and access remains valid, the same key and digest returns the same operation with its latest durable state and replayed=true; another digest returns 409 idempotency_conflict. Only new requests check capabilities.tasks (400 unsupported_feature), then Session active state (409 session_not_active otherwise, including closing, closed, archived and deleting), then action_capabilities containing cancel (409 task_action_unavailable otherwise), then, for a Workspace-bound Session, no storage migration fence (409 workspace_unavailable otherwise, as the sibling bound admissions answer). Admission requires no other open operation on the Session: cancel operations share the durable operation table with the lifecycle commands, which admit one open operation per Session, so any open operation answers 409 session_operation_active and an open cancel blocks close, archive and delete the same way. Atomically recheck admission and create the operation, serializing with Session/task transitions; a concurrent same-key winner replays before new-request state checks. Different keys that each pass admission create different operations, although physical stop requests may be coalesced or repeated safely; each operation gets its own recorded outcome. completed means the task authority durably recorded cancellation and returned a receipt; failed proves it was not accepted and will not be delivered again, with failure_code; recovery_blocked means acceptance is unknown and requires reconciliation before any re-execution. Retryable delivery failures remain pending/running. task_cancel never has status cancelled because cancellation commands cannot be withdrawn. Only physical cancellation settlement makes the task cancelled; a natural terminal outcome is preserved and an unknown physical outcome makes the task recovery_blocked independently of operation acceptance. Capability or state changes do not invalidate replay, but missing/deleted resources or revoked access may still return 404/403.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] } }, "/api/agent/web-shell/v1/tasks/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellTasks", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Same authorized task semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTaskPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTaskQueryRequest" } } } } } }, "/api/agent/web-shell/v1/tasks/get": { "post": { "tags": ["WebShell"], "operationId": "getWebShellTask", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Same authorized task semantics as the public API.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTask" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTaskGetRequest" } } } } } }, "/api/agent/web-shell/v1/tasks/events/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellTaskEvents", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Same authorized task semantics as the public task events route, including the durable retention floor, committed-prefix publication, Artifact recovery order and client tolerance of unknown optional fields and event types.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTaskEventPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/TaskCursorExpired" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTaskEventQueryRequest" } } } } } }, "/api/agent/web-shell/v1/tasks/cancel": { "post": { "tags": ["WebShell"], "operationId": "cancelWebShellTask", "x-qwen-implementation-status": "partial", "responses": { "202": { "description": "Same authorized task cancellation semantics as the public API: key validation, current access, idempotent replay, then new-request capability, Session, task and storage-migration checks (409 workspace_unavailable under a migration fence). Replay returns the same operation and latest durable state. 202 is durable admission, completed is authority acceptance, and neither proves physical stop. Admission requires no other open operation on the Session (409 session_operation_active), as on the lifecycle routes. A requestId in the body becomes the response's X-Request-Id and stays out of the request digest.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellCommandOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellTaskCancelRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/mcp-catalog": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "getSessionMcpCatalog", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Sanitized tools, resources and prompts from the latest published catalog of each server in this Session. A failed or pending replacement preserves the previous published catalog. Released or unpublished catalogs are stale. This read-only projection does not enable a production MCP profile or accept server configuration.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMcpCatalog" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/sessions/{sessionId}/hook-catalog": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "getSessionHookCatalog", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Sanitized planning summary of the latest settled Hook registration in this Session. A pending or failed replacement preserves the previous catalog. Hook recipes, prompts, credentials and handler implementations are never returned.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicHookCatalog" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "400": { "$ref": "#/components/responses/BadRequest" } } } }, "/v1/agent-channels": { "get": { "tags": ["Public Resources"], "operationId": "listAgentChannels", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Channel connections of the tenant with their route bindings, newest first (created_at descending, then id descending), so a connection that changes state does not move between pages. Each entry's routes list its newest 100 route bindings, oldest first; a binding rotated past the bound stays persisted but is no longer discoverable from the connection. A route binding names the authenticated channel instance, account generation, platform event and semantic revision it committed; two platform events with identical text stay two bindings. Ordinary chat still uses the Session prompt and event APIs. 400 invalid_cursor on a malformed cursor, 400 invalid_limit when limit is outside 1 to 100.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicChannelList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" } ] } }, "/v1/agent-channels/{channelId}/deliveries": { "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "listAgentChannelDeliveries", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "Outbound deliveries of the channel, newest first (created_at descending, then id descending), so a delivery whose state changes does not move between pages. Each delivery carries its stable segment identity and ordinal: a streaming card or segmented reply keeps one segmentId per card, only segments proven unsent are sent again, and an explicit resend creates a new deliveryId for its segment rather than rewriting an existing delivery. unknown means the connection dropped after sending without a provider query or idempotency key, so the platform may hold the segment; the user is warned about possible duplication before resending. 404 channel_not_found when the channel is absent or outside the caller's scope. 400 invalid_cursor on a malformed cursor, 400 invalid_limit when limit is outside 1 to 100.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicChannelDeliveryList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } }, "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" } ] } }, "/v1/agent-automations": { "get": { "tags": ["Public Resources"], "operationId": "listAgentAutomations", "description": "Automation definitions the caller can read, newest first (created_at descending, then id descending), so a definition whose revision moves does not move between pages. Each entry is the definition's current revision as its target Session committed it; occurrences page separately under /runs. 400 invalid_cursor on a malformed cursor, 400 invalid_limit when limit is outside 1 to 100.", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" } ], "responses": { "200": { "description": "Definitions of the tenant the caller can read, newest first.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomationList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": ["Public Resources"], "operationId": "createAgentAutomation", "description": "Creates a definition under its target Session, which the caller must have created: the prompt is published as a Session resource and definition revision 1 commits in the Session journal before the answer. The same Idempotency-Key with the same body replays the original definition; a different body answers 409 idempotency_conflict. Only the persistent target mode is admitted (409 automation_mode_disabled otherwise); a missing session_id or required field, a prompt over 64 KiB, or an invalid cron answers 400 invalid_automation; an unknown timezone answers 400 automation_timezone_unknown; a Session holds at most 32 live definitions (409 automation_count_limit); a gate on a Session whose tool profile declares no Shell, or whose deployment configures Hooks (a probe does not run through them yet), answers 409 automation_gate_unsupported, and a gate the Harness's shell checks refuse (only a comment, a shell wrapper such as bash -c, or any part backgrounded with &; an empty gate is 400 invalid_automation) answers 400 automation_gate_invalid without spending the Idempotency-Key. 409 automation_unavailable when the deployment has not enabled automation; 409 session_not_active when the target Session is not active; 409 automation_operation_conflict when the key's binding already exists.", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationDefinitionCreateRequest" } } } }, "responses": { "202": { "description": "The committed definition.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/v1/agent-automations/{automationId}": { "parameters": [ { "name": "automationId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "getAgentAutomation", "description": "The definition's current revision. 404 automation_not_found when it is absent or outside the caller's scope.", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "The current revision.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomation" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": ["Public Resources"], "operationId": "updateAgentAutomation", "description": "Appends the next definition revision from the fields given; omitted fields keep their committed values and session_id and session_mode cannot change. Content whose digest equals the current revision appends nothing and answers it. The same Idempotency-Key and body replay the recorded answer. A retired definition answers 409 automation_retired. A disallowed session_id change, an oversized prompt, or an invalid cron answers 400 invalid_automation; an unknown timezone answers 400 automation_timezone_unknown. 409 automation_mode_disabled when the target mode is not admitted; 409 automation_gate_unsupported when a gate is set on a Session whose tool profile declares no Shell, or whose deployment configures Hooks; 400 automation_gate_invalid when the Harness's shell checks refuse the gate (only a comment, a shell wrapper such as bash -c, or any part backgrounded with &; an empty gate is 400 invalid_automation), without spending the Idempotency-Key; 409 session_not_active when the target Session is not active; 409 automation_unavailable when the deployment has not enabled automation; 409 automation_operation_conflict when the key's binding already exists.", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutomationDefinitionRequest" } } } }, "responses": { "202": { "description": "The committed revision.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "delete": { "tags": ["Public Resources"], "operationId": "retireAgentAutomation", "description": "Retires the definition: its chain ends and freezes, no later occurrence fires, and committed runs keep their history. Idempotent under its Idempotency-Key and for an already retired definition. 409 automation_unavailable when the deployment has not enabled automation — a 503 of the same code means the Harness is unavailable and is retryable.", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "202": { "description": "The retired definition.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/v1/agent-automations/{automationId}/runs": { "parameters": [ { "name": "automationId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "listAgentAutomationRuns", "description": "Occurrences of the definition, newest first (created_at descending, then occurrence_key descending): fired occurrences with their run's task state, skipped occurrences with their reason (missed occurrences carry none), and a firing occurrence whose answer is not recorded yet. 404 automation_not_found when the definition is absent or outside the caller's scope. 400 invalid_cursor on a malformed cursor, 400 invalid_limit when limit is outside 1 to 100.", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/Cursor" }, { "$ref": "#/components/parameters/ListLimit" } ], "responses": { "200": { "description": "Occurrences of the definition, newest first.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomationRunList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "post": { "tags": ["Public Resources"], "operationId": "runAgentAutomation", "description": "Fires a manual run now: the Idempotency-Key is the occurrence (manual:), so a retry answers the same run and never fires twice; the run id is derived from the definition and the occurrence. The overlap policy applies to a manual run as it does to a scheduled one, and a dropped run answers 409 automation_run_skipped with the reason. A disabled definition still runs manually; a retired one answers 409 automation_retired. While a scanner tick holds the definition's lease the answer is 409 automation_busy (retryable). 409 session_not_active when the target Session is not active; 409 automation_unavailable when the deployment has not enabled automation; 409 automation_operation_conflict when the key's binding already exists.", "x-qwen-implementation-status": "partial", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "202": { "description": "The fired occurrence and its run.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicAutomationRun" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/api/agent/web-shell/v1/tool-results/get": { "post": { "tags": ["WebShell"], "operationId": "getWebShellToolResult", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Authorized persisted tool result resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolResultResponse" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellToolResultRequest" } } } } } }, "/api/agent/web-shell/v1/artifacts/get": { "post": { "tags": ["WebShell"], "operationId": "getWebShellArtifact", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Authorized persisted artifact metadata.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactResponse" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellArtifactRequest" } } } } } }, "/api/agent/web-shell/v1/artifacts/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellArtifacts", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Authorized artifact metadata page.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellArtifactPage" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellArtifactQueryRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/items/{itemId}/tool-result": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "name": "itemId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "getToolResult", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Authorized persisted tool result resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolResultResponse" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v1/agents/sessions/{sessionId}/artifacts/{artifactId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/ArtifactId" } ], "get": { "tags": ["Public Resources"], "operationId": "getArtifact", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Authorized persisted artifact metadata.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactResponse" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/api/agent/web-shell/v1/sessions/unarchive": { "post": { "tags": ["WebShell"], "operationId": "unarchiveWebShellSession", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current WebShell Session; replay does not repeat the mutation.", "headers": { "X-Qwen-Idempotent-Replay": { "$ref": "#/components/headers/IdempotentReplay" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSession" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellLifecycleRequest" } } } }, "description": "Synchronously restores an archived Session to closed. Workspace-bound Sessions require completed reliable-close evidence and the Session's recorded owner with current read access (404 unreadable, 403 readable non-owner). Bound keys are tenant/Session/actor scoped. Replay returns the recorded outcome without repeating the mutation; a replay after delete answers with the Session as last visible — its pre-delete status — rather than 404. The permanent close fence is preserved and no Harness or Runtime call is made." } }, "/v1/agent-channels/{channelId}/deliveries/{deliveryId}": { "parameters": [ { "name": "channelId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } } ], "get": { "tags": ["Public Resources"], "operationId": "getAgentChannelDelivery", "x-qwen-implementation-status": "partial", "responses": { "200": { "description": "One delivery of the channel, including provider_receipt once the provider returned one. The model turn's completion and the external delivery stay separate views: a delivered segment does not say the user saw it. 404 delivery_not_found covers deliveries outside the caller's scope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicChannelDelivery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/api/agent/web-shell/v1/workspaces/create": { "post": { "tags": ["WebShell"], "operationId": "webShellCreateWorkspace", "x-qwen-implementation-status": "implemented", "description": "Create an empty Workspace under the operator-controlled root, or supply sourceWorkspaceId and cwdRelative together to select an existing directory under an ACTIVE ROOT Workspace owned by the actor. Existing-directory creation shares its verified storage, config and policy and persists a default working directory. The actor-scoped idempotency key pins the normalized request and source generation. Completed replay checks current access and never restores grants.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceCreateRequest" } } } }, "responses": { "200": { "description": "Created Workspace or authorized same-key replay.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspace" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/api/agent/web-shell/v1/session-options/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionOptions", "x-qwen-implementation-status": "implemented", "description": "Read effective approval policy options for an Agent in the authenticated tenant. Requires an actor. Does not create a Session or change an existing policy.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionOptionsRequest" } } } }, "responses": { "200": { "description": "Effective default and supported policies.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionOptions" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/session-models/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionModels", "x-qwen-implementation-status": "implemented", "description": "Read the allowed model catalog and current model selection of a readable Session. No credentials or provider routes are returned.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionModelsRequest" } } } }, "responses": { "200": { "description": "Session model options.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionModels" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/session-models/change": { "post": { "tags": ["WebShell"], "operationId": "changeWebShellSessionModel", "x-qwen-implementation-status": "implemented", "description": "Change the model selection of a Workspace Session for later Turns, including while a Turn or approval is active. Already admitted Turns keep their immutable model snapshot. Lifecycle, recovery and unsettled context changes remain guarded. The actor-scoped idempotency key replays an earlier completed change before current admission checks; expectedRevision prevents overwriting a concurrent selection.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellChangeModelRequest" } } } }, "responses": { "200": { "description": "The admitted model selection, or the same original result on replay.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellModelChangeResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/session-approval/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionApproval", "x-qwen-implementation-status": "implemented", "description": "Read the current policy and owner-authorized change support of a readable Workspace Session.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionApprovalRequest" } } } }, "responses": { "200": { "description": "The current policy options.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionApproval" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/session-approval/change": { "post": { "tags": ["WebShell"], "operationId": "changeWebShellSessionApproval", "x-qwen-implementation-status": "implemented", "description": "Change the execution approval policy of an eligible Workspace Session: built-in qwen-code or a stored AgentDefinition on exactly hosted-workspace-files/1, hosted-workspace-files/3, hosted-workspace-files/4, hosted-workspace-shell/1, hosted-workspace-shell/3 or hosted-workspace-shell/4. With liveSupported, execution policy changes affect subsequent current-Turn permission checks and permit eligible pending ordinary tool approvals. Otherwise the Session must be idle. Plan changes remain idle-only. Requires its recorded owner, current OPERATOR or OWNER access and Session-specific Harness feature support. Changes are revision-checked and actor/session-scoped idempotent. Definition creation policy and pins remain immutable. Classifier auto requires auto-approval/1. Optional permissionRules requires permission-rules/1 and an idle Session. Omitted rules preserve the current selection; three empty arrays clear it. Mode, Plan and rules share one approval revision and receipt. Persisted rules are also snapshotted at Turn admission; replay preserves the original policy. Empty rules are omitted from responses and Harness payloads.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellChangeApprovalRequest" } } } }, "responses": { "200": { "description": "The committed approval selection, or its original receipt on replay.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellApprovalChangeResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/runtime-nodes/query": { "post": { "tags": ["WebShell"], "operationId": "webShellQueryRuntimeNodes", "x-qwen-implementation-status": "implemented", "description": "Lists only administrator-configured SSH nodes authorized for the current tenant and actor. Requires a trusted actor. Registration is disabled by default and answers 200 with supported=false and an empty data array; an enabled deployment may answer supported=true with no authorized nodes. Node credentials, SSH aliases and server paths are not exposed. This read starts no worker.", "responses": { "200": { "description": "SSH registration capability and authorized machine display names.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" }, "Cache-Control": { "schema": { "type": "string", "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRuntimeNodePage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/workspaces/check-directory": { "post": { "tags": ["WebShell"], "operationId": "webShellCheckWorkspaceDirectory", "x-qwen-implementation-status": "implemented", "description": "Checks the configured Node.js and pinned qwen-code versions, allowed directory range, existing canonical directory and access permissions over SSH. Requires an enabled deployment and an exact tenant/actor node grant; disabled registration answers 404 ssh_runtime_disabled and an unknown or unauthorized node answers 403 runtime_node_forbidden. This is a preview: registration revalidates the directory and never creates a directory, clones a repository or starts a worker.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceDirectoryRequest" } } } }, "responses": { "200": { "description": "Validated canonical directory on the selected Linux or macOS node.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" }, "Cache-Control": { "schema": { "type": "string", "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceDirectory" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "502": { "description": "The SSH bootstrap response is invalid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/api/agent/web-shell/v1/workspaces/operations/get": { "post": { "tags": ["WebShell"], "operationId": "webShellGetWorkspaceOperation", "x-qwen-implementation-status": "implemented", "description": "Reads only a Workspace registration owned by the current tenant and actor; an unknown operation or another actor's operation answers 404 operation_not_found. Queries and accepted registration settlement remain available when new registration is disabled. Pending or running operations may resume their original registration attempt. A registration refused before it reserved its directory fails. One that may have reached its node is recovery_blocked and keeps the directory reserved while Java reads the node again, never registering anything: the registration's marker completes it, and a root without the marker, or holding another directory, fails it and releases the directory. Querying never unlocks it or starts a Runtime worker.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceOperationRequest" } } } }, "responses": { "200": { "description": "Latest durable state of the original actor-owned registration.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" }, "Cache-Control": { "schema": { "type": "string", "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceCreateOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/workspaces/register": { "post": { "tags": ["WebShell"], "operationId": "webShellRegisterWorkspace", "x-qwen-implementation-status": "implemented", "description": "Admits actor-scoped, idempotent registration of an existing remote directory. The request body carries idempotencyKey; a retry with the same nodeId, path and displayName returns the original operation and its latest durable state, even after new registration is disabled or node admission is revoked. Reusing the key for different content answers 409 idempotency_conflict. Fresh admission requires an enabled deployment and an authorized node (404 ssh_runtime_disabled or 403 runtime_node_forbidden). A completed operation atomically creates the Workspace and creator OWNER grant. 202 does not mean registration is complete; query the operation, then read the Workspace and its canCreateSession hint. This operation creates no Session and starts no Runtime worker. requestId is trace-only and excluded from the request digest.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceRegisterRequest" } } } }, "responses": { "202": { "description": "Durable registration operation; repeated requests retain the original identity.", "headers": { "X-Request-Id": { "$ref": "#/components/headers/RequestId" }, "Cache-Control": { "schema": { "type": "string", "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceCreateOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/workspaces/directories/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellWorkspaceDirectories", "x-qwen-implementation-status": "implemented", "description": "List bounded immediate real directories on the selected Workspace storage host. Requires an authenticated OWNER of the ACTIVE ROOT Workspace and verified LOCAL storage. Refuses traversal, symlinks and reserved maintenance directories; never uses the ordinary daemon filesystem. Root paths are disclosed only within this authorized scope.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceDirectoryQueryRequest" } } } }, "responses": { "200": { "description": "Authorized existing directories.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceDirectoryPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/api/agent/web-shell/v1/session-mcp/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionMcp", "x-qwen-implementation-status": "implemented", "description": "Read the selected Session's sanitized, committed MCP catalog. Requires a trusted actor and Workspace read access. Discovery states describe the published snapshot, not live Runtime health. Does not configure servers, discover capabilities or execute tools, resources or prompts.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } }, "responses": { "200": { "description": "Session MCP catalog snapshot.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicMcpCatalog" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/session-skills/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionSkills", "x-qwen-implementation-status": "implemented", "description": "Read only names and descriptions from the Session's pinned static Skill catalog. Requires a trusted actor and Workspace read access. Never resolves the latest AgentDefinition or discovers host Skills.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } }, "responses": { "200": { "description": "Session static Skill metadata.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionSkills" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/workspaces/files/query": { "post": { "tags": ["WebShell"], "operationId": "webShellWorkspaceFilesQuery", "x-qwen-implementation-status": "implemented", "description": "Browse directories or search file names within the persisted Workspace working directory. Requires a trusted actor with current OPERATOR or OWNER access to an ACTIVE Workspace, the deployment Workspace-files opt-in, and verified LOCAL or SSH_LOCAL storage. Authorization and binding are rechecked after I/O. Paths are relative to the working directory; host paths and Runtime credentials are never returned. Unsupported storage never falls back to the local daemon, and no Session, worker or model request is created.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFileQueryRequest" } } } }, "responses": { "200": { "description": "Authorized Workspace file result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFilePage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "summary": "Read-only Workspace file query" } }, "/api/agent/web-shell/v1/workspaces/files/read": { "post": { "tags": ["WebShell"], "operationId": "webShellWorkspaceFilesRead", "x-qwen-implementation-status": "implemented", "description": "Read one selection-time snapshot of a nonempty, NUL-free UTF-8 file, at most 24 KiB, using the scope revision returned by query. Requires a trusted actor with current OPERATOR or OWNER access to an ACTIVE Workspace, the deployment Workspace-files opt-in, and verified LOCAL or SSH_LOCAL storage. Authorization and binding are rechecked after I/O. Paths are relative to the working directory; host paths and Runtime credentials are never returned. Unsupported storage never falls back to the local daemon, and no Session, worker or model request is created.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFileReadRequest" } } } }, "responses": { "200": { "description": "Authorized Workspace file result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFileSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "summary": "Read-only Workspace file read" } }, "/api/agent/web-shell/v1/tool-details/get": { "post": { "tags": ["WebShell"], "operationId": "getWebShellToolDetails", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Bounded saved ReadFile/Shell input and text output, read on demand; requires a trusted actor and current Session/Workspace read access. Available to authorized readers without a feature switch.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellToolDetails" } } }, "headers": { "Cache-Control": { "schema": { "type": "string", "const": "private, no-store" } } } }, "400": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "Trusted actor required.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "description": "Unknown or unreadable resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "Resource temporarily unavailable.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "$ref": "#/components/responses/Conflict" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellToolResultRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/compress": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "compressSessionContext", "x-qwen-implementation-status": "implemented", "description": "Admits idle-only context compression without creating a Turn. A trusted Workspace OPERATOR or OWNER is required. Read authorization precedes actor-scoped idempotency replay; replay precedes mutable role, capability, revision and busy checks. Expected compaction revision begins at zero. Returns 409 session_context_busy for active or queued Turns, approvals, unsettled Hooks, recovery or conflicting context operations; 409 compaction_revision_conflict for a stale revision; 409 idempotency_conflict for key reuse with different content. A 202 is durable admission; query the original operation for completion. Unknown acceptance is reconciled from native evidence without blind redelivery. A compressed outcome invalidates the prior context usage until a new main-model observation; noop and failure preserve history and revision.", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompressSessionRequest" } } } }, "responses": { "202": { "description": "Durable context compression operation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicContextCompressionOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/sessions/compress": { "post": { "tags": ["WebShell"], "operationId": "webShellCompressContext", "x-qwen-implementation-status": "implemented", "description": "Admits idle-only context compression without creating a Turn. A trusted Workspace OPERATOR or OWNER is required. Read authorization precedes actor-scoped idempotency replay; replay precedes mutable role, capability, revision and busy checks. Expected compaction revision begins at zero. Returns 409 session_context_busy for active or queued Turns, approvals, unsettled Hooks, recovery or conflicting context operations; 409 compaction_revision_conflict for a stale revision; 409 idempotency_conflict for key reuse with different content. A 202 is durable admission; query the original operation for completion. Unknown acceptance is reconciled from native evidence without blind redelivery. A compressed outcome invalidates the prior context usage until a new main-model observation; noop and failure preserve history and revision.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellContextCompressionRequest" } } } }, "responses": { "202": { "description": "Durable context compression operation.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellContextCompressionOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/sessions/{sessionId}/mcp-management": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "getSessionMcpManagement", "x-qwen-implementation-status": "implemented", "description": "Requires a trusted Workspace operator and the Session creator execution grants. Manage only the selected active public Session; commands retain immutable definition pins, serialize while idle, and select only deployed Runtime definitions. Status reads persisted receipts without restarting or replaying the original effect. Management reattachment never drives recovery, cleanup, or wake dispatch. After a Harness restart, continue or recover the Session through its normal execution flow first; otherwise management returns 409 hosted_mcp_session_load_required. A fresh empty Session can initialize without a Turn; command status never creates one. Unsupported management queries return supported=false. Responses never include private executable recipes or credentials.", "responses": { "200": { "description": "Session-local MCP settings and operation snapshot. Inventory describes published pins rather than live connection health; operation status omits inventory.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v1/agents/sessions/{sessionId}/mcp-management/commands": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "post": { "tags": ["Public Resources"], "operationId": "submitSessionMcpManagement", "x-qwen-implementation-status": "implemented", "description": "Requires a trusted Workspace operator and the Session creator execution grants. Manage only the selected active public Session; commands retain immutable definition pins, serialize while idle, and select only deployed Runtime definitions. Status reads persisted receipts without restarting or replaying the original effect. Management reattachment never drives recovery, cleanup, or wake dispatch. After a Harness restart, continue or recover the Session through its normal execution flow first; otherwise management returns 409 hosted_mcp_session_load_required. A fresh empty Session can initialize without a Turn; command status never creates one. Unsupported management queries return supported=false. Responses never include private executable recipes or credentials.", "responses": { "200": { "description": "Session-local MCP settings and operation snapshot. Inventory describes published pins rather than live connection health; operation status omits inventory.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementCommand" } } } } } }, "/v1/agents/sessions/{sessionId}/mcp-management/commands/{operationId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "get": { "tags": ["Public Resources"], "operationId": "getSessionMcpManagementOperation", "x-qwen-implementation-status": "implemented", "description": "Requires a trusted Workspace operator and the Session creator execution grants. Manage only the selected active public Session; commands retain immutable definition pins, serialize while idle, and select only deployed Runtime definitions. Status reads persisted receipts without restarting or replaying the original effect. Management reattachment never drives recovery, cleanup, or wake dispatch. After a Harness restart, continue or recover the Session through its normal execution flow first; otherwise management returns 409 hosted_mcp_session_load_required. A fresh empty Session can initialize without a Turn; command status never creates one. Unsupported management queries return supported=false. Responses never include private executable recipes or credentials.", "responses": { "200": { "description": "Session-local MCP settings and operation snapshot. Inventory describes published pins rather than live connection health; operation status omits inventory.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/api/agent/web-shell/v1/session-mcp/management/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionMcpManagement", "x-qwen-implementation-status": "implemented", "description": "Requires a trusted Workspace operator and the Session creator execution grants. Manage only the selected active public Session; commands retain immutable definition pins, serialize while idle, and select only deployed Runtime definitions. Status reads persisted receipts without restarting or replaying the original effect. Management reattachment never drives recovery, cleanup, or wake dispatch. After a Harness restart, continue or recover the Session through its normal execution flow first; otherwise management returns 409 hosted_mcp_session_load_required. A fresh empty Session can initialize without a Turn; command status never creates one. Unsupported management queries return supported=false. Responses never include private executable recipes or credentials.", "responses": { "200": { "description": "Session-local MCP settings and operation snapshot. Inventory describes published pins rather than live connection health; operation status omits inventory.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellMcpManagementQuery" } } } } } }, "/api/agent/web-shell/v1/session-mcp/management/submit": { "post": { "tags": ["WebShell"], "operationId": "submitWebShellSessionMcpManagement", "x-qwen-implementation-status": "implemented", "description": "Requires a trusted Workspace operator and the Session creator execution grants. Manage only the selected active public Session; commands retain immutable definition pins, serialize while idle, and select only deployed Runtime definitions. Status reads persisted receipts without restarting or replaying the original effect. Management reattachment never drives recovery, cleanup, or wake dispatch. After a Harness restart, continue or recover the Session through its normal execution flow first; otherwise management returns 409 hosted_mcp_session_load_required. A fresh empty Session can initialize without a Turn; command status never creates one. Unsupported management queries return supported=false. Responses never include private executable recipes or credentials.", "responses": { "200": { "description": "Session-local MCP settings and operation snapshot. Inventory describes published pins rather than live connection health; operation status omits inventory.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellMcpManagementSubmit" } } } } } }, "/api/agent/web-shell/v1/session-mcp/management/operations/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionMcpManagementOperation", "x-qwen-implementation-status": "implemented", "description": "Requires a trusted Workspace operator and the Session creator execution grants. Manage only the selected active public Session; commands retain immutable definition pins, serialize while idle, and select only deployed Runtime definitions. Status reads persisted receipts without restarting or replaying the original effect. Management reattachment never drives recovery, cleanup, or wake dispatch. After a Harness restart, continue or recover the Session through its normal execution flow first; otherwise management returns 409 hosted_mcp_session_load_required. A fresh empty Session can initialize without a Turn; command status never creates one. Unsupported management queries return supported=false. Responses never include private executable recipes or credentials.", "responses": { "200": { "description": "Session-local MCP settings and operation snapshot. Inventory describes published pins rather than live connection health; operation status omits inventory.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedMcpManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellMcpManagementOperationQuery" } } } } } }, "/v1/agents/sessions/{sessionId}/recovery": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Sessions"], "operationId": "getSessionRecovery", "x-qwen-implementation-status": "implemented", "description": "Read authorized durable recovery facts and only already attached Harness evidence without loading a Session, acquiring a Runtime, invoking tools or models, stopping work or clearing a block. Missing or unreadable native readiness evidence never proves ready. This is Session-scoped; ordinary Workspace admission and concurrent unrelated Sessions remain independent.", "responses": { "200": { "description": "Current recovery evidence.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRecovery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/v1/agents/sessions/{sessionId}/recovery/recheck": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "post": { "tags": ["Public Sessions"], "operationId": "recheckSessionRecovery", "x-qwen-implementation-status": "implemented", "description": "Recheck only the latest original Turn under the existing cancellation/cleanup authorization. Repeated requests coalesce and may only advance existing cancellation/reconciliation or retry settled cleanup; they never resubmit input, replay effects, reset retry budgets or change claim generations. A stale Turn returns recovery_target_changed and ineligible work returns recovery_recheck_unavailable. 202 means requested, not cancelled or ready. For a terminal Java Turn whose Harness attachment is cold or whose status cannot be read, this POST may attempt a narrow cleanup-only load. It must verify the original prompt has a durable native terminal, covered continuation checkpoint or lawful initial state, and no pending input before retrying only its existing cleanup. It never resumes models, tools, MCP or Hooks, clears a permanent journal block, or treats a historical SQL failure as native settlement.", "responses": { "202": { "description": "Current recovery evidence; recheck admission is not settlement.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRecovery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecoveryRecheckRequest" } } } } } }, "/api/agent/web-shell/v1/session-recovery/query": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellSessionRecovery", "x-qwen-implementation-status": "implemented", "description": "Read authorized durable recovery facts and only already attached Harness evidence without loading a Session, acquiring a Runtime, invoking tools or models, stopping work or clearing a block. Missing or unreadable native readiness evidence never proves ready. This is Session-scoped; ordinary Workspace admission and concurrent unrelated Sessions remain independent.", "responses": { "200": { "description": "Current recovery evidence.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRecovery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } } } }, "/api/agent/web-shell/v1/session-recovery/recheck": { "post": { "tags": ["WebShell"], "operationId": "recheckWebShellSessionRecovery", "x-qwen-implementation-status": "implemented", "description": "Recheck only the latest original Turn under the existing cancellation/cleanup authorization. Repeated requests coalesce and may only advance existing cancellation/reconciliation or retry settled cleanup; they never resubmit input, replay effects, reset retry budgets or change claim generations. A stale Turn returns recovery_target_changed and ineligible work returns recovery_recheck_unavailable. 202 means requested, not cancelled or ready. For a terminal Java Turn whose Harness attachment is cold or whose status cannot be read, this POST may attempt a narrow cleanup-only load. It must verify the original prompt has a durable native terminal, covered continuation checkpoint or lawful initial state, and no pending input before retrying only its existing cleanup. It never resumes models, tools, MCP or Hooks, clears a permanent journal block, or treats a historical SQL failure as native settlement.", "responses": { "202": { "description": "Current recovery evidence; recheck admission is not settlement.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionRecovery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRecoveryRecheckRequest" } } } } } }, "/api/agent/web-shell/v1/sessions/export/query": { "post": { "tags": ["WebShell"], "operationId": "webShellExportSession", "x-qwen-implementation-status": "implemented", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExportRequest" } } } }, "responses": { "200": { "description": "Chronological page of current message Items within the initial sequence membership range; content remains live.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExportPage" } } } }, "400": { "$ref": "#/components/responses/InvalidMessagePage" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/MessagePageTooLarge" }, "409": { "$ref": "#/components/responses/MessageProjectionChanged" }, "503": { "$ref": "#/components/responses/MessageProjectionPending" } }, "description": "Requires current Session read authorization on every page. Read current message bodies forward within the first request sequence membership bound. snapshotThroughSequence retains its wire name for that fixed bound and does not change between pages. Content and status may change; no frozen snapshot version or cursor retention is provided. An initial projection behind committed events returns retryable message_projection_pending instead of silently exporting incomplete history. No private journal, Runtime or storage credentials are returned. A projection-generation change returns 409 message_projection_changed; discard the cursor and restart this read.", "summary": "Read one current Session message page for exports" } }, "/v1/agents/sessions/{sessionId}/user-messages": { "get": { "operationId": "queryUserMessages", "tags": ["Public Resources"], "summary": "Query or mutate the durable Session user message queue", "responses": { "200": { "description": "Authoritative queue snapshot", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMessageSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-qwen-implementation-status": "partial" }, "post": { "operationId": "commandUserMessages", "tags": ["Public Resources"], "summary": "Query or mutate the durable Session user message queue", "responses": { "200": { "description": "Authoritative queue snapshot", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMessageSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMessageCommand" } } } }, "x-qwen-implementation-status": "partial" } }, "/api/agent/web-shell/v1/user-messages/query": { "post": { "operationId": "webShellQueryUserMessages", "tags": ["WebShell"], "summary": "Query or mutate the durable Session user message queue", "responses": { "200": { "description": "Authoritative queue snapshot", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMessageSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellUserMessageQuery" } } } }, "x-qwen-implementation-status": "partial" } }, "/api/agent/web-shell/v1/user-messages/command": { "post": { "operationId": "webShellCommandUserMessages", "tags": ["WebShell"], "summary": "Query or mutate the durable Session user message queue", "responses": { "200": { "description": "Authoritative queue snapshot", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMessageSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellUserMessageCommand" } } } }, "x-qwen-implementation-status": "partial" } }, "/v1/agents/workspaces/{workspaceId}/extensions": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "get": { "tags": ["Public Resources"], "operationId": "listWorkspaceExtensionPackages", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageCatalog" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } }, "post": { "tags": ["Public Resources"], "operationId": "createWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires an ACTIVE Workspace, an authenticated operator and the deployment extension allowlist. The Idempotency-Key binds an actor-scoped durable operation. Publication retains immutable tar.gz bytes under a server-assigned stable extension identity; it does not activate a Session. The manifest query is base64url JSON and is covered by the existing request signature. Archive contents and Runtime compatibility are validated by the target compiler before activation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" }, { "name": "packageDigest", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, { "name": "manifest", "in": "query", "required": true, "schema": { "type": "string", "description": "Base64url-encoded ManagedExtensionPackageManifest JSON. Canonical schemaVersion/compilerVersion are 1." } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/{extensionId}/packages/{packageDigest}": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "extensionId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "packageDigest", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } ], "put": { "tags": ["Public Resources"], "operationId": "publishWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires an ACTIVE Workspace, an authenticated operator and the deployment extension allowlist. The Idempotency-Key binds an actor-scoped durable operation. Publication retains immutable tar.gz bytes under a server-assigned stable extension identity; it does not activate a Session. The manifest query is base64url JSON and is covered by the existing request signature. Archive contents and Runtime compatibility are validated by the target compiler before activation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" }, { "name": "manifest", "in": "query", "required": true, "schema": { "type": "string", "description": "Base64url-encoded ManagedExtensionPackageManifest JSON. Canonical schemaVersion/compilerVersion are 1." } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/{extensionId}/packages/{packageRevision}": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "extensionId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "packageRevision", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9007199254740991 } }, { "name": "packageDigest", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } ], "get": { "tags": ["Public Resources"], "operationId": "getWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/{extensionId}/packages/{packageRevision}/archive": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "extensionId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "packageRevision", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9007199254740991 } }, { "name": "packageDigest", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } ], "get": { "tags": ["Public Resources"], "operationId": "readWorkspaceExtensionArchive", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "The exact immutable archive named by the pin. Private no-store binary stream, bounded to 100 MiB.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/{extensionId}/settings": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "extensionId", "in": "path", "required": true, "schema": { "type": "string" } } ], "get": { "tags": ["Public Resources"], "operationId": "getWorkspaceExtensionPackageSettings", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageSettings" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } }, "post": { "tags": ["Public Resources"], "operationId": "setWorkspaceExtensionPackageSettings", "x-qwen-implementation-status": "implemented", "description": "Requires the same Workspace operator and deployment permission as publication. Writes a complete encrypted settings revision with optimistic concurrency; old pinned revisions remain available. No values are returned.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageSettingsCommand" } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/operations/{operationId}": { "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string" } } ], "get": { "tags": ["Public Resources"], "operationId": "getWorkspaceExtensionPackageOperation", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation. The querying actor must own the original publication or settings operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } } } }, "/api/agent/web-shell/v1/workspace-extensions/query": { "post": { "tags": ["WebShell"], "operationId": "queryWorkspaceExtensionPackages", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageCatalog" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionWorkspaceQuery" } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/packages/query": { "post": { "tags": ["WebShell"], "operationId": "queryWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionPackageQuery" } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/settings/query": { "post": { "tags": ["WebShell"], "operationId": "queryWorkspaceExtensionPackageSettings", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageSettings" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionQuery" } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/settings/submit": { "post": { "tags": ["WebShell"], "operationId": "submitWorkspaceExtensionPackageSettings", "x-qwen-implementation-status": "implemented", "description": "Requires the same Workspace operator and deployment permission as publication. Writes a complete encrypted settings revision with optimistic concurrency; old pinned revisions remain available. No values are returned.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionSettingsSubmit" } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/operations/query": { "post": { "tags": ["WebShell"], "operationId": "queryWorkspaceExtensionPackageOperation", "x-qwen-implementation-status": "implemented", "description": "Requires an authenticated actor with a read grant on the persisted Workspace. Reads durable metadata only; never creates a Runtime, loads a Harness Session, or retries an original operation. The querying actor must own the original publication or settings operation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionOperationQuery" } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/publish": { "post": { "tags": ["WebShell"], "operationId": "publishWebShellWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires an ACTIVE Workspace, an authenticated operator and the deployment extension allowlist. The Idempotency-Key binds an actor-scoped durable operation. Publication retains immutable tar.gz bytes under a server-assigned stable extension identity; it does not activate a Session. The manifest query is base64url JSON and is covered by the existing request signature. Archive contents and Runtime compatibility are validated by the target compiler before activation.", "responses": { "200": { "description": "Persisted Workspace extension resource. Contains no settings values or executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "name": "workspaceId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "extensionId", "in": "query", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/IdempotencyKey" }, { "name": "packageDigest", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, { "name": "manifest", "in": "query", "required": true, "schema": { "type": "string", "description": "Base64url-encoded ManagedExtensionPackageManifest JSON. Canonical schemaVersion/compilerVersion are 1." } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/v1/agents/sessions/{sessionId}/extensions": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "tags": ["Public Resources"], "operationId": "getSessionExtensionConfiguration", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } }, "post": { "tags": ["Public Resources"], "operationId": "applySessionExtensionConfiguration", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionApplySelection" } } } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ] } }, "/v1/agents/sessions/{sessionId}/extensions/operations/{operationId}": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "get": { "tags": ["Public Resources"], "operationId": "getSessionExtensionOperation", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v1/agents/sessions/{sessionId}/extensions/operations/{operationId}/continue": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "post": { "tags": ["Public Resources"], "operationId": "continueSessionExtensionOperation", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v1/agents/sessions/{sessionId}/extensions/operations/{operationId}/recover-previous": { "parameters": [ { "$ref": "#/components/parameters/SessionId" }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "post": { "tags": ["Public Resources"], "operationId": "recoverPreviousSessionExtensions", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/api/agent/web-shell/v1/session-extensions/query": { "post": { "tags": ["WebShell"], "operationId": "webShellSessionExtensionsQuery", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionSessionQuery" } } } } } }, "/api/agent/web-shell/v1/session-extensions/submit": { "post": { "tags": ["WebShell"], "operationId": "webShellSessionExtensionsSubmit", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionSessionSubmit" } } } } } }, "/api/agent/web-shell/v1/session-extensions/continue": { "post": { "tags": ["WebShell"], "operationId": "webShellSessionExtensionsContinue", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionSessionOperation" } } } } } }, "/api/agent/web-shell/v1/session-extensions/recover-previous": { "post": { "tags": ["WebShell"], "operationId": "webShellSessionExtensionsRecoverPrevious", "x-qwen-implementation-status": "implemented", "description": "Requires a Workspace reader for status and OPERATOR for changes. Status reads durable configuration and never loads a Harness or retries an operation. Apply requires an idle Session and the original Runtime with the package execution contract; a committed unknown outcome fences new execution until the original operation is reconciled. Explicit recovery compiles previous content into a new revision.", "responses": { "200": { "description": "Persisted or reconciled Session configuration; contains no settings values or private executable recipes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "description": "The original MCP Runtime or management operation cannot be confirmed. Retry the same operation identity.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionSessionOperation" } } } } } }, "/api/agent/web-shell/v1/workspaces/files/upload": { "post": { "tags": ["WebShell"], "operationId": "webShellWorkspaceFilesUpload", "x-qwen-implementation-status": "implemented", "summary": "Upload one binary file to a persisted Workspace", "description": "Requires a trusted actor with OPERATOR or OWNER access, enabled Workspace files, verified LOCAL or SSH_LOCAL storage and an updated CLI. Uploads are limited to 8 MiB, require an existing parent directory and never overwrite an occupied path. A durable physical storage hold excludes tool execution and retirement until the original upload has a definite terminal result. Repeating the same upload ID reconciles its original command without replaying mutation; changed requests conflict. CSI is unsupported and never falls back to a primary Workspace. An uncertain result returns 503 workspace_upload_pending and must be queried by the original upload ID.", "parameters": [ { "name": "workspaceId", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } }, { "name": "cwdRelative", "in": "query", "required": false, "schema": { "type": "string", "minLength": 1, "maxLength": 1024 } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 1024 } }, { "name": "expectedScopeRevision", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 64 } }, { "name": "uploadId", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 36, "format": "uuid" } }, { "name": "sessionId", "in": "query", "required": false, "schema": { "type": "string", "format": "uuid" }, "description": "Exactly one locator: Session ID, or Workspace ID plus cwdRelative." } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "responses": { "200": { "description": "Workspace upload result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFileUploadResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" }, "413": { "description": "The upload exceeds the 8 MiB binary limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "Uploads require unencoded application/octet-stream bytes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/api/agent/web-shell/v1/workspaces/files/uploads/query": { "post": { "tags": ["WebShell"], "operationId": "webShellWorkspaceFilesUploadQuery", "x-qwen-implementation-status": "implemented", "summary": "Reconcile the original Workspace upload", "description": "Only the admitting actor with a current Workspace operator grant can query the upload. Status checks use the frozen original storage target and never execute an upload or select a replacement Runtime. Reconciliation remains available through storage fencing; pending commands retain their durable hold. The server also reconciles pending uploads after client cancellation or restart.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFileUploadQueryRequest" } } } }, "responses": { "200": { "description": "Workspace upload result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellWorkspaceFileUploadStatus" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/api/agent/web-shell/v1/workspaces/worktrees/options": { "post": { "operationId": "webShellSessionWorktreeOptions", "tags": ["WebShell"], "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "summary": "Options a main Session worktree", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreeOptionsRequest" } } } }, "responses": { "200": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreeOptions" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/api/agent/web-shell/v1/workspaces/worktrees/query": { "post": { "operationId": "webShellSessionWorktreeQuery", "tags": ["WebShell"], "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "summary": "Query a main Session worktree", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreeQueryRequest" } } } }, "responses": { "200": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreePage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/api/agent/web-shell/v1/workspaces/worktrees/inspect": { "post": { "operationId": "webShellSessionWorktreeInspect", "tags": ["WebShell"], "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "summary": "Inspect a main Session worktree", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreeInspectRequest" } } } }, "responses": { "200": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreeInspection" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/api/agent/web-shell/v1/workspaces/worktrees/cleanup": { "post": { "operationId": "webShellSessionWorktreeCleanup", "tags": ["WebShell"], "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "summary": "Cleanup a main Session worktree", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktreeCleanupRequest" } } } }, "responses": { "202": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionWorktree" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } } } }, "/v1/agents/workspaces/{workspaceId}/worktrees/options": { "get": { "operationId": "sessionWorktreeOptions", "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "cwd_relative", "in": "query", "schema": { "type": "string", "default": "." } }, { "name": "base_ref", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionWorktreeOptions" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "summary": "Options a main Session worktree" } }, "/v1/agents/workspaces/{workspaceId}/worktrees": { "get": { "operationId": "sessionWorktreeQuery", "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionWorktreePage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "summary": "Query a main Session worktree" } }, "/v1/agents/workspaces/{workspaceId}/worktrees/{worktreeId}": { "get": { "operationId": "sessionWorktreeInspect", "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "worktreeId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionWorktreeInspection" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "summary": "Inspect a main Session worktree" } }, "/v1/agents/workspaces/{workspaceId}/worktrees/{worktreeId}/cleanup": { "post": { "operationId": "sessionWorktreeCleanup", "x-qwen-implementation-status": "implemented", "x-qwen-admission-rule": "session_worktree", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "worktreeId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "Session worktree result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionWorktree" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "summary": "Cleanup a main Session worktree" } }, "/api/agent/web-shell/v1/transcript/items/query": { "post": { "tags": ["WebShell"], "operationId": "webShellRecentTranscriptItems", "x-qwen-implementation-status": "implemented", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExportRequest" } } } }, "responses": { "200": { "description": "Bounded recent current message Item page. Items are chronological within each page.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExportPage" } } } }, "400": { "$ref": "#/components/responses/InvalidMessagePage" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "403": { "$ref": "#/components/responses/Forbidden" }, "413": { "$ref": "#/components/responses/MessagePageTooLarge" }, "409": { "$ref": "#/components/responses/MessageProjectionChanged" }, "503": { "$ref": "#/components/responses/MessageProjectionPending" } }, "description": "Requires current Session read authorization on every page. Read at most limit recent current message Items in chronological order; nextCursor continues toward older Items in the initial sequence membership range. snapshotThroughSequence names that fixed membership upper bound, while bodies and statuses remain live. Cursors bind scope, backward direction and projection generation. Rebuild invalidates the cursor. No snapshot copies are generated and no live tail is scanned; transcript reads provide actual projection coverage for SSE handoff. Projection coverage below the replay floor returns retryable message_projection_pending.", "summary": "Read recent current Session Items and page toward older Items" } }, "/v1/agents/memory-stores": { "post": { "tags": ["Personal Memory"], "operationId": "createPersonalMemoryStore", "x-qwen-implementation-status": "implemented", "description": "Creates or returns the trusted actor's one personal Store. Requires memory enablement. The request cannot select an owner or tenant.", "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false } } } }, "responses": { "200": { "description": "Current authenticated user's personal memory resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryStore" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "503": { "$ref": "#/components/responses/Unavailable" }, "403": { "$ref": "#/components/responses/Forbidden" } } }, "get": { "tags": ["Personal Memory"], "operationId": "listPersonalMemoryStores", "x-qwen-implementation-status": "implemented", "description": "Lists only the trusted actor's personal Store (zero or one).", "responses": { "200": { "description": "Current authenticated user's personal memory resource.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryStoreList" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "503": { "$ref": "#/components/responses/Unavailable" }, "403": { "$ref": "#/components/responses/Forbidden" } } } }, "/v1/agents/sessions/{sessionId}/context-usage": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "description": "The last durably committed main-model request. Category counts are estimates; provider totals and freshness are independent. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "The last durably committed main-model request. Category counts are estimates; provider totals and freshness are independent.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticContextUsage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["Public Sessions"], "operationId": "getSessionDiagnosticContextUsage" } }, "/api/agent/web-shell/v1/session-context-usage/query": { "post": { "description": "The last durably committed main-model request. Category counts are estimates; provider totals and freshness are independent. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "The last durably committed main-model request. Category counts are estimates; provider totals and freshness are independent.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticContextUsage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["WebShell"], "operationId": "querySessionDiagnosticContextUsage", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/stats": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "description": "Durable model statistics owned by this Session, including Hook and compression calls. Child Session totals are separate. Coverage gaps are retained. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Durable model statistics owned by this Session, including Hook and compression calls. Child Session totals are separate. Coverage gaps are retained.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticStats" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["Public Sessions"], "operationId": "getSessionDiagnosticModelStatistics" } }, "/api/agent/web-shell/v1/session-stats/query": { "post": { "description": "Durable model statistics owned by this Session, including Hook and compression calls. Child Session totals are separate. Coverage gaps are retained. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Durable model statistics owned by this Session, including Hook and compression calls. Child Session totals are separate. Coverage gaps are retained.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticStats" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["WebShell"], "operationId": "querySessionDiagnosticModelStatistics", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/resources": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "description": "Persisted Skills and MCP selection and bounded discovery history. This does not probe live connectivity; partial history remains explicit. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Persisted Skills and MCP selection and bounded discovery history. This does not probe live connectivity; partial history remains explicit.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticResources" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["Public Sessions"], "operationId": "getSessionDiagnosticResources" } }, "/api/agent/web-shell/v1/session-resources/query": { "post": { "description": "Persisted Skills and MCP selection and bounded discovery history. This does not probe live connectivity; partial history remains explicit. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Persisted Skills and MCP selection and bounded discovery history. This does not probe live connectivity; partial history remains explicit.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticResources" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["WebShell"], "operationId": "querySessionDiagnosticResources", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/agent-trace": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "description": "Direct child-agent invocations, filtered before pagination. A child link is returned only after verifying the relationship and child read access. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Direct child-agent invocations, filtered before pagination. A child link is returned only after verifying the relationship and child read access.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticAgentTrace" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["Public Sessions"], "operationId": "getSessionDiagnosticAgentTrace", "parameters": [ { "name": "cursor", "in": "query", "schema": { "type": "string", "maxLength": 256 } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } } ] } }, "/api/agent/web-shell/v1/session-agent-trace/query": { "post": { "description": "Direct child-agent invocations, filtered before pagination. A child link is returned only after verifying the relationship and child read access. Passive persisted Session read; never starts a Runtime, Harness or MCP discovery. Requires an authenticated actor and current Session read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Direct child-agent invocations, filtered before pagination. A child link is returned only after verifying the relationship and child read access.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticAgentTrace" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["WebShell"], "operationId": "querySessionDiagnosticAgentTrace", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellDiagnosticTraceRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/activity-stats": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "description": "Persisted execution diagnostics since the recorded collection start. Self scope; no Runtime acquisition or discovery. Requires an authenticated actor and current Session/Workspace read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Bounded Session execution diagnostics with explicit coverage.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticActivityStats" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["Public Sessions"], "operationId": "getSessionActivityStatistics" } }, "/api/agent/web-shell/v1/session-activity-stats/query": { "post": { "description": "Persisted execution diagnostics since the recorded collection start. Self scope; no Runtime acquisition or discovery. Requires an authenticated actor and current Session/Workspace read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Bounded Session execution diagnostics with explicit coverage.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticActivityStats" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["WebShell"], "operationId": "querySessionActivityStatistics", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/activity": { "parameters": [ { "$ref": "#/components/parameters/SessionId" } ], "get": { "description": "Persisted execution diagnostics since the recorded collection start. Self scope; no Runtime acquisition or discovery. Requires an authenticated actor and current Session/Workspace read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Bounded Session execution diagnostics with explicit coverage.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticActivityPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["Public Sessions"], "operationId": "getSessionActivity", "parameters": [ { "name": "kind", "in": "query", "required": true, "schema": { "type": "string", "enum": ["tools", "files", "skills"] } }, { "name": "cursor", "in": "query", "schema": { "type": "string", "maxLength": 512 } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } } ] } }, "/api/agent/web-shell/v1/session-activity/query": { "post": { "description": "Persisted execution diagnostics since the recorded collection start. Self scope; no Runtime acquisition or discovery. Requires an authenticated actor and current Session/Workspace read access.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Bounded Session execution diagnostics with explicit coverage.", "headers": { "Cache-Control": { "schema": { "type": "string" }, "description": "private, no-store" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedDiagnosticActivityPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "tags": ["WebShell"], "operationId": "querySessionActivity", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellActivityQueryRequest" } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/source-imports": { "post": { "tags": ["Public Resources"], "operationId": "importWorkspaceExtensionSource", "x-qwen-implementation-status": "implemented", "description": "Trusted business services select an exact Skill or Extension revision. Authorizes the source outside SQL transactions, compiles through managed-package-preparation/1, and publishes without installing. The request contains no storage location or credentials. Same key and request replay the original completed receipt without resolving the business source.", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 512 } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionSourceImport" } } } }, "responses": { "200": { "description": "The original source import receipt, including its immutable Managed Pin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionSourceImportResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } } }, "get": { "tags": ["Public Resources"], "operationId": "lookupWorkspaceExtensionSourceImport", "x-qwen-implementation-status": "implemented", "description": "Lookup by the original Idempotency-Key, including intents admitted before a source read failed. A pending result has no Pin until compilation and publication finish.", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 512 } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "200": { "description": "Original import intent or publication receipt.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionSourceImportResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/source-imports/{operationId}": { "get": { "tags": ["Public Resources"], "operationId": "getWorkspaceExtensionSourceImport", "x-qwen-implementation-status": "implemented", "description": "Returns the actor-scoped durable import receipt under current Workspace access, including pending publication. Does not resolve or download the business source.", "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 512 } }, { "name": "operationId", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 128 } } ], "responses": { "200": { "description": "The original source import receipt, including its immutable Managed Pin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionSourceImportResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/imports": { "post": { "tags": ["Public Resources"], "operationId": "importWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires Workspace operator and deployment publishing permission before consuming bounded input. Prepares without a Session, publishes immutable bytes and does not activate content. Retry the same input/version/target and key, or query the actor-scoped operation.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" }, "415": { "description": "Package imports require unencoded application/octet-stream bytes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" }, { "name": "metadata", "in": "query", "required": true, "description": "URL-encoded JSON ManagedExtensionImportMetadata, at most16KiB. Raw input digest is verified by the Hosted compiler.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionImportMetadata" } } } }, { "name": "extensionId", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^ext_[a-f0-9-]{36}$" } }, { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/imports": { "post": { "tags": ["WebShell"], "operationId": "importWebShellExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires Workspace operator and deployment publishing permission before consuming bounded input. Prepares without a Session, publishes immutable bytes and does not activate content. Retry the same input/version/target and key, or query the actor-scoped operation.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" }, "415": { "description": "Package imports require unencoded application/octet-stream bytes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" }, { "name": "metadata", "in": "query", "required": true, "description": "URL-encoded JSON ManagedExtensionImportMetadata, at most16KiB. Raw input digest is verified by the Hosted compiler.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionImportMetadata" } } } }, { "name": "extensionId", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^ext_[a-f0-9-]{36}$" } }, { "name": "workspaceId", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/{extensionId}/packages/{packageRevision}/inspection": { "get": { "tags": ["Public Resources"], "operationId": "inspectWorkspaceExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires publishing permission. Inspects exact published canonical bytes without hydrating settings, starting a Runtime or executing components. Literal credential fields are redacted; redaction markers must not be republished.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageInspection" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "extensionId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "packageRevision", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1 } }, { "name": "packageDigest", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } ] } }, "/api/agent/web-shell/v1/workspace-extensions/inspection/query": { "post": { "tags": ["WebShell"], "operationId": "inspectWebShellExtensionPackage", "x-qwen-implementation-status": "implemented", "description": "Requires publishing permission. Inspects exact published canonical bytes without hydrating settings, starting a Runtime or executing components. Literal credential fields are redacted; redaction markers must not be republished.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageInspection" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" }, "415": { "description": "Inspection queries require application/json.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionPackageQuery" } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/operations/lookup": { "post": { "tags": ["Public Resources"], "operationId": "lookupWorkspaceExtensionOperation", "x-qwen-implementation-status": "implemented", "description": "Read-only actor-scoped lookup by the original idempotency key. Does not resubmit or acquire Runtime ownership.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionOperationLookup" } } } }, "parameters": [ { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } } ] } }, "/api/agent/web-shell/v1/workspace-extensions/operations/lookup": { "post": { "tags": ["WebShell"], "operationId": "lookupWebShellExtensionOperation", "x-qwen-implementation-status": "implemented", "description": "Read-only actor-scoped lookup by the original idempotency key. Does not resubmit or acquire Runtime ownership.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionOperationLookup" } } } } } }, "/v1/agents/sessions/{sessionId}/extensions/operations/lookup": { "post": { "tags": ["Public Resources"], "operationId": "lookupSessionExtensionOperation", "x-qwen-implementation-status": "implemented", "description": "Read-only actor-scoped lookup by the original idempotency key. Does not resubmit or acquire Runtime ownership.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionApplyLookup" } } } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string" } } ] } }, "/api/agent/web-shell/v1/session-extensions/operations/lookup": { "post": { "tags": ["WebShell"], "operationId": "lookupWebShellSessionExtensionOperation", "x-qwen-implementation-status": "implemented", "description": "Read-only actor-scoped lookup by the original idempotency key. Does not resubmit or acquire Runtime ownership.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionManagementSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellExtensionApplyLookup" } } } } } }, "/v1/agents/workspaces/{workspaceId}/extensions/imports/preview": { "post": { "tags": ["Public Resources"], "operationId": "previewWorkspaceExtensionImport", "x-qwen-implementation-status": "implemented", "description": "Requires publishing permission. Previews validated normalized input without publishing a catalog revision or activating a Session. Retain exact input bytes, target, compiler version and source digest for the later explicit import.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageInspection" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" }, "415": { "description": "Package imports require unencoded application/octet-stream bytes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "parameters": [ { "name": "metadata", "in": "query", "required": true, "description": "URL-encoded JSON ManagedExtensionImportMetadata, at most16KiB. Raw input digest is verified by the Hosted compiler.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionImportMetadata" } } } }, { "name": "workspaceId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/api/agent/web-shell/v1/workspace-extensions/imports/preview": { "post": { "tags": ["WebShell"], "operationId": "previewWebShellExtensionImport", "x-qwen-implementation-status": "implemented", "description": "Requires publishing permission. Previews validated normalized input without publishing a catalog revision or activating a Session. Retain exact input bytes, target, compiler version and source digest for the later explicit import.", "responses": { "200": { "description": "Verified result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageInspection" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" }, "503": { "$ref": "#/components/responses/Unavailable" }, "415": { "description": "Package imports require unencoded application/octet-stream bytes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "parameters": [ { "name": "metadata", "in": "query", "required": true, "description": "URL-encoded JSON ManagedExtensionImportMetadata, at most16KiB. Raw input digest is verified by the Hosted compiler.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionImportMetadata" } } } }, { "name": "workspaceId", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600 } } } } } }, "/v1/agents/sessions/{sessionId}/extensions/skills/candidates": { "get": { "tags": ["Public Resources"], "operationId": "publicRuntimeSkillCandidates", "x-qwen-implementation-status": "implemented", "description": "Requires an authorized Workspace operator and enabled Runtime Skill import. Uses the exact original READY Runtime owner; discovery and snapshot preparation never provision a Runtime or apply configuration. Published imports require a separate explicit Session apply.", "responses": { "200": { "description": "Verified owner-scoped result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedRuntimeSkillCandidates" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ] } }, "/v1/agents/sessions/{sessionId}/extensions/skills/snapshot": { "post": { "tags": ["Public Resources"], "operationId": "publicRuntimeSkillSnapshot", "x-qwen-implementation-status": "implemented", "description": "Requires an authorized Workspace operator and enabled Runtime Skill import. Uses the exact original READY Runtime owner; discovery and snapshot preparation never provision a Runtime or apply configuration. Published imports require a separate explicit Session apply.", "responses": { "200": { "description": "Verified owner-scoped result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedRuntimeSkillSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedRuntimeSkillSnapshotRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/extensions/skills/imports": { "post": { "tags": ["Public Resources"], "operationId": "publicRuntimeSkillImports", "x-qwen-implementation-status": "implemented", "description": "Requires an authorized Workspace operator and enabled Runtime Skill import. Uses the exact original READY Runtime owner; discovery and snapshot preparation never provision a Runtime or apply configuration. Published imports require a separate explicit Session apply.", "responses": { "200": { "description": "Verified owner-scoped result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedRuntimeSkillImportRequest" } } } } } }, "/api/agent/web-shell/v1/session-extensions/skills/candidates/query": { "post": { "tags": ["WebShell"], "operationId": "webShellRuntimeSkillCandidates", "x-qwen-implementation-status": "implemented", "description": "Requires an authorized Workspace operator and enabled Runtime Skill import. Uses the exact original READY Runtime owner; discovery and snapshot preparation never provision a Runtime or apply configuration. Published imports require a separate explicit Session apply.", "responses": { "200": { "description": "Verified owner-scoped result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedRuntimeSkillCandidates" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRuntimeSkillQuery" } } } } } }, "/api/agent/web-shell/v1/session-extensions/skills/snapshot": { "post": { "tags": ["WebShell"], "operationId": "webShellRuntimeSkillSnapshot", "x-qwen-implementation-status": "implemented", "description": "Requires an authorized Workspace operator and enabled Runtime Skill import. Uses the exact original READY Runtime owner; discovery and snapshot preparation never provision a Runtime or apply configuration. Published imports require a separate explicit Session apply.", "responses": { "200": { "description": "Verified owner-scoped result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedRuntimeSkillSnapshot" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRuntimeSkillSnapshotRequest" } } } } } }, "/api/agent/web-shell/v1/session-extensions/skills/imports": { "post": { "tags": ["WebShell"], "operationId": "webShellRuntimeSkillImports", "x-qwen-implementation-status": "implemented", "description": "Requires an authorized Workspace operator and enabled Runtime Skill import. Uses the exact original READY Runtime owner; discovery and snapshot preparation never provision a Runtime or apply configuration. Published imports require a separate explicit Session apply.", "responses": { "200": { "description": "Verified owner-scoped result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "413": { "$ref": "#/components/responses/PayloadTooLarge" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellRuntimeSkillImportRequest" } } } } } }, "/v1/agents/sessions/{sessionId}/side-queries": { "post": { "tags": ["Public Sessions"], "operationId": "createSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SideQuery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SideQueryCreateRequest" } } } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "$ref": "#/components/parameters/IdempotencyKey" } ] }, "get": { "tags": ["Public Sessions"], "operationId": "listSessionSideQueries", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SideQueryPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } } ] } }, "/v1/agents/sessions/{sessionId}/side-queries/context": { "get": { "tags": ["Public Sessions"], "operationId": "getSessionSideQueryContext", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SideQueryContext" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ] } }, "/v1/agents/sessions/{sessionId}/side-queries/{queryId}": { "get": { "tags": ["Public Sessions"], "operationId": "getSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SideQuery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "queryId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ] } }, "/v1/agents/sessions/{sessionId}/side-queries/{queryId}/cancel": { "post": { "tags": ["Public Sessions"], "operationId": "cancelSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SideQuery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "queryId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ] } }, "/v1/agents/sessions/{sessionId}/side-queries/{queryId}/events": { "get": { "tags": ["Public Sessions"], "operationId": "streamSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Private full-state snapshots; an immediate SQL snapshot precedes one-second polling.", "content": { "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "parameters": [ { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "queryId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ] } }, "/api/agent/web-shell/v1/client-files/register": { "post": { "tags": ["WebShell"], "operationId": "registerWebShellClientFiles", "description": "Registers the calling actor's client directory grant into the Session and dispatches the one-time relay credential to the Harness server-side for the Runtime MCP leg; the credential is never part of the browser response. Requires the deployment opt-in and current execution authority on the bound ACTIVE Workspace. Registration is ephemeral session state: the bounded TTL queue holds the size-bounded JSON-RPC bodies (which may include file content) only until they settle or expire, no credential or directory path is persisted, and no file content enters the journal or public events beyond the normal durable tool-result policy.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "The registration ack (generation, toolCount, connectionId); the relay credential stays on the server-to-harness path.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesRegistration" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesRegisterRequest" } } } } } }, "/api/agent/web-shell/v1/client-files/unregister": { "post": { "tags": ["WebShell"], "operationId": "unregisterWebShellClientFiles", "description": "Closes the calling actor's registration (or an operator's teardown of it) and fails every queued request with the structured offline error.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "The closed binding summary.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesStatus" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesUnregisterRequest" } } } } } }, "/api/agent/web-shell/v1/client-files/status": { "post": { "tags": ["WebShell"], "operationId": "queryWebShellClientFilesStatus", "description": "Reads the Session's binding summary without the credential; an absent binding answers an empty 200.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "The binding summary, or an empty body when nothing is registered.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesStatus" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesStatusRequest" } } } } } }, "/api/agent/web-shell/v1/client-files/requests/stream": { "post": { "tags": ["WebShell"], "operationId": "streamWebShellClientFilesRequests", "description": "The browser downlink: SSE events named request carrying opaque JSON-RPC payloads for the registering actor's own active binding generation. Each poll revalidates the read grant.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Queued JSON-RPC requests as SSE events.", "content": { "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesStreamRequest" } } } } } }, "/api/agent/web-shell/v1/client-files/responses": { "post": { "tags": ["WebShell"], "operationId": "respondWebShellClientFiles", "description": "The browser uplink: settles one queued JSON-RPC request with either a response payload or a structured error code, never both.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "The request was settled.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesRespondReceipt" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellClientFilesRespondRequest" } } } } } }, "/api/agent/web-shell/v1/session-side-queries/create": { "post": { "tags": ["WebShell"], "operationId": "createWebShellSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQuery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "503": { "$ref": "#/components/responses/Unavailable" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryCreateRequest" } } } } } }, "/api/agent/web-shell/v1/session-side-queries/list": { "post": { "tags": ["WebShell"], "operationId": "listWebShellSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryListRequest" } } } } } }, "/api/agent/web-shell/v1/session-side-queries/context": { "post": { "tags": ["WebShell"], "operationId": "contextWebShellSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryContext" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSessionRequest" } } } } } }, "/api/agent/web-shell/v1/session-side-queries/get": { "post": { "tags": ["WebShell"], "operationId": "getWebShellSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQuery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryGetRequest" } } } } } }, "/api/agent/web-shell/v1/session-side-queries/cancel": { "post": { "tags": ["WebShell"], "operationId": "cancelWebShellSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Current actor-private state.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQuery" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryGetRequest" } } } } } }, "/api/agent/web-shell/v1/session-side-queries/stream": { "post": { "tags": ["WebShell"], "operationId": "streamWebShellSessionSideQuery", "description": "Actor-private durable side query. Generation requires deployment opt-in, explicit Session model_config, execution authority and side-query/1. Reads revalidate visibility and query ownership.", "x-qwen-implementation-status": "implemented", "responses": { "200": { "description": "Private full-state snapshots; an immediate SQL snapshot precedes one-second polling.", "content": { "text/event-stream": { "schema": { "type": "string" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" } }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebShellSideQueryGetRequest" } } } } } } }, "components": { "securitySchemes": { "trustedTenant": { "type": "apiKey", "in": "header", "name": "X-Qwen-Tenant-Id", "description": "The tenant scope of the request. In the gateway topology it is injected by the trusted authenticated gateway and never trusted from browser input; in signed mode (qwenSignature) the broker authenticates it as part of the signed header set." }, "trustedActor": { "type": "apiKey", "in": "header", "name": "X-Qwen-Actor-Id", "x-qwen-implementation-status": "planned", "description": "Verified actor identity. In the gateway topology it is injected by the authenticated gateway together with tenant and browser-supplied headers are stripped. In signed mode (qwenSignature) the broker authenticates it as part of the signed header set. Resource ACLs are mandatory in either mode; Action responder eligibility resolves to the Session's recorded owner or a Workspace OPERATOR, except a Shell Session, which only its recorded owner may answer and falls back to the tenant scope when neither an owner nor a create command was recorded. This header is not a browser credential." }, "qwenSignature": { "type": "apiKey", "in": "header", "name": "X-Qwen-Signature", "x-qwen-implementation-status": "implemented", "description": "Gateway-free authentication. The caller sends X-Qwen-Tenant-Id, X-Qwen-Actor-Id, X-Qwen-Signature-Timestamp (epoch seconds, within the server drift window) and X-Qwen-Signature: v1= over \"qwen-broker-auth-v1\\n\" + METHOD + \"\\n\" + request path (undecoded, without the query string) + \"\\n\" + raw query string (empty when absent) + \"\\n\" + tenant + \"\\n\" + actor + \"\\n\" + timestamp + \"\\n\" + lowercase hex SHA-256 of the raw request body + \"\\n\" + the Idempotency-Key header value (empty when absent), keyed by the server signing key. A missing actor, signature or timestamp header answers 401 authentication_required (a missing tenant header answers 400 invalid_tenant from the tenant filter); a stale timestamp or wrong signature answers 401 invalid_signature. Applies to every covered public and WebShell route, including the bare POST /v1/agents collection route and normalized path spellings. X-Qwen-Tenant-Id, X-Qwen-Actor-Id and X-Qwen-Signature-Timestamp are all mandatory alongside X-Qwen-Signature; an apiKey scheme names a single header by specification, so the other three are declared here in prose rather than as separate schemes." } }, "parameters": { "ActionId": { "name": "actionId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } }, "IdempotencyKey": { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } }, "SessionId": { "name": "sessionId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, "TurnId": { "name": "turnId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 64 } }, "ArtifactId": { "name": "artifactId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } }, "Cursor": { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 512 } }, "ListLimit": { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } }, "AfterSequence": { "name": "after", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0, "default": 0 } }, "EventLimit": { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 100 } }, "TaskId": { "name": "taskId", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 128 } }, "TaskEventCursor": { "name": "after", "in": "query", "required": false, "description": "Opaque task event cursor: an event cursor, a page next_cursor or a task output_cursor. Omit it to read from the durable retention floor. Strictly below the floor is 409 cursor_expired; equality is valid, including with no retained events.", "schema": { "type": "string", "minLength": 1, "maxLength": 512 } } }, "headers": { "IdempotentReplay": { "schema": { "type": "boolean" }, "description": "True when an accepted command or operation was replayed for the same idempotency key and digest without repeating its mutation. Session mutation responses represent the recorded outcome on the Session as last visible — a rename or unarchive replay after delete answers with the Session's pre-delete status rather than 404, while a create replay after delete answers 404 on the public create route, which re-reads the Session before responding, and answers the recorded 202 admission carrying the tombstoned sessionId on the WebShell create route, which does not re-read it; operation responses represent the original operation at its current state." }, "RequestId": { "schema": { "type": "string", "maxLength": 128 }, "description": "Trace-only correlation identifier; never an idempotency key." } }, "responses": { "Forbidden": { "description": "The authenticated actor belongs to another tenant than X-Qwen-Tenant-Id or has an invalid ID (actor_scope_mismatch, which the tenant filter answers on every /v1/agents/ and WebShell route), or the resource is readable but the actor lacks this operation or the original Action responder permission. Artifact content reads may also return artifact_content_forbidden when the actor cannot read the original bytes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "Unauthorized": { "description": "A trusted actor is required for this request but none was supplied (actor_required). In signed authentication mode (qwenSignature) every covered public and WebShell route additionally answers 401 authentication_required when the signature, timestamp or actor headers are missing, and 401 invalid_signature when the signature is wrong or stale.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "PayloadTooLarge": { "description": "In signed authentication mode (qwenSignature) a request body beyond the configured signed-body limit (qwen.managed-agent.auth.max-signed-body-bytes, default 10 MiB) answers 413 payload_too_large before the signature is compared.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "BadRequest": { "description": "Invalid request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "Conflict": { "description": "State, idempotency, or recovery conflict. New Workspace-scoped admissions return workspace_unavailable with retryable=false while an offline Workspace migration holds the storage fence; authorized durable replays retain their existing behavior.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "NotFound": { "description": "Resource absent or outside the caller tenant scope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "CursorExpired": { "description": "Replay cursor is older than the retained replay floor.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "TaskCursorExpired": { "description": "Task event cursor is strictly below the task's durable retention floor, which survives an empty retained set; equality is valid. The envelope's replay_floor_sequence and snapshot_through_sequence stay absent because task cursors are opaque.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "Unavailable": { "description": "A dependency such as the Hosted Harness is unavailable; retry later.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "MessageProjectionChanged": { "description": "409 message_projection_changed: the message projection generation changed. Discard the message cursor and restart this read; this is not replay-floor cursor expiration.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "MessagePageTooLarge": { "description": "413 message_page_too_large: selected message bodies or Turn control events exceed the response byte budget. Reducing limit can help a multi-Item page, but a single oversized Item cannot be returned even with limit=1. Signed POST requests may also return payload_too_large when their request body exceeds the configured signed-body limit.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "InvalidMessagePage": { "description": "400 invalid_message_cursor for malformed, wrong-scope, wrong-direction or out-of-range message cursors; invalid_limit outside 1..100; invalid_event_cursor for a negative numeric after.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "MessageProjectionPending": { "description": "503 message_projection_pending: projection coverage is below the replay floor, or the initial forward read is behind committed events. Retry after message projection catches up.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } }, "schemas": { "PublicMcpCatalog": { "type": "object", "additionalProperties": false, "required": ["object", "session_id", "servers"], "properties": { "object": { "const": "agent.mcp_catalog" }, "session_id": { "type": "string", "format": "uuid" }, "servers": { "type": "array", "items": { "$ref": "#/components/schemas/PublicMcpServerCatalog" } } } }, "PublicMcpServerCatalog": { "type": "object", "additionalProperties": false, "required": [ "server_id", "server_revision", "catalog_revision", "tools", "resources", "prompts", "discovery" ], "properties": { "server_id": { "type": "string", "minLength": 1 }, "server_revision": { "type": "integer", "minimum": 1 }, "catalog_revision": { "type": ["integer", "null"], "minimum": 1, "description": "The pinned catalog revision; null while no catalog has been published." }, "tools": { "type": "array", "items": { "$ref": "#/components/schemas/PublicMcpTool" } }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/PublicMcpResource" } }, "prompts": { "type": "array", "items": { "$ref": "#/components/schemas/PublicMcpPrompt" } }, "discovery": { "$ref": "#/components/schemas/PublicMcpDiscovery" } } }, "PublicMcpTool": { "type": "object", "additionalProperties": false, "required": ["name", "input_schema"], "properties": { "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "input_schema": { "type": "object", "additionalProperties": true } } }, "PublicMcpResource": { "type": "object", "additionalProperties": false, "required": ["name", "uri"], "properties": { "name": { "type": "string", "minLength": 1 }, "uri": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "mime_type": { "type": "string" } } }, "PublicMcpPrompt": { "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/PublicMcpPromptArgument" } } } }, "PublicMcpPromptArgument": { "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "required": { "type": "boolean" } } }, "PublicMcpDiscovery": { "type": "object", "additionalProperties": false, "required": ["tools", "resources", "prompts"], "properties": { "tools": { "type": "string", "enum": ["complete", "partial", "failed", "stale"] }, "resources": { "type": "string", "enum": ["complete", "partial", "failed", "stale"] }, "prompts": { "type": "string", "enum": ["complete", "partial", "failed", "stale"] } } }, "InputBlock": { "oneOf": [ { "$ref": "#/components/schemas/InputTextBlock" }, { "$ref": "#/components/schemas/InputFileBlock" }, { "$ref": "#/components/schemas/InputImageBlock" } ] }, "SessionModelConfig": { "type": "object", "additionalProperties": false, "required": ["protocol", "model", "base_url", "api_key"], "description": "Immutable Session connection. Requires session-model-config/1, encrypted storage and an endpoint in the control-plane allowlist. UTF-8 limits: model 512 bytes, base_url 2048 bytes, api_key 4096 bytes, complete canonical JSON 8192 bytes. Secrets are never returned in public Session responses. Child Sessions inherit the configuration. Cannot be combined with modelId.", "properties": { "protocol": { "type": "string", "enum": ["openai", "openai-responses", "anthropic", "gemini"] }, "model": { "type": "string", "minLength": 1, "maxLength": 512 }, "base_url": { "type": "string", "minLength": 1, "maxLength": 2048, "description": "Exact allowlisted HTTP(S) base URL without userinfo, query or fragment." }, "api_key": { "type": "string", "minLength": 1, "maxLength": 4096, "writeOnly": true }, "generation_config": { "type": "object", "additionalProperties": false, "properties": { "temperature": { "type": "number", "minimum": 0, "maximum": 2 }, "top_p": { "type": "number", "minimum": 0, "maximum": 1 }, "top_k": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, "max_tokens": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, "presence_penalty": { "type": "number", "minimum": -2, "maximum": 2 }, "frequency_penalty": { "type": "number", "minimum": -2, "maximum": 2 }, "seed": { "type": "integer", "minimum": -2147483648, "maximum": 2147483647 } } } } }, "CreateSessionRequest": { "type": "object", "additionalProperties": false, "required": ["agent_id"], "properties": { "agent_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "model_config": { "$ref": "#/components/schemas/SessionModelConfig" }, "agent_revision": { "type": ["string", "null"], "maxLength": 128, "description": "Optional explicit revision; omitted resolves the latest revision at admission and pins it. For the built-in qwen-code agent it must equal the deployment revision." }, "input": { "description": "Text has a 4,000,000-character aggregate budget and per-block 1,000,000-character cap, counted in code points. Hosted also enforces its 64 KiB durable-record limit for text-only inputs and a 32 MiB prepared-snapshot ceiling. A complete canonical input containing file/image attachments must fit within 8 MiB and requires input-attachments/1.", "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/InputBlock" } }, "metadata": { "type": "object", "additionalProperties": true }, "stream": { "type": "boolean", "default": false, "description": "Phase one requires false; stream through the events route." }, "workspace": { "$ref": "#/components/schemas/WorkspaceSelection", "x-qwen-implementation-status": "partial", "description": "W0. Only omission allows default resolution; null or an empty object is invalid. Resolve and persist an explicit authorized tenant default on first admission; no default means workspace_required. The caller request digest retains an omission marker; replay resolves the original receipt before defaults. A changed default must never rebind a retry. Unavailable W0 support rejects rather than ignores this field." }, "skills": { "type": "array", "maxItems": 256, "items": { "$ref": "#/components/schemas/SessionCreationSkill" }, "description": "Optional static Skills imported from the enabled management catalog or added explicitly to the pinned AgentDefinition catalog. The merged catalog has unique names, at most 256 entries, 512 KiB per body and 2 MiB compact JSON; a caller loop whose body is the verbatim bundled import is superseded by the definition's entry or the server variant rather than rejected; a user-authored caller loop that collides with a definition-authored loop is still rejected. On a creator-bearing tool profile the server also contributes a loop skill variant selected by the Session profile, replacing only the bundled caller import (carrying over its invocation flags) and added even when this array is empty; a user-authored caller loop or a definition-authored loop skill is preserved and suppresses the variant, and on a creator-less profile only the bundled caller import is dropped. Requires session-skills/2; persisted immutably and included in creation idempotency." }, "extensionPins": { "type": "array", "maxItems": 32, "items": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" }, "description": "Optional immutable initial extension selection. Omission keeps the legacy configuration path; an explicit empty array starts the unified configuration format. Included in creation idempotency and applied before the first model request. Requires session-extension-packages/1 and an extension-capable original Runtime." }, "worktree": { "type": "object", "additionalProperties": false, "properties": { "base_ref": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [], "description": "Opt into a main Session worktree on supported LOCAL storage. Omission uses the current directory; an empty object freezes HEAD at first admission. Requires an explicit Workspace. Preparation is durable and gates Runtime execution; replay preserves the original commit, directory and branch." }, "memory_store_id": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Optional immutable binding to the authenticated user's personal MemoryStore. Omission disables long-term memory. Bound Sessions require owner access as well as existing Workspace grants; creation idempotency includes this field." } } }, "SessionEventRequest": { "oneOf": [ { "$ref": "#/components/schemas/InputMessageEventRequest" }, { "$ref": "#/components/schemas/CancelEventRequest" } ], "discriminator": { "propertyName": "type" } }, "InputMessageEventRequest": { "type": "object", "additionalProperties": false, "required": ["type", "input"], "properties": { "type": { "const": "agent.session.input.message" }, "input": { "description": "Text has a 4,000,000-character aggregate budget and per-block 1,000,000-character cap, counted in code points. Hosted also enforces its 64 KiB durable-record limit for text-only inputs and a 32 MiB prepared-snapshot ceiling. A complete canonical input containing file/image attachments must fit within 8 MiB and requires input-attachments/1.", "type": "array", "minItems": 1, "maxItems": 100, "items": { "$ref": "#/components/schemas/InputBlock" } } } }, "CancelEventRequest": { "type": "object", "additionalProperties": false, "required": ["type", "turn_id"], "properties": { "type": { "const": "agent.session.cancel" }, "turn_id": { "type": "string", "minLength": 1, "maxLength": 64 } } }, "UpdateSessionRequest": { "type": "object", "additionalProperties": false, "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 256, "description": "The server enforces the bound in UTF-16 code units (Java String.length()), so an astral character counts as two: a title this schema's code-point maxLength accepts can still exceed the server's 256-unit bound and answer 400 invalid_title." } } }, "CommandAdmission": { "type": "object", "required": ["session_id", "status", "replayed"], "properties": { "session_id": { "type": "string", "format": "uuid" }, "turn_id": { "type": ["string", "null"], "maxLength": 64 }, "status": { "type": "string" }, "replayed": { "type": "boolean" }, "operation_id": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Durable operation identifier for turn submission or cancellation." }, "admission_stage": { "type": "string", "enum": ["java_durable", "harness_confirmed"], "description": "Persisted admission stage of the operation." }, "delivery_state": { "type": "string", "enum": ["pending", "leased", "confirmed", "blocked"], "description": "Current delivery state of the operation." } }, "dependentRequired": { "operation_id": ["operation_id", "admission_stage", "delivery_state"], "admission_stage": [ "operation_id", "admission_stage", "delivery_state" ], "delivery_state": [ "operation_id", "admission_stage", "delivery_state" ] }, "description": "Command admission. Session creation and internal commands may omit operation fields." }, "PublicSession": { "type": "object", "required": [ "id", "object", "agent_id", "agent_revision", "status", "created_at", "updated_at", "last_event_id", "capabilities" ], "properties": { "creation_operation_id": { "type": "string", "minLength": 1, "maxLength": 64, "x-qwen-implementation-status": "planned", "description": "Original create_session operation; creation retries resolve this identity before allocating another Session." }, "id": { "type": "string", "format": "uuid" }, "object": { "const": "agent.session" }, "agent_id": { "type": "string" }, "agent_revision": { "type": "string" }, "agent_digest": { "type": "string", "minLength": 64, "maxLength": 64, "description": "Digest of the pinned stored AgentDefinition revision (D8b); absent for the built-in qwen-code agent." }, "status": { "type": "string", "enum": [ "active", "archiving", "archived", "deleting", "closing", "closed", "failed", "recovery_blocked" ] }, "created_at": { "type": "integer", "format": "int64" }, "updated_at": { "type": "integer", "format": "int64" }, "metadata": { "type": "object", "additionalProperties": true }, "active_turn": { "oneOf": [ { "$ref": "#/components/schemas/PublicTurn" }, { "type": "null" } ] }, "last_event_id": { "type": "integer", "format": "int64", "minimum": 0 }, "replay_floor_sequence": { "type": "integer", "format": "int64", "minimum": 0, "default": 0, "description": "Events at or below this sequence may be pruned. A replay cursor strictly below this durable floor has expired, including after projection rebuild or removal of every retained event. Reload current Items to resynchronize; projection coverage below the floor returns retryable message_projection_pending." }, "snapshot_through_sequence": { "type": "integer", "format": "int64", "minimum": 0, "default": 0, "description": "Retained wire name for current message projection coverage; no persisted conversation snapshot is implied." }, "capabilities": { "$ref": "#/components/schemas/SessionCapabilities" }, "workspace": { "$ref": "#/components/schemas/WorkspaceContext", "x-qwen-implementation-status": "partial", "description": "Absent for unbound legacy records, whose execution stays blocked pending evidence-based migration. Ready means committed context, not an active Runtime gate." }, "archived_at": { "type": ["integer", "null"], "format": "int64", "x-qwen-implementation-status": "planned" }, "compaction_revision": { "type": ["integer", "null"], "format": "int64", "minimum": 0, "maximum": 9007199254740991, "default": 0, "description": "Sequence of the most recent native context.compacted event; independent of Workspace context revision. Omitted when retained pre-upgrade evidence cannot establish the revision, and context compression is unavailable." }, "context_compression_operation_id": { "type": ["string", "null"], "maxLength": 64, "description": "Current durable context compression operation, including recovery_blocked; absent when none is active." }, "recovery": { "$ref": "#/components/schemas/SessionRecovery" }, "worktree": { "oneOf": [ { "$ref": "#/components/schemas/SessionWorktree" }, { "type": "null" } ] }, "memory_store_id": { "type": "string", "description": "The personal MemoryStore selected at creation; absent when memory is disabled." }, "owner_only": { "type": "boolean", "description": "When true, only the owning actor with existing Workspace grants may access this Session. Private children inherit visibility without inheriting the Store binding." } } }, "SessionCapabilities": { "type": "object", "additionalProperties": false, "required": [ "items", "snapshots", "artifacts", "resync", "tasks", "actions" ], "properties": { "items": { "type": "boolean" }, "snapshots": { "type": "boolean", "description": "Retained capability name for reading the current message projection. It does not promise persisted fixed-version conversation snapshots." }, "artifacts": { "type": "boolean" }, "resync": { "type": "boolean" }, "workspace_context": { "type": "boolean", "default": false, "x-qwen-implementation-status": "planned" }, "cwd_change": { "type": "boolean", "default": false, "x-qwen-implementation-status": "planned" }, "actions": { "type": "boolean", "default": false }, "session_lifecycle": { "type": "boolean", "default": false, "description": "True when the Session accepts close, archive and delete operations; false for a Workspace-bound Session." }, "tasks": { "type": "boolean" }, "session_close": { "type": "boolean", "default": false, "description": "Deployment support for close independently of archive/delete; bound files Sessions require durable worker stop support. This is not actor authorization: admission also requires Session ownership and current read access." }, "session_archive": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Optional support for this retention operation. For a Workspace-bound Session requires completed reliable-close evidence; authorization and source-state validation still apply." }, "session_unarchive": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Optional support for this retention operation. For a Workspace-bound Session requires completed reliable-close evidence; authorization and source-state validation still apply." }, "session_delete": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Optional support capability. ACTIVE Workspace files Sessions require L3 lifecycle protocol and reliable original Runtime stop; CLOSED/ARCHIVED Sessions use independent L2 close evidence. Current creator/read authorization and idle/source-state admission checks still apply. The aggregate session lifecycle capability is unchanged." }, "foreground_shell": { "type": "boolean", "description": "Present only for persisted Shell Sessions, with no schema default; files and unbound Sessions omit it. True when Workspace files, Shell deployment admission and persisted default/auto-edit approval are valid. False prevents fresh sending. Disabling only the Shell flag preserves accepted cancellation and approval while Workspace files remain enabled and persisted approval remains valid; files-off or invalid approval can refuse attachment. This capability does not override authorization or recovery refusals.", "x-qwen-implementation-status": "implemented" }, "context_compression": { "type": "boolean", "default": false, "description": "Requires a compatible Hosted Harness and an active Workspace Session. WebShell also reflects the current caller OPERATOR or OWNER grant; admission separately checks idle state." }, "child_agents": { "type": "boolean", "default": false, "description": "Public child orchestration support for this persisted Session. New launches also require current deployment admission; existing task read, approval and cancellation remain independently authorized." }, "btw": { "type": "boolean", "default": false }, "recap": { "type": "boolean", "default": false } } }, "PublicTurn": { "type": "object", "required": ["id", "object", "session_id", "status", "created_at"], "properties": { "id": { "type": "string", "maxLength": 64 }, "object": { "const": "agent.turn" }, "session_id": { "type": "string", "format": "uuid" }, "input_item_id": { "type": ["string", "null"], "maxLength": 64 }, "status": { "type": "string", "enum": [ "accepted", "running", "cancelling", "completed", "failed", "cancelled", "recovery_blocked" ] }, "created_at": { "type": "integer", "format": "int64" }, "completed_at": { "type": ["integer", "null"], "format": "int64" }, "error_code": { "type": ["string", "null"], "maxLength": 128 }, "operation_id": { "type": "string", "minLength": 1, "maxLength": 64, "x-qwen-implementation-status": "planned" }, "admission_stage": { "type": "string", "enum": ["java_durable", "harness_confirmed"], "x-qwen-implementation-status": "planned" }, "delivery_state": { "type": "string", "enum": ["pending", "leased", "confirmed", "blocked"], "x-qwen-implementation-status": "planned" } } }, "PublicEvent": { "type": "object", "description": "A committed event, replayed with the versions and identity it was accepted with. A stream.reconciled event is the exception: it means that Harness recovery retracted earlier deltas of its Turn, which now have empty text and no item_id or content_part_id, and that later deltas may name other Parts. Start a fresh Items query and retry message_projection_pending until the returned snapshot_through_sequence reaches the stream.reconciled sequence. Resume after that returned sequence, which bounds the initial live-message membership range; content is not frozen.", "required": [ "schema_version", "projection_version", "sequence", "event_id", "session_id", "type", "created_at", "data", "terminal" ], "properties": { "schema_version": { "type": "integer", "minimum": 1 }, "projection_version": { "type": "integer", "minimum": 1 }, "sequence": { "type": "integer", "format": "int64", "minimum": 1 }, "event_id": { "type": "string", "maxLength": 64 }, "session_id": { "type": "string", "format": "uuid" }, "turn_id": { "type": ["string", "null"], "maxLength": 64 }, "item_id": { "type": ["string", "null"], "maxLength": 64 }, "content_part_id": { "type": ["string", "null"], "maxLength": 128 }, "type": { "type": "string", "maxLength": 128 }, "created_at": { "type": "integer", "format": "int64" }, "data": { "type": "object", "additionalProperties": true }, "terminal": { "type": "boolean" } } }, "SessionResyncRequired": { "type": "object", "additionalProperties": false, "required": [ "type", "session_id", "replay_floor_sequence", "snapshot_through_sequence", "action" ], "description": "Data of the agent.session.resync_required SSE frame. Read the Session and its Items, then resume after the snapshot_through_sequence that the Items list returns; the value in this frame can be older.", "properties": { "type": { "const": "agent.session.resync_required" }, "session_id": { "type": "string", "format": "uuid" }, "replay_floor_sequence": { "type": "integer", "format": "int64", "minimum": 0 }, "snapshot_through_sequence": { "type": "integer", "format": "int64", "minimum": 0, "description": "Retained wire name for current message projection coverage; no persisted conversation snapshot is implied." }, "action": { "const": "reload_snapshot" } } }, "PublicContentPart": { "type": "object", "required": [ "part_id", "type", "text", "first_sequence", "last_sequence" ], "properties": { "part_id": { "type": "string", "maxLength": 128 }, "type": { "type": "string", "enum": ["input_text", "output_text", "reasoning"] }, "text": { "type": "string" }, "first_sequence": { "type": "integer", "format": "int64", "minimum": 1 }, "last_sequence": { "type": "integer", "format": "int64", "minimum": 1 } } }, "PublicItem": { "type": "object", "required": [ "id", "object", "session_id", "type", "revision", "status", "first_sequence", "last_sequence", "content" ], "properties": { "id": { "type": "string", "maxLength": 64 }, "object": { "const": "agent.item" }, "session_id": { "type": "string", "format": "uuid" }, "turn_id": { "type": ["string", "null"], "maxLength": 64 }, "type": { "type": "string", "enum": [ "message", "reasoning", "tool_call", "tool_result", "approval", "error" ] }, "role": { "type": ["string", "null"], "enum": ["user", "assistant", "tool", "system", null] }, "revision": { "type": "integer", "minimum": 1 }, "status": { "type": "string" }, "first_sequence": { "type": "integer", "format": "int64", "minimum": 1 }, "last_sequence": { "type": "integer", "format": "int64", "minimum": 1 }, "content": { "type": "array", "items": { "$ref": "#/components/schemas/PublicContentPart" } }, "attributes": { "type": "object", "additionalProperties": true }, "created_at": { "type": "integer", "format": "int64" }, "updated_at": { "type": "integer", "format": "int64" } } }, "PublicArtifact": { "type": "object", "additionalProperties": false, "required": [ "object", "id", "session_id", "result_id", "revision", "stream_role", "byte_length", "sha256", "media_type", "availability", "created_at" ], "properties": { "object": { "const": "agent.artifact" }, "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "session_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "result_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "revision": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "stream_role": { "type": "string", "enum": ["stdout", "stderr"] }, "byte_length": { "type": "integer", "format": "int64", "minimum": 0 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "media_type": { "type": "string" }, "availability": { "type": "string", "enum": ["available", "unavailable"] }, "created_at": { "type": "integer", "format": "int64", "minimum": 0, "description": "Unix epoch milliseconds, unlike the seconds that the public Session, Turn, Event and Item resources report." } } }, "AgentDefinitionRequest": { "type": "object", "additionalProperties": false, "required": ["model", "instructions", "tools", "permission_policy"], "properties": { "model": { "type": "object", "additionalProperties": true }, "instructions": { "type": "string", "maxLength": 1000000 }, "tools": { "type": "array", "maxItems": 1000, "items": { "type": "object", "additionalProperties": true } }, "skills": { "description": "Stored revision content remains open to future options. Null or [] is the same as omitting the field. At Session admission only AgentStaticSkill shapes are supported, at most 16 with unique names and a Workspace tool profile; the compact UTF-8 JSON resource must not exceed 49152 bytes. Skill permissions, hooks, model overrides and other fields are refused at admission.", "type": ["array", "null"], "maxItems": 1000, "items": { "type": "object", "additionalProperties": true } }, "mcp_servers": { "description": "Stored revision content remains open to future options. Session admission supports AgentMcpServerPin shapes: 1-16 unique Runtime-provisioned server pins without recipes or credentials on explicitly allowlisted hosted-workspace-mcp/1 or hosted-workspace-shell/1. The legacy MCP profile requires nonempty pins; pins are optional on ordinary Shell, which retains Read/Write/Edit, Shell and file backups/rewind. Shell with MCP requires the Hosted workspace-shell-mcp/1 feature and Shell lifecycle v2 capability. Plan is explicitly unavailable with nonempty MCP pins. Other profiles, foreground-only SSH and dedicated CSI resident execution do not support these pins. Public close requires compatible lifecycle v2 support.", "type": ["array", "null"], "maxItems": 100, "items": { "type": "object", "additionalProperties": true } }, "hook_catalog": { "description": "Stored revision content remains open to future options. At Session admission only the AgentHookCatalogPin shape is supported: a Runtime-provisioned catalog identity, requiring a Workspace-bound tool profile, without recipes or credentials. Null is the same as omitting the field.", "type": ["object", "null"], "additionalProperties": true }, "permission_policy": { "type": "object", "additionalProperties": true }, "environment_template_id": { "type": ["string", "null"], "maxLength": 128 }, "metadata": { "description": "null is the same as omitting the field.", "type": ["object", "null"], "additionalProperties": true } } }, "AgentDefinition": { "type": "object", "required": ["id", "object", "revision", "digest", "created_at"], "properties": { "id": { "type": "string", "maxLength": 128 }, "object": { "const": "agent" }, "revision": { "type": "string", "maxLength": 128 }, "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "created_at": { "type": "integer", "format": "int64" }, "metadata": { "type": "object", "additionalProperties": true } } }, "PublicSessionList": { "type": "object", "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PublicSession" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } } }, "PublicEventList": { "type": "object", "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PublicEvent" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "description": "The after value for the next page; null when has_more is false." } } }, "PublicTurnList": { "type": "object", "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PublicTurn" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } } }, "PublicItemList": { "type": "object", "required": ["object", "data", "has_more", "snapshot_through_sequence"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PublicItem" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "description": "Opaque current-message continuation position; pass it as after or cursor. Bound to tenant, Session, forward direction, initial membership range and projection generation. Rebuild invalidates the cursor; no fixed snapshot retention or expiry is promised." }, "snapshot_through_sequence": { "type": "integer", "format": "int64", "minimum": 0, "description": "Fixed first-request sequence membership upper bound. Bodies and statuses are read live on every page; this does not identify a retained content version." } } }, "PublicArtifactList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more", "next_cursor"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ArtifactResponse" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } } }, "WebShellListRequest": { "type": "object", "additionalProperties": false, "properties": { "cursor": { "type": ["string", "null"], "maxLength": 512 }, "limit": { "type": ["integer", "null"], "minimum": 1, "maximum": 100, "default": 20 }, "archiveState": { "type": "string", "enum": ["unarchived", "archived", "all"], "default": "all", "description": "Filter before pagination. Omission preserves all readable, undeleted Sessions. Cursors are bound to the normalized archive state and title query." }, "titleQuery": { "type": ["string", "null"], "maxLength": 512, "description": "Case-insensitive literal title substring, with surrounding whitespace stripped. Empty means no title filter; %, _ and backslash are literal. Applied before pagination. Cursors are bound to the stripped query and archiveState; listing is not a snapshot across title or archive changes." } } }, "WebShellSessionRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" } } }, "WebShellTerminalTicketRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "terminalId"], "properties": { "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9._-]{1,256}$" }, "terminalId": { "type": "string", "pattern": "^[A-Za-z0-9._-]{1,256}$" } } }, "WebShellTerminalTicket": { "type": "object", "additionalProperties": false, "required": ["ticket", "expiresInSeconds"], "properties": { "ticket": { "type": "string" }, "expiresInSeconds": { "type": "integer", "format": "int64" } } }, "WebShellTranscriptRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "cursor": { "type": ["string", "null"], "maxLength": 4096 }, "limit": { "type": ["integer", "null"], "minimum": 1, "maximum": 100, "default": 100 } } }, "WebShellStreamRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "afterSequence": { "type": ["integer", "null"], "format": "int64", "minimum": 0, "default": 0 } } }, "WebShellCreateRequest": { "type": "object", "additionalProperties": false, "required": ["idempotencyKey", "agentId"], "properties": { "requestId": { "type": ["string", "null"], "maxLength": 128, "description": "Trace correlation only." }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "agentId": { "type": "string", "minLength": 1, "maxLength": 128 }, "modelId": { "type": "string", "minLength": 1, "description": "Optional host-catalog model for a bound built-in qwen-code Session. Requires modelSelectionSupported. Persisted atomically before the first Turn and included in creation idempotency; omission preserves the default model and old digest." }, "modelConfig": { "$ref": "#/components/schemas/SessionModelConfig" }, "title": { "type": ["string", "null"], "maxLength": 256, "description": "The server enforces the bound in UTF-16 code units (Java String.length()), so an astral character counts as two: a title this schema's code-point maxLength accepts can still exceed the server's 256-unit bound and answer 400 invalid_title." }, "input": { "description": "Text has a 4,000,000-character aggregate budget and per-block 1,000,000-character cap, counted in code points. Hosted also enforces its 64 KiB durable-record limit for text-only inputs and a 32 MiB prepared-snapshot ceiling. A complete canonical input containing file/image attachments must fit within 8 MiB and requires input-attachments/1.", "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/InputBlock" } }, "metadata": { "$ref": "#/components/schemas/WebShellMetadata" }, "workspace": { "$ref": "#/components/schemas/WebShellWorkspaceSelection", "x-qwen-implementation-status": "partial" }, "approvalMode": { "type": "string", "enum": ["default", "auto-edit", "yolo"], "description": "Optional initial execution policy for Workspace creation, validated against the resolved Agent and profile. Omission preserves its default and idempotency digest. Independent of planMode." }, "planMode": { "type": "boolean", "description": "Persisted public Plan overlay, independent of execution permission. Omission on a change preserves the selected state." }, "skills": { "type": "array", "maxItems": 256, "items": { "$ref": "#/components/schemas/SessionCreationSkill" }, "description": "Optional static Skills imported from the enabled management catalog or added explicitly to the pinned AgentDefinition catalog. The merged catalog has unique names, at most 256 entries, 512 KiB per body and 2 MiB compact JSON; a caller loop whose body is the verbatim bundled import is superseded by the definition's entry or the server variant rather than rejected; a user-authored caller loop that collides with a definition-authored loop is still rejected. On a creator-bearing tool profile the server also contributes a loop skill variant selected by the Session profile, replacing only the bundled caller import (carrying over its invocation flags) and added even when this array is empty; a user-authored caller loop or a definition-authored loop skill is preserved and suppresses the variant, and on a creator-less profile only the bundled caller import is dropped. Requires session-skills/2; persisted immutably and included in creation idempotency." }, "extensionPins": { "type": "array", "maxItems": 32, "items": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" }, "description": "Optional immutable initial extension selection. Omission keeps the legacy configuration path; an explicit empty array starts the unified configuration format. Included in creation idempotency and applied before the first model request. Requires session-extension-packages/1 and an extension-capable original Runtime." }, "worktree": { "type": "object", "additionalProperties": false, "properties": { "baseRef": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [], "description": "Opt into a main Session worktree on supported LOCAL storage. Omission uses the current directory; an empty object freezes HEAD at first admission. Requires an explicit Workspace. Preparation is durable and gates Runtime execution; replay preserves the original commit, directory and branch." }, "memoryStoreId": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Optional immutable binding to the authenticated user's personal MemoryStore. Omission disables long-term memory. Bound Sessions require owner access as well as existing Workspace grants; creation idempotency includes this field." } } }, "WebShellSubmitRequest": { "type": "object", "additionalProperties": false, "required": ["idempotencyKey", "sessionId"], "properties": { "requestId": { "type": ["string", "null"], "maxLength": 128, "description": "Trace correlation only." }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "sessionId": { "type": "string", "format": "uuid" }, "input": { "description": "Text has a 4,000,000-character aggregate budget and per-block 1,000,000-character cap, counted in code points. Hosted also enforces its 64 KiB durable-record limit for text-only inputs and a 32 MiB prepared-snapshot ceiling. A complete canonical input containing file/image attachments must fit within 8 MiB and requires input-attachments/1.", "type": "array", "minItems": 1, "maxItems": 100, "items": { "$ref": "#/components/schemas/InputBlock" } }, "metadata": { "$ref": "#/components/schemas/WebShellMetadata" } } }, "WebShellCancelRequest": { "type": "object", "additionalProperties": false, "required": ["idempotencyKey", "sessionId", "turnId"], "properties": { "requestId": { "type": ["string", "null"], "maxLength": 128, "description": "Trace correlation only." }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "sessionId": { "type": "string", "format": "uuid" }, "turnId": { "type": "string", "minLength": 1, "maxLength": 64 } } }, "WebShellMetadata": { "type": ["object", "null"], "additionalProperties": true, "description": "Arbitrary caller metadata, as a JSON object (or null). Accepted and ignored in Phase 1: nothing from it is persisted. On WebShellCreateRequest the Session title travels in that request's own `title` field; WebShellSubmitRequest has no title surface. Any keys are valid." }, "WebShellAdmission": { "type": "object", "required": ["sessionId", "status", "replayed"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "turnId": { "type": ["string", "null"], "maxLength": 64 }, "status": { "type": "string" }, "replayed": { "type": "boolean" }, "operationId": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Durable operation identifier for turn submission or cancellation." }, "admissionStage": { "type": "string", "enum": ["java_durable", "harness_confirmed"], "description": "Persisted admission stage of the operation." }, "deliveryState": { "type": "string", "enum": ["pending", "leased", "confirmed", "blocked"], "description": "Current delivery state of the operation." } }, "dependentRequired": { "operationId": ["operationId", "admissionStage", "deliveryState"], "admissionStage": ["operationId", "admissionStage", "deliveryState"], "deliveryState": ["operationId", "admissionStage", "deliveryState"] }, "description": "Command admission. Session creation and internal commands may omit operation fields." }, "WebShellTurn": { "type": "object", "required": ["turnId", "sessionId", "status", "submittedAt"], "properties": { "turnId": { "type": "string" }, "sessionId": { "type": "string", "format": "uuid" }, "status": { "type": "string", "description": "recovery_blocked with hosted_harness_recovery_blocked means the Harness stopped without a safely settled Turn. The input remains active internally. Execution redispatch is parked, while bounded read-only observation of the original Harness journal may settle a later terminal result. Policy changes and lifecycle close wait for settlement; explicit cancellation remains available." }, "submittedAt": { "type": "integer", "format": "int64" }, "completedAt": { "type": ["integer", "null"], "format": "int64" }, "errorCode": { "type": ["string", "null"] }, "operationId": { "type": "string", "minLength": 1, "maxLength": 64, "x-qwen-implementation-status": "planned" }, "admissionStage": { "type": "string", "enum": ["java_durable", "harness_confirmed"], "x-qwen-implementation-status": "planned" }, "deliveryState": { "type": "string", "enum": ["pending", "leased", "confirmed", "blocked"], "x-qwen-implementation-status": "planned" } } }, "WebShellSession": { "type": "object", "required": [ "sessionId", "agentId", "status", "createdAt", "updatedAt", "lastSequence", "capabilities" ], "properties": { "creationOperationId": { "type": "string", "minLength": 1, "maxLength": 64, "x-qwen-implementation-status": "planned", "description": "Original create_session operation; creation retries resolve this identity before allocating another Session." }, "sessionId": { "type": "string", "format": "uuid" }, "title": { "type": ["string", "null"] }, "agentId": { "type": "string" }, "status": { "type": "string" }, "createdAt": { "type": "integer", "format": "int64" }, "updatedAt": { "type": "integer", "format": "int64" }, "activeTurn": { "oneOf": [ { "$ref": "#/components/schemas/WebShellTurn" }, { "type": "null" } ] }, "environment": { "type": ["object", "null"], "additionalProperties": true }, "lastSequence": { "type": "integer", "format": "int64", "minimum": 0 }, "workspace": { "$ref": "#/components/schemas/WebShellWorkspaceContext", "x-qwen-implementation-status": "partial" }, "capabilities": { "$ref": "#/components/schemas/WebShellSessionCapabilities" }, "archivedAt": { "type": ["integer", "null"], "format": "int64", "x-qwen-implementation-status": "planned" }, "replayFloorSequence": { "type": "integer", "format": "int64", "minimum": 0, "x-qwen-implementation-status": "planned" }, "snapshotThroughSequence": { "type": "integer", "format": "int64", "minimum": 0, "x-qwen-implementation-status": "planned", "description": "Retained wire name for current message projection coverage; no persisted conversation snapshot is implied." }, "approvalMode": { "type": "string", "enum": ["default", "auto", "auto-edit", "yolo"], "description": "Current effective approval policy; initialApprovalMode retains the immutable creation policy." }, "modelContext": { "$ref": "#/components/schemas/WebShellModelContext" }, "modelSelection": { "$ref": "#/components/schemas/WebShellModelSelection" }, "approvalRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "initialApprovalMode": { "type": "string", "enum": ["default", "auto-edit", "yolo"], "description": "Immutable creation-time policy, used to confirm creation replay." }, "planMode": { "type": "boolean", "description": "Persisted public Plan overlay, independent of execution permission. Omission on a change preserves the selected state." }, "planModeSupported": { "type": "boolean", "description": "Optional deployment capability; missing means false." }, "compactionRevision": { "type": ["integer", "null"], "format": "int64", "minimum": 0, "maximum": 9007199254740991, "default": 0, "description": "Sequence of the most recent native context.compacted event; independent of Workspace context revision. Omitted when retained pre-upgrade evidence cannot establish the revision, and context compression is unavailable." }, "contextCompressionOperationId": { "type": ["string", "null"], "maxLength": 64, "description": "Current durable context compression operation, including recovery_blocked; absent when none is active." }, "lifecycleOperation": { "$ref": "#/components/schemas/WebShellLifecycleOperation", "description": "Current unsettled lifecycle operation, queried in batch under Session read authorization. A failed close/delete may leave the Session closing/deleting; only explicit retry starts a new operation. Settled Sessions omit this projection." }, "recovery": { "$ref": "#/components/schemas/SessionRecovery" }, "worktree": { "oneOf": [ { "$ref": "#/components/schemas/WebShellSessionWorktree" }, { "type": "null" } ] } } }, "WebShellSessionCapabilities": { "type": "object", "required": ["tasks", "artifacts", "actions", "workspaceTurns"], "properties": { "workspaceContext": { "type": "boolean", "default": false, "x-qwen-implementation-status": "planned" }, "cwdChange": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Retired: Session directory-change submission has been removed; always false.", "deprecated": true }, "actions": { "type": "boolean", "default": false }, "sessionLifecycle": { "type": "boolean", "default": false, "x-qwen-implementation-status": "planned" }, "workspaceTurns": { "type": "boolean", "default": false, "description": "True when the caller may submit later Turns of this Workspace-bound Session: the deployment enables Workspace files, the caller holds the OPERATOR role on a Workspace registry row whose state is ACTIVE and still backs the Session's binding, the actor recorded by the Workspace create command keeps OPERATOR or above, and the Session is active and undeleted and is either a qwen-code Session or a Session pinned to a stored definition (both on the Workspace's frozen execution profile). Cancelling only aborts work already running, so an OPERATOR caller may cancel a running Turn even when this is false; the capability does not gate cancellation. False for every other caller and for unbound Sessions, which do not use it. Shell Sessions also require foregroundShell=true for fresh sending; workspaceTurns may remain true with Shell admission disabled and is not sufficient Shell Turn admission. Manual rename uses the independent rename capability." }, "tasks": { "type": "boolean" }, "artifacts": { "type": "boolean" }, "sessionClose": { "type": "boolean", "default": false, "description": "Close support including current actor authority. Workspace-bound Sessions require the recorded Session owner and current read access. Source-state and idle admission remain authoritative on the server." }, "sessionArchive": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Archive support including current actor authority. Workspace-bound Sessions require completed reliable-close evidence, the recorded Session owner and current read access. Source-state and idle admission remain authoritative on the server." }, "sessionUnarchive": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Unarchive support including current actor authority. Workspace-bound Sessions require completed reliable-close evidence, the recorded Session owner and current read access. Source-state and idle admission remain authoritative on the server." }, "sessionDelete": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "Delete support including current actor authority. ACTIVE Workspace Sessions require a supported reliable-close protocol; CLOSED/ARCHIVED Sessions use completed close evidence. Workspace-bound Sessions require the recorded Session owner and current read access. Source-state and idle admission remain authoritative on the server. The aggregate session lifecycle capability is unchanged." }, "foregroundShell": { "type": "boolean", "description": "Present only for persisted Shell Sessions, with no schema default; files and unbound Sessions omit it. True when Workspace files, Shell deployment admission and a valid persisted approval mode are valid. False prevents fresh sending. Disabling only the Shell flag preserves accepted cancellation and approval while Workspace files remain enabled and persisted approval remains valid; files-off or invalid approval can refuse attachment. This capability does not override authorization or recovery refusals.", "x-qwen-implementation-status": "implemented" }, "modelChange": { "type": "boolean", "description": "The caller may change the Session model selection for later Turns using the server model catalog, including while a Turn or approval is active. Missing means unsupported; authorization, recovery and revision admission still apply." }, "approvalModeChange": { "type": "boolean", "description": "The caller owns this eligible Workspace Session with current OPERATOR or OWNER access. Built-in qwen-code requires approval-selection/1; stored AgentDefinitions on exactly hosted-workspace-files/1, hosted-workspace-files/3, hosted-workspace-files/4, hosted-workspace-shell/1, hosted-workspace-shell/3 or hosted-workspace-shell/4 also require agent-definition-approval-selection/1. Idle-state admission is checked separately. Missing means false." }, "inputAttachments": { "type": "boolean", "description": "Optional deployment capability; missing means false." }, "rename": { "type": "boolean", "default": false, "x-qwen-implementation-status": "implemented", "description": "True for a visible ACTIVE Session when the Harness supports fenced title persistence and is available. Workspace-bound Sessions additionally require Workspace files admission, current OPERATOR access and the original binding's frozen execution facts, independently of approval or fresh Turn sending support. Unbound Sessions use the existing tenant-scoped rename permission. An active Turn does not itself make this false. Missing means false. This advertises fresh rename only; authorized completed original-key replay remains available under the rename service's replay rules." }, "contextCompression": { "type": "boolean", "default": false, "description": "Requires a compatible Hosted Harness and an active Workspace Session. WebShell also reflects the current caller OPERATOR or OWNER grant; admission separately checks idle state." }, "childAgents": { "type": "boolean", "default": false, "description": "Public child orchestration support for this persisted Session; launch and caller authorization are checked separately." }, "diagnostics": { "type": "boolean", "default": false, "description": "Passive persisted context, model statistics, resource inventory and direct child invocation queries are available. Each response declares its observation coverage independently of Runtime readiness or fresh Turn admission.", "x-qwen-implementation-status": "implemented" }, "btw": { "type": "boolean", "default": false }, "recap": { "type": "boolean", "default": false }, "terminal": { "type": ["boolean", "null"], "description": "UI hint that this Session may open a Managed Web Terminal: the terminal deployment opt-in is enabled, the caller may submit (OPERATOR on the bound Workspace), and the Session is a Shell Session. The relay re-runs the full admission on the WebSocket attach; this field does not gate it.", "x-qwen-implementation-status": "implemented" }, "clientFiles": { "type": "boolean", "default": false, "description": "Browser local-files registration is available for this Session: the Session is bound to a Workspace, the caller holds current execution authority, the deployment enables the client-files relay and the Harness supports it. A Workspace-less Session never advertises this capability. Registration admission still checks the actor grant and idle state separately.", "x-qwen-implementation-status": "implemented" } } }, "WebShellSessionPage": { "type": "object", "required": ["data", "hasMore"], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellSession" } }, "nextCursor": { "type": ["string", "null"] }, "hasMore": { "type": "boolean" } } }, "WebShellTranscript": { "type": "object", "required": [ "items", "events", "coveredSequence", "hasMore", "lastSequence" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellItem" } }, "events": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellEvent" } }, "coveredSequence": { "type": "integer", "format": "int64", "minimum": 0, "description": "Actual message projection coverage of this read; resume SSE after this sequence." }, "olderCursor": { "type": ["string", "null"] }, "hasMore": { "type": "boolean" }, "lastSequence": { "type": "integer", "format": "int64", "minimum": 0, "description": "Actual message projection coverage for SSE handoff, equal to coveredSequence; unmaterialized tail events are delivered by SSE." } } }, "WebShellContentPart": { "type": "object", "required": ["partId", "type", "text", "firstSequence", "lastSequence"], "properties": { "partId": { "type": "string" }, "type": { "type": "string" }, "text": { "type": "string" }, "firstSequence": { "type": "integer", "format": "int64", "minimum": 1 }, "lastSequence": { "type": "integer", "format": "int64", "minimum": 1 } } }, "WebShellItem": { "type": "object", "required": [ "itemId", "sessionId", "turnId", "type", "status", "content", "attributes", "firstSequence", "lastSequence", "createdAt", "updatedAt" ], "properties": { "itemId": { "type": "string" }, "sessionId": { "type": "string", "format": "uuid" }, "turnId": { "type": "string" }, "type": { "type": "string" }, "role": { "type": ["string", "null"] }, "status": { "type": "string" }, "content": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellContentPart" } }, "attributes": { "type": "object", "additionalProperties": true }, "firstSequence": { "type": "integer", "format": "int64", "minimum": 1 }, "lastSequence": { "type": "integer", "format": "int64", "minimum": 1 }, "createdAt": { "type": "integer", "format": "int64" }, "updatedAt": { "type": "integer", "format": "int64" } } }, "WebShellEvent": { "type": "object", "description": "A committed event, replayed with the versions and identity it was accepted with. A stream.reconciled event is the exception: it means that Harness recovery retracted earlier deltas of its Turn, which now have empty text and no itemId or contentPartId, and that later deltas may name other Parts. Reload the transcript and resume after its lastSequence.", "required": [ "sequence", "eventId", "sessionId", "type", "createdAt", "data", "terminal" ], "properties": { "schemaVersion": { "type": "integer", "minimum": 1, "default": 1 }, "projectionVersion": { "type": "integer", "minimum": 1, "default": 1 }, "sequence": { "type": "integer", "format": "int64", "minimum": 1 }, "eventId": { "type": "string", "maxLength": 64 }, "sessionId": { "type": "string", "format": "uuid" }, "turnId": { "type": ["string", "null"], "maxLength": 64 }, "itemId": { "type": ["string", "null"], "maxLength": 64 }, "contentPartId": { "type": ["string", "null"], "maxLength": 128 }, "type": { "type": "string", "maxLength": 128 }, "createdAt": { "type": "integer", "format": "int64" }, "data": { "type": "object", "additionalProperties": true }, "terminal": { "type": "boolean" } } }, "WebShellResyncRequired": { "type": "object", "additionalProperties": false, "required": [ "type", "sessionId", "replayFloorSequence", "snapshotThroughSequence", "action" ], "description": "Data of the agent.session.resync_required SSE frame. Reload the transcript, then resume after its lastSequence.", "properties": { "type": { "const": "agent.session.resync_required" }, "sessionId": { "type": "string", "format": "uuid" }, "replayFloorSequence": { "type": "integer", "format": "int64", "minimum": 0 }, "snapshotThroughSequence": { "type": "integer", "format": "int64", "minimum": 0, "description": "Retained wire name for current message projection coverage; no persisted conversation snapshot is implied." }, "action": { "const": "reload_snapshot" } } }, "ErrorEnvelope": { "type": "object", "required": ["error"], "properties": { "error": { "type": "object", "required": ["code", "message", "request_id"], "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string", "maxLength": 128 }, "retryable": { "type": "boolean", "description": "Present on Runtime Broker refusals; true permits retry, false is a definite refusal. Other errors may omit this field." }, "replay_floor_sequence": { "type": ["integer", "null"], "format": "int64" }, "snapshot_through_sequence": { "type": ["integer", "null"], "format": "int64" }, "field": { "type": "string", "description": "Names the definition field that cannot take effect on 409 agent_definition_unsupported; other errors may omit this field." } } } } }, "WorkspaceRelativePath": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Logical directory relative to the authorized workspace root; dot denotes root. Use slash separators. Reject absolute paths, drive prefixes, backslashes, NUL and parent segments. Runtime must verify directory existence, realpath containment and symlink safety before activation; schema validation alone is insufficient. Preserve spaces and case, normalize repeated separators and dot segments, and never percent-decode JSON values.", "examples": [".", "services/api"], "x-qwen-implementation-status": "partial" }, "WorkspaceSelection": { "type": "object", "additionalProperties": false, "required": ["workspace_id"], "properties": { "workspace_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwd_relative": { "$ref": "#/components/schemas/WorkspaceRelativePath", "default": "." } }, "x-qwen-implementation-status": "partial" }, "WorkspaceContext": { "type": "object", "additionalProperties": false, "required": [ "workspace_id", "cwd_relative", "context_revision", "state" ], "properties": { "workspace_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwd_relative": { "$ref": "#/components/schemas/WorkspaceRelativePath" }, "context_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "state": { "type": "string", "enum": ["ready", "changing", "recovery_blocked"] } }, "x-qwen-implementation-status": "partial" }, "PublicWorkspace": { "type": "object", "additionalProperties": false, "required": [ "id", "object", "display_name", "state", "can_create_session" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "object": { "const": "agent.workspace" }, "display_name": { "type": "string", "maxLength": 512 }, "can_create_session": { "type": "boolean", "description": "Current actor permission hint only; creation rechecks ACL, state and Agent/config compatibility.", "x-qwen-implementation-status": "partial" }, "state": { "type": "string", "enum": ["active", "draining", "removed"] } }, "x-qwen-implementation-status": "partial" }, "PublicWorkspaceList": { "type": "object", "additionalProperties": false, "required": [ "object", "data", "has_more", "capabilities", "default_workspace" ], "properties": { "object": { "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PublicWorkspace" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] }, "capabilities": { "type": "object", "additionalProperties": false, "required": ["workspace_context", "workspace_binding"], "properties": { "workspace_context": { "type": "boolean", "default": false, "description": "True only after W0 creation, binding and private installation contracts are supported end to end." }, "workspace_binding": { "type": "boolean", "description": "Supports authorized Workspace discovery, Session creation, and saved binding read-back. This capability does not advertise execution readiness. Deployments may separately opt in to an initial Workspace Turn at creation: Read/Write/Edit under hosted-workspace-files/1, or file tools plus mandatory-approval foreground Shell under hosted-workspace-shell/1 when the Shell opt-in is enabled. Qualified new public Shell Sessions expose agent by default under the public-child deployment switch and runtime/Harness admission; existing Sessions retain their original tool scope. Callers holding the OPERATOR role may submit later Turns or rename under the same opt-in while the registry row stays ACTIVE and still backs the Session's binding and the actor recorded by the Workspace create command keeps OPERATOR or above, and may cancel a running Turn (its delivery re-checks no grants). Shell fresh sending also requires foreground_shell=true. Public Shell close and active delete require lifecycle v2 and reliable original-Worker stop support; archive and unarchive require completed close proof, while close of other profiles follows its separate capability and lifecycle admission; archive, delete and unarchive follow their separate retention capabilities after reliable Workspace close." } }, "x-qwen-implementation-status": "partial" }, "default_workspace": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/PublicWorkspace" }, { "type": "object", "properties": { "state": { "const": "active" }, "can_create_session": { "const": true } } } ] }, { "type": "null" } ], "description": "Explicit tenant default only when active and creatable by this actor; otherwise null. Included independently of the current page. A non-null default has can_create_session=true; creation revalidates it.", "x-qwen-implementation-status": "partial" } }, "x-qwen-implementation-status": "partial" }, "CwdOperationStatus": { "type": "string", "enum": ["pending", "installing", "completed", "failed"], "x-qwen-implementation-status": "implemented" }, "PublicCwdOperation": { "type": "object", "additionalProperties": false, "required": [ "id", "session_id", "type", "status", "expected_context_revision", "target_cwd_relative", "replayed" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 64 }, "session_id": { "type": "string", "format": "uuid" }, "type": { "const": "cwd_change" }, "status": { "$ref": "#/components/schemas/CwdOperationStatus" }, "expected_context_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "target_cwd_relative": { "$ref": "#/components/schemas/WorkspaceRelativePath" }, "result_context_revision": { "type": ["integer", "null"], "format": "int64", "minimum": 1 }, "failure_code": { "type": ["string", "null"], "maxLength": 128 }, "replayed": { "type": "boolean" } }, "x-qwen-implementation-status": "implemented", "allOf": [ { "if": { "properties": { "status": { "const": "completed" } }, "required": ["status"] }, "then": { "required": ["result_context_revision"], "properties": { "result_context_revision": { "type": "integer", "format": "int64", "minimum": 1 } } } }, { "if": { "properties": { "status": { "const": "failed" } }, "required": ["status"] }, "then": { "required": ["failure_code"], "properties": { "failure_code": { "type": "string", "maxLength": 128 } } } } ], "description": "A completed operation returns the committed target revision. A replay returns the same operation identity and latest durable status, with replayed=true; polling itself is not replay." }, "WebShellWorkspaceSelection": { "type": "object", "additionalProperties": false, "required": ["workspaceId"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwdRelative": { "$ref": "#/components/schemas/WorkspaceRelativePath", "default": "." } }, "x-qwen-implementation-status": "partial" }, "WebShellWorkspaceContext": { "type": "object", "additionalProperties": false, "required": ["workspaceId", "cwdRelative", "contextRevision", "state"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwdRelative": { "$ref": "#/components/schemas/WorkspaceRelativePath" }, "contextRevision": { "type": "integer", "format": "int64", "minimum": 1 }, "state": { "type": "string", "enum": ["ready", "changing", "recovery_blocked"] } }, "x-qwen-implementation-status": "partial" }, "WebShellWorkspace": { "type": "object", "additionalProperties": false, "required": ["workspaceId", "displayName", "state", "canCreateSession"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "displayName": { "type": "string", "maxLength": 512 }, "canCreateSession": { "type": "boolean", "description": "Current actor permission hint only; creation rechecks ACL, state and Agent/config compatibility.", "x-qwen-implementation-status": "partial" }, "state": { "type": "string", "enum": ["active", "draining", "removed"] }, "defaultCwdRelative": { "type": "string", "minLength": 1, "maxLength": 2048, "description": "Persisted default working directory for new WebShell Sessions; absent means dot." }, "canSelectDirectory": { "type": "boolean", "description": "Current actor owns this active root Workspace; directory discovery rechecks authorization and native storage." } }, "x-qwen-implementation-status": "partial" }, "WebShellWorkspacePage": { "type": "object", "additionalProperties": false, "required": ["data", "hasMore", "capabilities", "defaultWorkspace"], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellWorkspace" } }, "hasMore": { "type": "boolean" }, "nextCursor": { "type": ["string", "null"] }, "capabilities": { "type": "object", "additionalProperties": false, "required": ["workspaceContext", "workspaceBinding"], "properties": { "workspaceContext": { "type": "boolean", "default": false, "description": "Same end-to-end W0 readiness as public workspace_context; missing means unsupported." }, "workspaceBinding": { "type": "boolean", "description": "Supports authorized Workspace discovery, Session creation, and saved binding read-back. This capability does not advertise execution readiness. Deployments may separately opt in to an initial Workspace Turn at creation: Read/Write/Edit under hosted-workspace-files/1, or file tools plus mandatory-approval foreground Shell under hosted-workspace-shell/1 when the Shell opt-in is enabled. Qualified new public Shell Sessions expose agent by default under the public-child deployment switch and runtime/Harness admission; existing Sessions retain their original tool scope. Callers holding the OPERATOR role may submit later Turns or rename under the same opt-in while the registry row stays ACTIVE and still backs the Session's binding and the actor recorded by the Workspace create command keeps OPERATOR or above, and may cancel a running Turn (its delivery re-checks no grants). Shell fresh sending also requires foregroundShell=true. Public Shell close and active delete require lifecycle v2 and reliable original-Worker stop support; archive and unarchive require completed close proof, while close of other profiles follows its separate capability and lifecycle admission; archive, delete and unarchive follow their separate retention capabilities after reliable Workspace close." }, "workspaceCreation": { "type": "boolean", "description": "Supports creating empty Workspaces under the operator-controlled root. Missing or false means unsupported; current actor and server admission checks still apply." }, "approvalModeSelection": { "type": "boolean", "description": "Supports effective Session policy options and explicit Workspace-bound creation policy. Missing or false means unsupported." }, "workspaceDirectorySelection": { "type": "boolean", "description": "Supports browsing and selecting existing directories on authorized Linux or macOS storage; absent means unsupported." }, "localDirectoryImport": { "type": "boolean", "description": "Trusted single-user local deployment can browse and import existing host directories without a pre-registered Workspace. Missing or false means unsupported." } }, "x-qwen-implementation-status": "partial" }, "defaultWorkspace": { "oneOf": [ { "allOf": [ { "$ref": "#/components/schemas/WebShellWorkspace" }, { "type": "object", "properties": { "state": { "const": "active" }, "canCreateSession": { "const": true } } } ] }, { "type": "null" } ], "description": "Same authorized explicit default as default_workspace, including when outside this page; null if absent or not creatable. A non-null default is active and has canCreateSession=true.", "x-qwen-implementation-status": "partial" } }, "x-qwen-implementation-status": "partial" }, "WebShellOperationRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "operationId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "operationId": { "type": "string", "minLength": 1, "maxLength": 64 } } }, "WebShellCwdOperation": { "type": "object", "additionalProperties": false, "required": [ "operationId", "sessionId", "type", "status", "expectedContextRevision", "targetCwdRelative", "replayed" ], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 64 }, "sessionId": { "type": "string", "format": "uuid" }, "type": { "const": "cwd_change" }, "status": { "$ref": "#/components/schemas/CwdOperationStatus" }, "expectedContextRevision": { "type": "integer", "format": "int64", "minimum": 1 }, "targetCwdRelative": { "$ref": "#/components/schemas/WorkspaceRelativePath" }, "resultContextRevision": { "type": ["integer", "null"], "format": "int64", "minimum": 1 }, "failureCode": { "type": ["string", "null"], "maxLength": 128 }, "replayed": { "type": "boolean" } }, "x-qwen-implementation-status": "implemented", "allOf": [ { "if": { "properties": { "status": { "const": "completed" } }, "required": ["status"] }, "then": { "required": ["resultContextRevision"], "properties": { "resultContextRevision": { "type": "integer", "format": "int64", "minimum": 1 } } } }, { "if": { "properties": { "status": { "const": "failed" } }, "required": ["status"] }, "then": { "required": ["failureCode"], "properties": { "failureCode": { "type": "string", "maxLength": 128 } } } } ], "description": "A completed operation returns the committed target revision. A replay returns the same operation identity and latest durable status, with replayed=true; polling itself is not replay." }, "ActionOption": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "label": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 1024 } } }, "ActionQuestion": { "type": "object", "additionalProperties": false, "required": [ "id", "prompt", "required", "multiple", "allow_text", "options" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "prompt": { "type": "string", "minLength": 1, "maxLength": 2048 }, "required": { "type": "boolean" }, "multiple": { "type": "boolean" }, "allow_text": { "type": "boolean" }, "options": { "type": "array", "minItems": 2, "maxItems": 4, "items": { "$ref": "#/components/schemas/ActionOption" } } }, "x-qwen-implementation-status": "implemented" }, "ActionSource": { "type": "object", "additionalProperties": false, "required": ["kind", "id"], "properties": { "kind": { "enum": [ "tool_call", "automation_run", "team_plan", "user_operation" ] }, "id": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "PermissionAction": { "type": "object", "additionalProperties": false, "required": [ "id", "session_id", "kind", "source", "state", "input_revision", "policy_revision", "created_at", "expires_at", "options", "function_call_id", "tool_name" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "session_id": { "type": "string", "format": "uuid" }, "kind": { "const": "permission" }, "source": { "$ref": "#/components/schemas/ActionSource" }, "state": { "enum": ["requested", "decided", "cancelled", "expired"] }, "input_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "policy_revision": { "type": "string", "minLength": 1, "maxLength": 128 }, "created_at": { "type": "integer", "format": "int64" }, "expires_at": { "type": "integer", "format": "int64" }, "decision_receipt_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "options": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "$ref": "#/components/schemas/ActionOption" } }, "turn_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "function_call_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "tool_name": { "type": "string", "minLength": 1, "maxLength": 128 }, "input_preview": { "$ref": "#/components/schemas/ActionInputPreview" } }, "allOf": [ { "if": { "properties": { "state": { "const": "decided" } }, "required": ["state"] }, "then": { "required": ["decision_receipt_id"] } } ], "description": "At most one requested Hosted approval per Turn. allow and deny are stable option IDs. A requested native-tool Action may carry a bounded input preview when the producer supplies an input reference. Version 1 Actions and unavailable inputs omit it. Public timestamps are milliseconds, as recorded by the Harness. Decision receipts are opaque product IDs." }, "QuestionAction": { "type": "object", "additionalProperties": false, "required": [ "id", "session_id", "kind", "source", "state", "input_revision", "policy_revision", "created_at", "expires_at", "questions", "function_call_id", "tool_name" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "session_id": { "type": "string", "format": "uuid" }, "kind": { "const": "question" }, "source": { "$ref": "#/components/schemas/ActionSource" }, "state": { "enum": ["requested", "decided", "cancelled", "expired"] }, "input_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "policy_revision": { "type": "string", "minLength": 1, "maxLength": 128 }, "created_at": { "type": "integer", "format": "int64" }, "expires_at": { "type": "integer", "format": "int64" }, "decision_receipt_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "turn_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "function_call_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "tool_name": { "type": "string", "minLength": 1, "maxLength": 128 }, "questions": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "$ref": "#/components/schemas/ActionQuestion" } } }, "x-qwen-implementation-status": "implemented", "allOf": [ { "if": { "properties": { "state": { "const": "decided" } }, "required": ["state"] }, "then": { "required": ["decision_receipt_id"] } } ] }, "PublicAction": { "oneOf": [ { "$ref": "#/components/schemas/PermissionAction" }, { "$ref": "#/components/schemas/QuestionAction" } ], "x-qwen-implementation-status": "partial" }, "PublicActionList": { "type": "object", "additionalProperties": false, "required": ["data", "has_more"], "properties": { "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicAction" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "maxLength": 512 } } }, "QuestionAnswer": { "type": "object", "additionalProperties": false, "required": ["question_id"], "properties": { "question_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "option_ids": { "type": "array", "minItems": 1, "maxItems": 4, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 } }, "text": { "type": "string", "minLength": 1, "maxLength": 8192 } }, "x-qwen-implementation-status": "implemented", "allOf": [ { "anyOf": [ { "required": ["option_ids"] }, { "required": ["text"] } ] } ] }, "PermissionResponse": { "type": "object", "additionalProperties": false, "required": ["kind", "input_revision", "policy_revision", "option_id"], "properties": { "kind": { "const": "permission" }, "input_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "policy_revision": { "type": "string", "minLength": 1, "maxLength": 128 }, "option_id": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "QuestionResponse": { "type": "object", "additionalProperties": false, "required": ["kind", "input_revision", "policy_revision", "answers"], "properties": { "kind": { "const": "question" }, "input_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "policy_revision": { "type": "string", "minLength": 1, "maxLength": 128 }, "answers": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "$ref": "#/components/schemas/QuestionAnswer" } } }, "x-qwen-implementation-status": "implemented" }, "ActionResponseRequest": { "oneOf": [ { "$ref": "#/components/schemas/PermissionResponse" }, { "$ref": "#/components/schemas/QuestionResponse" } ], "x-qwen-implementation-status": "partial", "description": "Validate IDs, required answers, selection cardinality, text eligibility and current responder permission against the original Action. Unknown/expired/cancelled/conflicting revisions cannot grant execution." }, "ActionResolution": { "type": "object", "additionalProperties": false, "required": ["action_id", "outcome", "receipt_id"], "properties": { "action_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "outcome": { "enum": ["vote_recorded", "decided"], "description": "D6 supports decided only; vote_recorded is planned." }, "receipt_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "decision_receipt_id": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "outcome": { "const": "decided" } }, "required": ["outcome"] }, "then": { "required": ["decision_receipt_id"] } } ] }, "PublicCommandOperation": { "type": "object", "additionalProperties": false, "required": [ "id", "session_id", "type", "status", "admission_stage", "delivery_state", "replayed" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 64 }, "session_id": { "type": "string", "format": "uuid" }, "type": { "enum": [ "create_session", "submit_input", "cancel", "action_response", "close", "archive", "delete", "task_cancel" ] }, "task_id": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Task that a task_cancel operation targets." }, "status": { "enum": [ "pending", "running", "completed", "failed", "cancelled", "recovery_blocked" ] }, "admission_stage": { "enum": ["java_durable", "harness_confirmed"] }, "delivery_state": { "enum": ["pending", "leased", "confirmed", "blocked"] }, "receipt_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "action_resolution": { "$ref": "#/components/schemas/ActionResolution" }, "failure_code": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Reason a durable response or task cancellation failed. Action response failures come from the original committed Action, or a definitive invalid response. Task cancel failures are task_already_settled (the run ended before the stop request was recorded), task_action_unavailable and task_not_found; a recovery_blocked task cancel reports task_cancel_unconfirmed. A lifecycle operation that exhausted its retry budget fails with the settle's failure: session_lifecycle_delivery_failed, managed_capability_mismatch or hosted_harness_protocol_error when the Hosted Harness refused to negotiate, a workspace close or lifecycle refusal (a workspace_close_* or workspace_lifecycle_* code, or runtime_admission_closed; a Runtime Broker runtime_broker_recovery_blocked refusal is reported as workspace_close_identity_unverified), or another Runtime Broker refusal code; one whose settle reached the Harness but stayed unsettled past the larger settled budget fails with session_close_completion_unsettled. A lifecycle recovery_blocked operation reports the refusal it waits on, original resource identity or unsettled execution for a Workspace close, session_close_writer_live while a Harness holds the journal writer or while that check itself fails, or hosted_harness_generation_mismatch while this replica's view of the Harness boot is stale, or hosted_lifecycle_recovery_required while the daemon settles a previous prompt, or hosted_turn_active while a turn, MCP call or hook is still draining; the Session remains closing. A submit_input failure carries its Turn's error code, and a recovery_blocked submit_input reports submit_input_unconfirmed; a cancel fails with turn_already_settled when its Turn completed or failed without being cancelled, except one that already existed when its Turn failed with managed_runtime_recovery_blocked after a Harness admitted it or a submission was attempted: it parks recovery_blocked with cancel_unconfirmed. A cancel submitted after the Turn ended still fails turn_already_settled. A cancel parked as recovery_blocked/cancel_unconfirmed by unobserved-Turn recovery reconciles only from the original prompt's retained durable terminal event: cancelled completes it, completed or error fails it with turn_already_settled, and missing or unreadable evidence stays parked. A recorded stop request alone does not prove cancellation completed." }, "replayed": { "type": "boolean" } }, "allOf": [ { "if": { "anyOf": [ { "properties": { "status": { "const": "completed" } }, "required": ["status"] }, { "properties": { "admission_stage": { "const": "harness_confirmed" } }, "required": ["admission_stage"] }, { "properties": { "delivery_state": { "const": "confirmed" } }, "required": ["delivery_state"] } ] }, "then": { "required": ["receipt_id"] } }, { "if": { "properties": { "type": { "const": "action_response" }, "status": { "const": "completed" } }, "required": ["type", "status"] }, "then": { "required": ["action_resolution"] } }, { "if": { "properties": { "type": { "enum": [ "create_session", "submit_input", "cancel", "close", "archive", "delete", "task_cancel" ] } }, "required": ["type"] }, "then": { "not": { "required": ["action_resolution"] } } }, { "if": { "properties": { "type": { "const": "task_cancel" } }, "required": ["type"] }, "then": { "required": ["task_id"] }, "else": { "not": { "required": ["task_id"] } } }, { "if": { "properties": { "type": { "const": "task_cancel" } }, "required": ["type"] }, "then": { "properties": { "status": { "not": { "const": "cancelled" } } }, "allOf": [ { "if": { "properties": { "status": { "const": "failed" } }, "required": ["status"] }, "then": { "required": ["failure_code"] } }, { "if": { "properties": { "status": { "const": "completed" } }, "required": ["status"] }, "then": { "properties": { "admission_stage": { "const": "harness_confirmed" }, "delivery_state": { "const": "confirmed" } } } }, { "if": { "properties": { "status": { "enum": ["failed", "recovery_blocked"] } }, "required": ["status"] }, "then": { "properties": { "admission_stage": { "const": "java_durable" }, "delivery_state": { "const": "blocked" } } } } ] } } ], "description": "Receipt IDs are opaque authorized product handles, not private journal or storage refs. Input completion means a Harness admitted its Turn, not that the Turn completed; an input whose Turn failed after a submission no Harness answered is recovery_blocked until the Session journal proves whether a Harness admitted it. For submit_input and task cancel, recovery_blocked means acceptance is unknown: the operation is never delivered again and settles only from its own durable evidence. For close and delete it is a published wait that delivery re-drives. Cancel completion means its Turn reached cancelled; a cancel fails with turn_already_settled when its Turn ended otherwise, except one that already existed when its Turn failed with managed_runtime_recovery_blocked after a Harness admitted it or a submission was attempted, which parks recovery_blocked with cancel_unconfirmed. A cancel submitted after the Turn ended still fails turn_already_settled. Action completion may only record one vote. Lifecycle completion requires its cleanup facts; archive may remain java_durable because Java is its authority. Task cancel 202 is Java durable admission; completion means the authority durably recorded cancellation and returned a receipt, not that the task stopped. Task cancel failed proves non-acceptance and no further delivery, with a failure code; recovery_blocked means acceptance is unknown and needs reconciliation before re-execution. Its status is never cancelled. Physical settlement and an unknown physical outcome belong to the task, independently of operation acceptance. A completed task cancel carries admission stage harness_confirmed and delivery state confirmed with the authority's receipt; failed and recovery_blocked carry java_durable and blocked, so they are never delivered again without reconciliation. A cancel parked as recovery_blocked/cancel_unconfirmed by unobserved-Turn recovery reconciles only from the original prompt's retained durable terminal event: cancelled completes it, completed or error fails it with turn_already_settled, and missing or unreadable evidence stays parked. A recorded stop request alone does not prove cancellation completed." }, "PublicOperation": { "oneOf": [ { "$ref": "#/components/schemas/PublicCwdOperation", "x-qwen-implementation-status": "implemented" }, { "$ref": "#/components/schemas/PublicCommandOperation" }, { "$ref": "#/components/schemas/PublicContextCompressionOperation" } ] }, "WebShellAction": { "oneOf": [ { "$ref": "#/components/schemas/WebShellPermissionAction" }, { "$ref": "#/components/schemas/WebShellQuestionAction" } ], "x-qwen-implementation-status": "partial" }, "WebShellActionResolution": { "type": "object", "additionalProperties": false, "required": ["actionId", "outcome", "receiptId"], "properties": { "actionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "outcome": { "enum": ["vote_recorded", "decided"], "description": "D6 supports decided only; vote_recorded is planned." }, "receiptId": { "type": "string", "minLength": 1, "maxLength": 128 }, "decisionReceiptId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "outcome": { "const": "decided" } }, "required": ["outcome"] }, "then": { "required": ["decisionReceiptId"] } } ] }, "WebShellQuestionAnswer": { "type": "object", "additionalProperties": false, "required": ["questionId"], "properties": { "questionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "optionIds": { "type": "array", "minItems": 1, "maxItems": 4, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 } }, "text": { "type": "string", "minLength": 1, "maxLength": 8192 } }, "x-qwen-implementation-status": "implemented", "allOf": [ { "anyOf": [ { "required": ["optionIds"] }, { "required": ["text"] } ] } ] }, "WebShellActionQuestion": { "type": "object", "additionalProperties": false, "required": [ "id", "prompt", "required", "multiple", "allowText", "options" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "prompt": { "type": "string", "minLength": 1, "maxLength": 2048 }, "required": { "type": "boolean" }, "multiple": { "type": "boolean" }, "allowText": { "type": "boolean" }, "options": { "type": "array", "minItems": 2, "maxItems": 4, "items": { "$ref": "#/components/schemas/WebShellActionOption" } } }, "x-qwen-implementation-status": "implemented" }, "WebShellCommandOperation": { "type": "object", "additionalProperties": false, "required": [ "operationId", "sessionId", "type", "status", "admissionStage", "deliveryState", "replayed" ], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 64 }, "sessionId": { "type": "string", "format": "uuid" }, "type": { "enum": [ "create_session", "submit_input", "cancel", "action_response", "close", "archive", "delete", "task_cancel" ] }, "taskId": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Task that a task_cancel operation targets." }, "status": { "enum": [ "pending", "running", "completed", "failed", "cancelled", "recovery_blocked" ] }, "admissionStage": { "enum": ["java_durable", "harness_confirmed"] }, "deliveryState": { "enum": ["pending", "leased", "confirmed", "blocked"] }, "receiptId": { "type": "string", "minLength": 1, "maxLength": 128 }, "actionResolution": { "$ref": "#/components/schemas/WebShellActionResolution" }, "failureCode": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Reason a durable response or task cancellation failed. Action response failures come from the original committed Action, or a definitive invalid response. Task cancel failures are task_already_settled (the run ended before the stop request was recorded), task_action_unavailable and task_not_found; a recovery_blocked task cancel reports task_cancel_unconfirmed. A lifecycle operation that exhausted its retry budget fails with the settle's failure: session_lifecycle_delivery_failed, managed_capability_mismatch or hosted_harness_protocol_error when the Hosted Harness refused to negotiate, a workspace close or lifecycle refusal (a workspace_close_* or workspace_lifecycle_* code, or runtime_admission_closed; a Runtime Broker runtime_broker_recovery_blocked refusal is reported as workspace_close_identity_unverified), or another Runtime Broker refusal code; one whose settle reached the Harness but stayed unsettled past the larger settled budget fails with session_close_completion_unsettled. A lifecycle recovery_blocked operation reports the refusal it waits on, original resource identity or unsettled execution for a Workspace close, session_close_writer_live while a Harness holds the journal writer or while that check itself fails, or hosted_harness_generation_mismatch while this replica's view of the Harness boot is stale, or hosted_lifecycle_recovery_required while the daemon settles a previous prompt, or hosted_turn_active while a turn, MCP call or hook is still draining; the Session remains closing. A submit_input failure carries its Turn's error code, and a recovery_blocked submit_input reports submit_input_unconfirmed; a cancel fails with turn_already_settled when its Turn completed or failed without being cancelled, except one that already existed when its Turn failed with managed_runtime_recovery_blocked after a Harness admitted it or a submission was attempted: it parks recovery_blocked with cancel_unconfirmed. A cancel submitted after the Turn ended still fails turn_already_settled. A cancel parked as recovery_blocked/cancel_unconfirmed by unobserved-Turn recovery reconciles only from the original prompt's retained durable terminal event: cancelled completes it, completed or error fails it with turn_already_settled, and missing or unreadable evidence stays parked. A recorded stop request alone does not prove cancellation completed." }, "replayed": { "type": "boolean" } }, "allOf": [ { "if": { "anyOf": [ { "properties": { "status": { "const": "completed" } }, "required": ["status"] }, { "properties": { "admissionStage": { "const": "harness_confirmed" } }, "required": ["admissionStage"] }, { "properties": { "deliveryState": { "const": "confirmed" } }, "required": ["deliveryState"] } ] }, "then": { "required": ["receiptId"] } }, { "if": { "properties": { "type": { "const": "action_response" }, "status": { "const": "completed" } }, "required": ["type", "status"] }, "then": { "required": ["actionResolution"] } }, { "if": { "properties": { "type": { "enum": [ "create_session", "submit_input", "cancel", "close", "archive", "delete", "task_cancel" ] } }, "required": ["type"] }, "then": { "not": { "required": ["actionResolution"] } } }, { "if": { "properties": { "type": { "const": "task_cancel" } }, "required": ["type"] }, "then": { "required": ["taskId"] }, "else": { "not": { "required": ["taskId"] } } }, { "if": { "properties": { "type": { "const": "task_cancel" } }, "required": ["type"] }, "then": { "properties": { "status": { "not": { "const": "cancelled" } } }, "allOf": [ { "if": { "properties": { "status": { "const": "failed" } }, "required": ["status"] }, "then": { "required": ["failureCode"] } }, { "if": { "properties": { "status": { "const": "completed" } }, "required": ["status"] }, "then": { "properties": { "admissionStage": { "const": "harness_confirmed" }, "deliveryState": { "const": "confirmed" } } } }, { "if": { "properties": { "status": { "enum": ["failed", "recovery_blocked"] } }, "required": ["status"] }, "then": { "properties": { "admissionStage": { "const": "java_durable" }, "deliveryState": { "const": "blocked" } } } } ] } } ], "description": "Receipt IDs are opaque authorized product handles, not private journal or storage refs. Input completion means a Harness admitted its Turn, not that the Turn completed; an input whose Turn failed after a submission no Harness answered is recovery_blocked until the Session journal proves whether a Harness admitted it. For submit_input and task cancel, recovery_blocked means acceptance is unknown: the operation is never delivered again and settles only from its own durable evidence. For close and delete it is a published wait that delivery re-drives. Cancel completion means its Turn reached cancelled; a cancel fails with turn_already_settled when its Turn ended otherwise, except one that already existed when its Turn failed with managed_runtime_recovery_blocked after a Harness admitted it or a submission was attempted, which parks recovery_blocked with cancel_unconfirmed. A cancel submitted after the Turn ended still fails turn_already_settled. Action completion may only record one vote. Lifecycle completion requires its cleanup facts; archive may remain java_durable because Java is its authority. Task cancel 202 is Java durable admission; completion means the authority durably recorded cancellation and returned a receipt, not that the task stopped. Task cancel failed proves non-acceptance and no further delivery, with a failure code; recovery_blocked means acceptance is unknown and needs reconciliation before re-execution. Its status is never cancelled. Physical settlement and an unknown physical outcome belong to the task, independently of operation acceptance. A completed task cancel carries admission stage harness_confirmed and delivery state confirmed with the authority's receipt; failed and recovery_blocked carry java_durable and blocked, so they are never delivered again without reconciliation. A cancel parked as recovery_blocked/cancel_unconfirmed by unobserved-Turn recovery reconciles only from the original prompt's retained durable terminal event: cancelled completes it, completed or error fails it with turn_already_settled, and missing or unreadable evidence stays parked. A recorded stop request alone does not prove cancellation completed." }, "WebShellQuestionAction": { "type": "object", "additionalProperties": false, "required": [ "actionId", "sessionId", "kind", "source", "state", "inputRevision", "policyRevision", "createdAt", "expiresAt", "questions", "functionCallId", "toolName" ], "properties": { "actionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "sessionId": { "type": "string", "format": "uuid" }, "kind": { "const": "question" }, "source": { "$ref": "#/components/schemas/WebShellActionSource" }, "state": { "enum": ["requested", "decided", "cancelled", "expired"] }, "inputRevision": { "type": "integer", "format": "int64", "minimum": 1 }, "policyRevision": { "type": "string", "minLength": 1, "maxLength": 128 }, "createdAt": { "type": "integer", "format": "int64" }, "expiresAt": { "type": "integer", "format": "int64" }, "decisionReceiptId": { "type": "string", "minLength": 1, "maxLength": 128 }, "turnId": { "type": "string", "minLength": 1, "maxLength": 128 }, "functionCallId": { "type": "string", "minLength": 1, "maxLength": 128 }, "toolName": { "type": "string", "minLength": 1, "maxLength": 128 }, "questions": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "$ref": "#/components/schemas/WebShellActionQuestion" } } }, "x-qwen-implementation-status": "implemented", "allOf": [ { "if": { "properties": { "state": { "const": "decided" } }, "required": ["state"] }, "then": { "required": ["decisionReceiptId"] } } ] }, "WebShellPermissionAction": { "type": "object", "additionalProperties": false, "required": [ "actionId", "sessionId", "kind", "source", "state", "inputRevision", "policyRevision", "createdAt", "expiresAt", "options", "functionCallId", "toolName" ], "properties": { "actionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "sessionId": { "type": "string", "format": "uuid" }, "kind": { "const": "permission" }, "source": { "$ref": "#/components/schemas/WebShellActionSource" }, "state": { "enum": ["requested", "decided", "cancelled", "expired"] }, "inputRevision": { "type": "integer", "format": "int64", "minimum": 1 }, "policyRevision": { "type": "string", "minLength": 1, "maxLength": 128 }, "createdAt": { "type": "integer", "format": "int64" }, "expiresAt": { "type": "integer", "format": "int64" }, "decisionReceiptId": { "type": "string", "minLength": 1, "maxLength": 128 }, "options": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "$ref": "#/components/schemas/WebShellActionOption" } }, "turnId": { "type": "string", "minLength": 1, "maxLength": 128 }, "functionCallId": { "type": "string", "minLength": 1, "maxLength": 128 }, "toolName": { "type": "string", "minLength": 1, "maxLength": 128 }, "inputPreview": { "$ref": "#/components/schemas/WebShellActionInputPreview" } }, "allOf": [ { "if": { "properties": { "state": { "const": "decided" } }, "required": ["state"] }, "then": { "required": ["decisionReceiptId"] } } ], "description": "At most one requested Hosted approval per Turn. allow and deny are stable option IDs. A requested native-tool Action may carry a bounded input preview when the producer supplies an input reference. Version 1 Actions and unavailable inputs omit it. Public timestamps are milliseconds, as recorded by the Harness. Decision receipts are opaque product IDs." }, "WebShellPermissionResponse": { "type": "object", "additionalProperties": false, "required": ["kind", "inputRevision", "policyRevision", "optionId"], "properties": { "kind": { "const": "permission" }, "inputRevision": { "type": "integer", "format": "int64", "minimum": 1 }, "policyRevision": { "type": "string", "minLength": 1, "maxLength": 128 }, "optionId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellActionPage": { "type": "object", "additionalProperties": false, "required": ["data", "hasMore"], "properties": { "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/WebShellAction" } }, "hasMore": { "type": "boolean" }, "nextCursor": { "type": ["string", "null"], "maxLength": 512 } } }, "WebShellActionSource": { "type": "object", "additionalProperties": false, "required": ["kind", "id"], "properties": { "kind": { "enum": [ "tool_call", "automation_run", "team_plan", "user_operation" ] }, "id": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellActionResponseRequest": { "oneOf": [ { "$ref": "#/components/schemas/WebShellPermissionResponse" }, { "$ref": "#/components/schemas/WebShellQuestionResponse" } ], "x-qwen-implementation-status": "partial", "description": "Validate IDs, required answers, selection cardinality, text eligibility and current responder permission against the original Action. Unknown/expired/cancelled/conflicting revisions cannot grant execution." }, "WebShellActionOption": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "label": { "type": "string", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "maxLength": 1024 } } }, "WebShellQuestionResponse": { "type": "object", "additionalProperties": false, "required": ["kind", "inputRevision", "policyRevision", "answers"], "properties": { "kind": { "const": "question" }, "inputRevision": { "type": "integer", "format": "int64", "minimum": 1 }, "policyRevision": { "type": "string", "minLength": 1, "maxLength": 128 }, "answers": { "type": "array", "minItems": 1, "maxItems": 4, "items": { "$ref": "#/components/schemas/WebShellQuestionAnswer" } } }, "x-qwen-implementation-status": "implemented" }, "WebShellOperation": { "oneOf": [ { "$ref": "#/components/schemas/WebShellCwdOperation", "x-qwen-implementation-status": "implemented" }, { "$ref": "#/components/schemas/WebShellCommandOperation" }, { "$ref": "#/components/schemas/WebShellContextCompressionOperation" } ] }, "WebShellActionQueryRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "cursor": { "type": "string", "maxLength": 512 }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, "includeChildren": { "type": "boolean", "default": false, "description": "Include pending Actions of this public root Session and its direct children; each Action retains its actual owning sessionId." } } }, "WebShellActionGetRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "actionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "actionId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellActionRespondRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "actionId", "idempotencyKey", "response"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "actionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "response": { "$ref": "#/components/schemas/WebShellActionResponseRequest" }, "requestId": { "type": "string", "maxLength": 128 } } }, "WebShellLifecycleRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "idempotencyKey"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestId": { "type": ["string", "null"], "maxLength": 128, "description": "Trace-only client request identity, excluded from idempotency digests." } } }, "WebShellWorkspaceQueryRequest": { "type": "object", "additionalProperties": false, "properties": { "cursor": { "type": ["string", "null"], "maxLength": 2048 }, "limit": { "type": ["integer", "null"], "minimum": 1, "maximum": 100, "default": 50 } }, "x-qwen-implementation-status": "partial" }, "WebShellWorkspaceGetRequest": { "type": "object", "additionalProperties": false, "required": ["workspaceId"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "partial" }, "TaskKind": { "type": "string", "enum": [ "child_agent", "workflow", "background_shell", "monitor", "automation_run", "channel_delivery" ], "x-qwen-implementation-status": "partial" }, "TaskState": { "type": "string", "enum": [ "pending", "running", "waiting", "completed", "failed", "cancelled", "degraded", "recovery_blocked" ], "x-qwen-implementation-status": "partial", "description": "Logical run state. completed is terminal and is set when the run's own line ends settled, with or without a physical execution; failed and cancelled are terminal too, and they also cover a run that ended before its execution started (cancelled before dispatch, or failed with no provable start), when no physical execution ever settled. degraded means that the task still runs with reduced guarantees, such as a Monitor that lost its observation source. recovery_blocked means that recovery cannot prove the physical outcome: it is not settled, is never reported as success and is never re-run automatically." }, "TaskRuntimeState": { "type": "string", "enum": ["unbound", "provisioning", "ready", "draining", "lost"], "x-qwen-implementation-status": "partial", "description": "Redacted state of the Runtime that hosts the task, without binding identity or generation." }, "TaskActionCapability": { "type": "string", "enum": ["cancel", "send_input", "read_output"], "x-qwen-implementation-status": "partial", "description": "Actions the task supports now, the same for every caller. cancel: the cancel route accepts a new command for this task (since 1.40 for child_agent, 1.46 for workflow and 1.54 for background_shell and monitor, tasks of those kinds in pending, running, waiting or degraded, and since 1.57 for channel_delivery, a delivery still pending because no adapter has claimed it, each in an active Session, and since 1.65 for automation_run in pending, running, waiting or degraded in an active Session; only that occurrence is cancelled and its schedule is preserved); whether a caller may use it is an authorization check (403 on the cancel route). send_input: reserved for a later capability route. read_output: the task events route returns output events for this task to any caller that can read it. read_output does not change during the task's life, and a task without it produces no output events: its output goes only to Artifacts, so the events route never filters out events that exist." }, "PublicTask": { "type": "object", "additionalProperties": false, "required": [ "id", "object", "session_id", "kind", "state", "created_at", "artifact_refs", "action_capabilities" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "object": { "const": "agent.task" }, "session_id": { "type": "string", "format": "uuid" }, "child_session_id": { "type": "string", "format": "uuid", "description": "The child Session that runs this task: present for a child_agent or workflow task once the run's committed record names it (the child's attach, or a terminal verdict that names a minted child), and absent for every other kind and before then. The child is a Session in the same Workspace, readable by exactly the callers that can read this task, so its Turns, items and events are the task's own output; reading them needs no other grant." }, "kind": { "$ref": "#/components/schemas/TaskKind" }, "state": { "$ref": "#/components/schemas/TaskState" }, "definition_revision": { "type": "integer", "format": "int64", "minimum": 1, "description": "Immutable definition revision this run is pinned to, when the kind has a definition." }, "runtime_state": { "$ref": "#/components/schemas/TaskRuntimeState" }, "created_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." }, "started_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." }, "settled_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." }, "output_cursor": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Stable task event cursor after the committed tail at view read time. No event can later appear at or before it. Pass it as after to follow only new events; recovery must instead keep its saved event page cursor so it does not skip intervening output. Normal retention may expire it." }, "artifact_refs": { "type": "array", "maxItems": 100, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 }, "description": "The newest Artifacts that hold durable task output, at most 100, oldest first. Entries must not rotate out until older Artifacts can be enumerated and attributed to the task: an evicted Artifact stays readable by id through the Session artifact routes but is no longer discoverable from the task." }, "action_capabilities": { "type": "array", "maxItems": 3, "uniqueItems": true, "items": { "$ref": "#/components/schemas/TaskActionCapability" } }, "stop_requested": { "type": "boolean", "description": "A durable stop request has been recorded. This does not prove that the task has terminated." }, "approval_mode": { "type": "string", "enum": ["default", "auto-edit", "yolo"], "description": "The actual immutable approval mode of this public child Session." } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "state": { "enum": ["completed", "failed", "cancelled"] } }, "required": ["state"] }, "then": { "required": ["settled_at"], "properties": { "action_capabilities": { "not": { "contains": { "enum": ["cancel", "send_input"] } } } } }, "else": { "not": { "required": ["settled_at"] } } }, { "if": { "properties": { "state": { "enum": ["running", "waiting", "degraded", "completed"] } }, "required": ["state"] }, "then": { "required": ["started_at"] } }, { "if": { "properties": { "state": { "const": "pending" } }, "required": ["state"] }, "then": { "not": { "required": ["started_at"] } } }, { "if": { "properties": { "state": { "const": "recovery_blocked" } }, "required": ["state"] }, "then": { "properties": { "action_capabilities": { "not": { "contains": { "const": "send_input" } } } } } }, { "if": { "properties": { "kind": { "enum": ["child_agent", "workflow"] } }, "required": ["kind"] }, "else": { "not": { "required": ["child_session_id"] } } } ], "description": "Read-only projection of one asynchronous task of a Session (SessionTaskView). It is rebuilt from the Session's durable domain records and is never their source of truth. It never carries a Runtime binding ID, generation, Runtime endpoint, Pod, absolute path, raw PID, SecretHandle or local sidecar; diagnostics are authorized Artifact references." }, "PublicTaskList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicTask" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "maxLength": 512 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "has_more": { "const": true } }, "required": ["has_more"] }, "then": { "required": ["next_cursor"], "properties": { "next_cursor": { "type": "string", "minLength": 1 } } } } ] }, "PublicTaskEvent": { "type": "object", "additionalProperties": false, "required": [ "schema_version", "projection_version", "task_id", "session_id", "type", "created_at", "cursor" ], "properties": { "schema_version": { "type": "integer", "minimum": 1 }, "projection_version": { "type": "integer", "minimum": 1 }, "task_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "session_id": { "type": "string", "format": "uuid" }, "type": { "$ref": "#/components/schemas/TaskEventType" }, "cursor": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Stable opaque position after this event and its identity. Atomically apply the event and save this cursor to avoid duplicate application after a crash. It is never reassigned; normal retention can expire it." }, "created_at": { "type": "integer", "format": "int64" }, "state": { "$ref": "#/components/schemas/TaskState" }, "runtime_state": { "$ref": "#/components/schemas/TaskRuntimeState" }, "text": { "type": "string", "minLength": 1, "maxLength": 16384 }, "truncated": { "type": "boolean", "description": "True when the chunk was cut to the event limit; its full output is already durably readable and discoverable in the task Artifacts when the event is published." }, "artifact_id": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "type": { "const": "state_changed" } }, "required": ["type"] }, "then": { "required": ["state"], "not": { "anyOf": [ { "required": ["text"] }, { "required": ["truncated"] }, { "required": ["artifact_id"] } ] } } }, { "if": { "properties": { "type": { "const": "output" } }, "required": ["type"] }, "then": { "required": ["text"], "not": { "anyOf": [ { "required": ["state"] }, { "required": ["runtime_state"] }, { "required": ["artifact_id"] } ] } } }, { "if": { "properties": { "type": { "const": "artifact" } }, "required": ["type"] }, "then": { "required": ["artifact_id"], "not": { "anyOf": [ { "required": ["state"] }, { "required": ["runtime_state"] }, { "required": ["text"] }, { "required": ["truncated"] } ] } } } ], "description": "One task event: a logical state change, a bounded output chunk, or an Artifact reference. High-volume output goes to Artifacts or bounded chunks in this paged stream, never one Session event per raw line. The closed schema validates the server's own version; clients ignore unknown optional fields and unknown types and checkpoint their cursors. Strict response validation against an older minor version is not supported. Event identity, position, payload and accepted schema/projection versions are immutable across restart, projection rebuild and archival." }, "WebShellTask": { "type": "object", "additionalProperties": false, "required": [ "taskId", "sessionId", "kind", "state", "createdAt", "artifactRefs", "actionCapabilities" ], "properties": { "taskId": { "type": "string", "minLength": 1, "maxLength": 128 }, "sessionId": { "type": "string", "format": "uuid" }, "childSessionId": { "type": "string", "format": "uuid", "description": "The child Session that runs this task: present for a child_agent or workflow task once the run's committed record names it (the child's attach, or a terminal verdict that names a minted child), and absent for every other kind and before then. The child is a Session in the same Workspace, readable by exactly the callers that can read this task, so its Turns, items and events are the task's own output; reading them needs no other grant." }, "kind": { "$ref": "#/components/schemas/TaskKind" }, "state": { "$ref": "#/components/schemas/TaskState" }, "definitionRevision": { "type": "integer", "format": "int64", "minimum": 1, "description": "Immutable definition revision this run is pinned to, when the kind has a definition." }, "runtimeState": { "$ref": "#/components/schemas/TaskRuntimeState" }, "createdAt": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds." }, "startedAt": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds." }, "settledAt": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds." }, "outputCursor": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Stable task event cursor after the committed tail at view read time. No event can later appear at or before it. Pass it as after to follow only new events; recovery must instead keep its saved event page cursor so it does not skip intervening output. Normal retention may expire it." }, "artifactRefs": { "type": "array", "maxItems": 100, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 }, "description": "The newest Artifacts that hold durable task output, at most 100, oldest first. Entries must not rotate out until older Artifacts can be enumerated and attributed to the task: an evicted Artifact stays readable by id through the Session artifact routes but is no longer discoverable from the task." }, "actionCapabilities": { "type": "array", "maxItems": 3, "uniqueItems": true, "items": { "$ref": "#/components/schemas/TaskActionCapability" } }, "stopRequested": { "type": "boolean", "description": "A durable stop request has been recorded. This does not prove that the task has terminated." }, "approvalMode": { "type": "string", "enum": ["default", "auto-edit", "yolo"], "description": "The actual immutable approval mode of this public child Session." } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "state": { "enum": ["completed", "failed", "cancelled"] } }, "required": ["state"] }, "then": { "required": ["settledAt"], "properties": { "actionCapabilities": { "not": { "contains": { "enum": ["cancel", "send_input"] } } } } }, "else": { "not": { "required": ["settledAt"] } } }, { "if": { "properties": { "state": { "enum": ["running", "waiting", "degraded", "completed"] } }, "required": ["state"] }, "then": { "required": ["startedAt"] } }, { "if": { "properties": { "state": { "const": "pending" } }, "required": ["state"] }, "then": { "not": { "required": ["startedAt"] } } }, { "if": { "properties": { "state": { "const": "recovery_blocked" } }, "required": ["state"] }, "then": { "properties": { "actionCapabilities": { "not": { "contains": { "const": "send_input" } } } } } }, { "if": { "properties": { "kind": { "enum": ["child_agent", "workflow"] } }, "required": ["kind"] }, "else": { "not": { "required": ["childSessionId"] } } } ], "description": "Read-only projection of one asynchronous task of a Session (SessionTaskView). It is rebuilt from the Session's durable domain records and is never their source of truth. It never carries a Runtime binding ID, generation, Runtime endpoint, Pod, absolute path, raw PID, SecretHandle or local sidecar; diagnostics are authorized Artifact references." }, "WebShellTaskPage": { "type": "object", "additionalProperties": false, "required": ["data", "hasMore"], "properties": { "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/WebShellTask" } }, "hasMore": { "type": "boolean" }, "nextCursor": { "type": ["string", "null"], "maxLength": 512 }, "activeChildCount": { "type": "integer", "minimum": 0, "description": "The total number of nonterminal child Agent tasks in this Session, independent of pagination." } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "hasMore": { "const": true } }, "required": ["hasMore"] }, "then": { "required": ["nextCursor"], "properties": { "nextCursor": { "type": "string", "minLength": 1 } } } } ] }, "WebShellTaskEvent": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "projectionVersion", "taskId", "sessionId", "type", "createdAt", "cursor" ], "properties": { "schemaVersion": { "type": "integer", "minimum": 1 }, "projectionVersion": { "type": "integer", "minimum": 1 }, "taskId": { "type": "string", "minLength": 1, "maxLength": 128 }, "sessionId": { "type": "string", "format": "uuid" }, "type": { "$ref": "#/components/schemas/TaskEventType" }, "cursor": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Stable opaque position after this event and its identity. Atomically apply the event and save this cursor to avoid duplicate application after a crash. It is never reassigned; normal retention can expire it." }, "createdAt": { "type": "integer", "format": "int64" }, "state": { "$ref": "#/components/schemas/TaskState" }, "runtimeState": { "$ref": "#/components/schemas/TaskRuntimeState" }, "text": { "type": "string", "minLength": 1, "maxLength": 16384 }, "truncated": { "type": "boolean", "description": "True when the chunk was cut to the event limit; its full output is already durably readable and discoverable in the task Artifacts when the event is published." }, "artifactId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "type": { "const": "state_changed" } }, "required": ["type"] }, "then": { "required": ["state"], "not": { "anyOf": [ { "required": ["text"] }, { "required": ["truncated"] }, { "required": ["artifactId"] } ] } } }, { "if": { "properties": { "type": { "const": "output" } }, "required": ["type"] }, "then": { "required": ["text"], "not": { "anyOf": [ { "required": ["state"] }, { "required": ["runtimeState"] }, { "required": ["artifactId"] } ] } } }, { "if": { "properties": { "type": { "const": "artifact" } }, "required": ["type"] }, "then": { "required": ["artifactId"], "not": { "anyOf": [ { "required": ["state"] }, { "required": ["runtimeState"] }, { "required": ["text"] }, { "required": ["truncated"] } ] } } } ], "description": "One task event: a logical state change, a bounded output chunk, or an Artifact reference. High-volume output goes to Artifacts or bounded chunks in this paged stream, never one Session event per raw line. The closed schema validates the server's own version; clients ignore unknown optional fields and unknown types and checkpoint their cursors. Strict response validation against an older minor version is not supported. Event identity, position, payload and accepted schema/projection versions are immutable across restart, projection rebuild and archival." }, "WebShellTaskEventPage": { "type": "object", "additionalProperties": false, "required": ["data", "hasMore", "nextCursor"], "properties": { "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/WebShellTaskEvent" } }, "hasMore": { "type": "boolean" }, "nextCursor": { "type": "string", "minLength": 1, "maxLength": 512, "description": "The last returned event cursor, never passing an event held back by limit. On an empty page, the requested position, or the durable retention floor if after was omitted. Required and never null, including when no events remain. No event may later become visible at or before this position." } }, "x-qwen-implementation-status": "partial" }, "WebShellTaskQueryRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "cursor": { "type": "string", "maxLength": 512 }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } }, "x-qwen-implementation-status": "partial" }, "WebShellTaskGetRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "taskId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "taskId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "partial" }, "WebShellTaskEventQueryRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "taskId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "taskId": { "type": "string", "minLength": 1, "maxLength": 128 }, "after": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Opaque task event cursor: an event cursor, a page nextCursor or a task outputCursor. Omit it to read from the durable retention floor. Strictly below the floor is 409 cursor_expired; equality is valid, including with no retained events." }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } }, "x-qwen-implementation-status": "partial" }, "WebShellTaskCancelRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "taskId", "idempotencyKey"], "properties": { "requestId": { "type": ["string", "null"], "maxLength": 128, "description": "Trace correlation only; excluded from the request digest, so a retry with another requestId still replays. A header-safe value (1 to 128 visible ASCII characters) is echoed as X-Request-Id; any other value is replaced by a server-chosen id." }, "sessionId": { "type": "string", "format": "uuid" }, "taskId": { "type": "string", "minLength": 1, "maxLength": 128 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "TaskEventType": { "type": "string", "minLength": 1, "maxLength": 128, "x-qwen-implementation-status": "partial", "description": "state_changed, output or artifact. The set is open: a later minor version may add types and optional fields. Clients ignore unknown optional fields and unknown types, while still checkpointing event cursors; strict validation against an older minor response schema is not supported. Existing fields forbidden for a known type cannot be repurposed on that type." }, "PublicTaskEventList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more", "next_cursor"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicTaskEvent" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": "string", "minLength": 1, "maxLength": 512, "description": "The last returned event cursor, never passing an event held back by limit. On an empty page, the requested position, or the durable retention floor if after was omitted. Required and never null, including when no events remain. No event may later become visible at or before this position." } }, "x-qwen-implementation-status": "partial" }, "PublicHookCatalog": { "type": "object", "additionalProperties": false, "required": ["object", "session_id", "catalogs"], "properties": { "object": { "type": "string", "const": "agent.hook_catalog" }, "session_id": { "type": "string", "format": "uuid" }, "catalogs": { "type": "array", "maxItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["catalog_id", "catalog_revision", "hooks"], "properties": { "catalog_id": { "type": "string" }, "catalog_revision": { "type": "integer", "minimum": 1 }, "hooks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "hook_id", "event_name", "type", "sequential", "async", "fail_closed", "once" ], "properties": { "hook_id": { "type": "string" }, "event_name": { "type": "string" }, "type": { "type": "string", "enum": ["command", "http", "prompt", "function"] }, "sequential": { "type": "boolean" }, "async": { "type": "boolean" }, "fail_closed": { "type": "boolean" }, "once": { "type": "boolean" }, "matcher": { "type": "string" } } } } } } } } }, "ToolResultPreview": { "type": "object", "additionalProperties": false, "required": [ "text", "truncated", "stream_id", "source_start", "source_end" ], "properties": { "text": { "type": "string", "maxLength": 8192 }, "truncated": { "type": "boolean" }, "stream_id": { "type": "string", "enum": ["stdout", "stderr"] }, "source_start": { "type": "integer", "format": "int64", "minimum": 0 }, "source_end": { "type": "integer", "format": "int64", "minimum": 0 } } }, "PublicToolResult": { "type": "object", "additionalProperties": false, "required": [ "id", "session_id", "turn_id", "item_id", "projection_revision", "execution_status", "capture_status", "delivery_status", "capture_scope", "upstream_truncated", "artifacts" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "session_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "turn_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "item_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "projection_revision": { "type": "integer", "minimum": 1, "description": "This implementation projects each result once at revision 1. Monotonic consumers reject duplicate or stale replay events; reprojection requires a separately reviewed migration and producer." }, "execution_status": { "type": "string", "enum": ["success", "error", "cancelled", "not_started"] }, "capture_status": { "type": ["string", "null"], "enum": ["complete", "partial", "unavailable", null] }, "delivery_status": { "type": "string", "enum": ["pending", "committed", "blocked"], "description": "O3 emits committed or blocked from the durable receipt. Pending is reserved for future producers and is not emitted by this implementation." }, "capture_scope": { "type": ["string", "null"], "enum": ["process_pty", "process_pipes", "tool_native", null] }, "upstream_truncated": { "type": ["boolean", "null"] }, "reason_code": { "type": ["string", "null"], "maxLength": 128, "enum": [ "quota_exhausted", "size_limit", "producer_lost", "storage_failed", "cancelled", null ] }, "preview": { "anyOf": [ { "$ref": "#/components/schemas/ToolResultPreview" }, { "type": "null" } ] }, "artifacts": { "type": "array", "maxItems": 2, "items": { "$ref": "#/components/schemas/PublicArtifact" } } } }, "ArtifactAccess": { "type": "object", "additionalProperties": false, "required": ["can_read_content"], "properties": { "can_read_content": { "type": "boolean" } } }, "ToolResultResponse": { "type": "object", "additionalProperties": false, "required": ["result", "access"], "properties": { "result": { "$ref": "#/components/schemas/PublicToolResult" }, "access": { "$ref": "#/components/schemas/ArtifactAccess" } } }, "ArtifactResponse": { "type": "object", "additionalProperties": false, "required": ["artifact", "access"], "properties": { "artifact": { "$ref": "#/components/schemas/PublicArtifact" }, "access": { "$ref": "#/components/schemas/ArtifactAccess" } } }, "WebShellArtifactPage": { "type": "object", "additionalProperties": false, "required": ["data", "nextCursor", "hasMore"], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ArtifactResponse" } }, "nextCursor": { "type": ["string", "null"] }, "hasMore": { "type": "boolean" } } }, "WebShellToolResultRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "itemId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "itemId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellArtifactRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "artifactId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "artifactId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellArtifactQueryRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cursor": { "type": ["string", "null"], "maxLength": 2048 }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 } } }, "ActionInputPreview": { "type": "object", "additionalProperties": false, "required": ["text", "truncated", "byte_length"], "properties": { "text": { "type": "string", "maxLength": 65536, "description": "Exact UTF-8 prefix of payloadJson ({toolName,input}). Ordinary tools retain the 8192-byte preview. exit_plan_mode includes its complete input within the 64 KiB resource ceiling so a plan can be reviewed after refresh. Truncated ordinary previews may not be valid JSON." }, "truncated": { "type": "boolean", "description": "True when text is shorter than the complete UTF-8 input." }, "byte_length": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 65536, "description": "Byte length of the complete payloadJson in UTF-8, before truncation." } }, "description": "Optional preview for requested native read_file, write_file, edit or run_shell_command approvals. Missing or invalid input, and internal MCP inputs, omit the preview. No general secret redaction is performed; visibility follows Session read permissions. Deploy the version 2 Java reader before a Harness producer starts writing version 2 options." }, "WebShellActionInputPreview": { "type": "object", "additionalProperties": false, "required": ["text", "truncated", "byteLength"], "properties": { "text": { "type": "string", "maxLength": 65536, "description": "Exact UTF-8 prefix of payloadJson ({toolName,input}). Ordinary tools retain the 8192-byte preview. exit_plan_mode includes its complete input within the 64 KiB resource ceiling so a plan can be reviewed after refresh. Truncated ordinary previews may not be valid JSON." }, "truncated": { "type": "boolean", "description": "True when text is shorter than the complete UTF-8 input." }, "byteLength": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 65536, "description": "Byte length of the complete payloadJson in UTF-8, before truncation." } }, "description": "Optional preview for requested native read_file, write_file, edit or run_shell_command approvals. Missing or invalid input, and internal MCP inputs, omit the preview. No general secret redaction is performed; visibility follows Session read permissions. Deploy the version 2 Java reader before a Harness producer starts writing version 2 options." }, "ChannelConnectionState": { "type": "string", "enum": ["connected", "disconnected"], "x-qwen-implementation-status": "partial" }, "ChannelRouteState": { "type": "string", "enum": ["staged", "admitted"], "x-qwen-implementation-status": "partial" }, "ChannelDeliveryState": { "type": "string", "enum": [ "planned", "sending", "partial", "delivered", "unknown", "rejected", "cancelled" ], "x-qwen-implementation-status": "partial" }, "PublicChannelRoute": { "type": "object", "additionalProperties": false, "required": [ "platform_event_id", "account_generation", "semantic_revision", "sender_id", "session_id", "state", "staged_attachment_refs", "created_at" ], "properties": { "platform_event_id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Identity the platform gave the inbound event. The binding commits it together with the channel instance, the account generation and the semantic revision, so two distinct platform events stay two bindings even when their text is identical." }, "account_generation": { "type": "integer", "format": "int64", "minimum": 1, "description": "Account generation of the connection when the binding committed; re-authenticating the channel account invalidates bindings of older generations." }, "semantic_revision": { "type": "integer", "format": "int64", "minimum": 1, "description": "Semantic revision of the platform event the binding committed; an edited platform message binds a new revision instead of rewriting an existing binding." }, "sender_id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Authenticated sender identity the route was bound from; sender display names and chat titles grant no routing authority." }, "chat_id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Authenticated chat identity the route was bound from, when the platform has one." }, "thread_id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Authenticated thread identity the route was bound from, when the platform has one." }, "session_id": { "type": "string", "format": "uuid", "description": "Reply target Session the binding committed; a later UI Session selection never overwrites it." }, "state": { "$ref": "#/components/schemas/ChannelRouteState" }, "input_id": { "type": "string", "minLength": 1, "maxLength": 512, "description": "The input the Session admitted from this binding; present exactly while state is admitted." }, "staged_attachment_refs": { "type": "array", "maxItems": 100, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 128 }, "description": "Artifacts that received this binding's attachments before input admission. While admission is unknown the staged bytes stay readable through these references and the original input id stays queryable." }, "created_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "state": { "const": "admitted" } }, "required": ["state"] }, "then": { "required": ["input_id"] }, "else": { "not": { "required": ["input_id"] } } } ] }, "PublicChannel": { "type": "object", "additionalProperties": false, "required": [ "id", "object", "platform", "account_generation", "state", "routes", "created_at" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "object": { "const": "agent.channel" }, "platform": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Platform this channel instance connects." }, "account_generation": { "type": "integer", "format": "int64", "minimum": 1, "description": "Current account generation of the connection; re-authenticating the channel account increments it." }, "state": { "$ref": "#/components/schemas/ChannelConnectionState" }, "routes": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicChannelRoute" }, "description": "The newest 100 route bindings of this connection, oldest first." }, "created_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." } }, "x-qwen-implementation-status": "partial" }, "PublicChannelList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicChannel" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "maxLength": 512 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "has_more": { "const": true } }, "required": ["has_more"] }, "then": { "required": ["next_cursor"], "properties": { "next_cursor": { "type": "string", "minLength": 1 } } } } ] }, "PublicChannelDelivery": { "type": "object", "additionalProperties": false, "required": [ "id", "object", "channel_id", "segment_id", "ordinal", "state", "segments", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "object": { "const": "agent.channel.delivery" }, "channel_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "segment_id": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Stable identity of the delivery's first segment, the first entry of segments; only segments proven unsent are sent again, and an explicit resend keeps each carried identity under a new deliveryId. The authoritative per-segment view is segments." }, "ordinal": { "type": "integer", "minimum": 0, "description": "Position of the first segment (the singular segment_id) within the delivery, contiguous from 0." }, "state": { "$ref": "#/components/schemas/ChannelDeliveryState" }, "provider_receipt": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Representative opaque receipt the provider returned for this delivery; absent while the provider returned none, including a delivery reconciled out of unknown. The per-segment receipts are in segments." }, "segments": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "$ref": "#/components/schemas/PublicChannelDeliverySegment" }, "description": "Every segment of the delivery in ordinal order, each with its own write-once provider receipt. The singular segment_id and ordinal name the first segment; this array is the authoritative per-segment view." }, "created_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." }, "updated_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." } }, "x-qwen-implementation-status": "partial" }, "PublicChannelDeliverySegment": { "type": "object", "additionalProperties": false, "required": ["segment_id", "ordinal"], "properties": { "segment_id": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Stable identity of this segment; an explicit resend keeps it under a new deliveryId." }, "ordinal": { "type": "integer", "minimum": 0, "description": "Position of the segment within the delivery, contiguous from 0." }, "provider_receipt": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Opaque receipt the provider returned for this segment; absent until the segment is receipted." } }, "x-qwen-implementation-status": "partial" }, "PublicChannelDeliveryList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicChannelDelivery" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "maxLength": 512 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "has_more": { "const": true } }, "required": ["has_more"] }, "then": { "required": ["next_cursor"], "properties": { "next_cursor": { "type": "string", "minLength": 1 } } } } ] }, "AutomationSessionMode": { "type": "string", "enum": ["persistent", "per_run"], "description": "per_run is registered and refused until the child Session slice carries it.", "x-qwen-implementation-status": "partial" }, "AutomationOverlapPolicy": { "type": "string", "enum": ["skip", "queue_one", "allow"], "x-qwen-implementation-status": "partial" }, "AutomationCatchUpPolicy": { "type": "string", "enum": ["none", "latest", "bounded"], "x-qwen-implementation-status": "partial" }, "AutomationState": { "type": "string", "enum": ["live", "retired"], "x-qwen-implementation-status": "partial" }, "AutomationRunTrigger": { "type": "string", "enum": ["scheduled", "manual", "catch_up"], "x-qwen-implementation-status": "partial" }, "AutomationRunOutcome": { "type": "string", "enum": ["firing", "fired", "skipped", "missed", "unknown"], "description": "firing is a claimed occurrence whose Harness answer is not recorded yet and is re-driven with bounded backoff; fired committed a run; skipped and missed never did; unknown is a claim whose answer stayed unobtainable past the retry bound and is never re-driven.", "x-qwen-implementation-status": "partial" }, "AutomationDefinitionCreateRequest": { "allOf": [ { "$ref": "#/components/schemas/AutomationDefinitionRequest" }, { "required": ["session_id", "goal", "cron", "timezone", "prompt"] }, { "if": { "properties": { "catch_up": { "const": "bounded" } }, "required": ["catch_up"] }, "then": { "required": ["catch_up_limit"] } } ] }, "AutomationGateStatus": { "type": "object", "additionalProperties": false, "required": [ "last_outcome", "last_at", "quiet_since_delivery", "consecutive_failures" ], "properties": { "last_outcome": { "type": "string", "enum": ["delivered", "quiet", "failed", "blocked", "unknown"], "description": "How the most recent probe decided: delivered fired a run with the output; quiet printed nothing; failed exited non-zero, timed out or could not start; blocked could not run on this Session; unknown is a probe the Runtime could not settle." }, "last_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds of the most recent probe." }, "quiet_since_delivery": { "type": "integer", "minimum": 0, "description": "Quiet probes since the last delivery." }, "consecutive_failures": { "type": "integer", "minimum": 0, "description": "Failed, blocked and unknown probes since the last quiet or delivered one." }, "last_error": { "type": "string", "maxLength": 1024, "description": "What the last failing probe reported; absent while the streak is zero." } }, "x-qwen-implementation-status": "partial" }, "AutomationDefinitionRequest": { "type": "object", "additionalProperties": false, "properties": { "session_id": { "type": "string", "minLength": 1, "maxLength": 128, "description": "The target Session; required on create. On update it must be absent or equal to the created Session — a different value is refused with 400 invalid_automation." }, "goal": { "type": "string", "minLength": 1, "maxLength": 4096, "description": "At most 4096 UTF-8 bytes (measured as bytes, not code points; control characters are refused)." }, "cron": { "type": "string", "minLength": 9, "maxLength": 400, "description": "Five fields: minute hour day-of-month month day-of-week, digit, range, list and step atoms only." }, "timezone": { "type": "string", "minLength": 1, "maxLength": 256, "description": "An IANA zone name the deployment's tz database resolves." }, "prompt": { "type": "string", "minLength": 1, "maxLength": 65536, "description": "At most 65536 UTF-8 bytes (measured as bytes); the final wrapped execution input must also fit the Session store's 65536-byte inline resource bound, so the effective prompt budget is tighter once escaping and framing are counted." }, "session_mode": { "$ref": "#/components/schemas/AutomationSessionMode" }, "overlap": { "$ref": "#/components/schemas/AutomationOverlapPolicy" }, "catch_up": { "$ref": "#/components/schemas/AutomationCatchUpPolicy" }, "catch_up_limit": { "type": ["integer", "null"], "format": "int64", "minimum": 1, "description": "Set exactly for bounded catch-up: bounded requires one, any other policy clears it." }, "enabled": { "type": "boolean" }, "gate": { "type": ["string", "null"], "maxLength": 2048, "description": "A shell command the Workspace Runtime runs at each fire before any run is claimed: silence (exit 0, empty stdout) skips the fire, output wakes the Session with the output attached as data, a failure is recorded and never fires the prompt. At most 2048 UTF-8 bytes, no control characters, no unpaired surrogate, no shell wrapper such as bash -c, no part backgrounded with &. The output's block is reserved in the execution input, so a gated definition's prompt is about 32 KiB shorter than an ungated one's; a prompt too long only because of the gate answers 400 automation_gate_invalid. Null clears a committed gate; an absent field keeps it. Needs a Session whose tool profile declares Shell (409 automation_gate_unsupported otherwise)." } }, "allOf": [ { "if": { "properties": { "catch_up": { "const": "bounded" } }, "required": ["catch_up"] }, "then": { "properties": { "catch_up_limit": { "type": "integer" } } } }, { "if": { "properties": { "catch_up": { "enum": ["none", "latest"] } }, "required": ["catch_up"] }, "then": { "properties": { "catch_up_limit": { "type": "null" } } } } ], "x-qwen-implementation-status": "partial" }, "PublicAutomation": { "type": "object", "additionalProperties": false, "required": [ "id", "object", "session_id", "definition_revision", "digest", "goal", "cron", "timezone", "session_mode", "overlap", "catch_up", "enabled", "state", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "object": { "const": "agent.automation" }, "session_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "definition_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "goal": { "type": "string", "maxLength": 4096 }, "cron": { "type": "string", "maxLength": 400 }, "timezone": { "type": "string", "maxLength": 256 }, "session_mode": { "$ref": "#/components/schemas/AutomationSessionMode" }, "overlap": { "$ref": "#/components/schemas/AutomationOverlapPolicy" }, "catch_up": { "$ref": "#/components/schemas/AutomationCatchUpPolicy" }, "catch_up_limit": { "type": ["integer", "null"], "format": "int64", "minimum": 1 }, "enabled": { "type": "boolean" }, "state": { "$ref": "#/components/schemas/AutomationState" }, "created_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds, unlike the seconds that the public Session, turn, event and item resources report." }, "updated_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds." }, "gate": { "type": "string", "maxLength": 2048, "description": "The definition's gate command; absent for a definition that fires every slot." }, "gate_status": { "$ref": "#/components/schemas/AutomationGateStatus", "description": "The gate's recent outcomes; absent until the gate first ran, or for a definition without one." } }, "allOf": [ { "if": { "properties": { "catch_up": { "const": "bounded" } }, "required": ["catch_up"] }, "then": { "required": ["catch_up_limit"], "properties": { "catch_up_limit": { "type": "integer" } } } }, { "if": { "properties": { "catch_up": { "enum": ["none", "latest"] } }, "required": ["catch_up"] }, "then": { "properties": { "catch_up_limit": { "type": "null" } } } } ], "x-qwen-implementation-status": "partial" }, "PublicAutomationList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicAutomation" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "maxLength": 512 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "has_more": { "const": true } }, "required": ["has_more"] }, "then": { "required": ["next_cursor"], "properties": { "next_cursor": { "type": "string", "minLength": 1 } } } } ] }, "PublicAutomationRun": { "type": "object", "additionalProperties": false, "required": [ "id", "object", "automation_id", "session_id", "occurrence_key", "trigger", "outcome", "definition_revision", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128, "description": "The derived run id (arun_ plus the digest of the definition and occurrence); the same for a fired, skipped or missed occurrence." }, "object": { "const": "agent.automation.run" }, "automation_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "session_id": { "type": "string", "minLength": 1, "maxLength": 128 }, "occurrence_key": { "type": "string", "minLength": 1, "maxLength": 160, "description": "schedule: or manual:." }, "slot": { "type": ["string", "null"], "description": "The canonical UTC slot instant of a scheduled occurrence; null for a manual run." }, "trigger": { "$ref": "#/components/schemas/AutomationRunTrigger" }, "outcome": { "$ref": "#/components/schemas/AutomationRunOutcome" }, "reason": { "type": ["string", "null"], "maxLength": 64, "description": "overlap, count_limit, session_not_active, revision_stale or definition_retired for a skipped policy decision; gate_quiet, gate_failed, gate_blocked or gate_unknown for a fire the definition's gate withheld; answer_unobtainable for an unknown one; a definitive Harness refusal settles skipped carrying its own error code verbatim (invalid_automation_operation, automation_mode_disabled, automation_count_limit or automation_operation_conflict); absent otherwise." }, "definition_revision": { "type": "integer", "format": "int64", "minimum": 1 }, "state": { "anyOf": [ { "$ref": "#/components/schemas/TaskState" }, { "type": "null" } ], "description": "The run's task state once the run committed; null until its record is visible." }, "created_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds." }, "updated_at": { "type": "integer", "format": "int64", "description": "Unix epoch milliseconds." } }, "x-qwen-implementation-status": "partial" }, "PublicAutomationRunList": { "type": "object", "additionalProperties": false, "required": ["object", "data", "has_more"], "properties": { "object": { "const": "list" }, "data": { "type": "array", "maxItems": 100, "items": { "$ref": "#/components/schemas/PublicAutomationRun" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"], "maxLength": 512 } }, "x-qwen-implementation-status": "partial", "allOf": [ { "if": { "properties": { "has_more": { "const": true } }, "required": ["has_more"] }, "then": { "required": ["next_cursor"], "properties": { "next_cursor": { "type": "string", "minLength": 1 } } } } ] }, "AgentStaticSkill": { "description": "The supported static Skill shape at Session admission; stored revisions may contain future options but those options cannot execute.", "type": "object", "additionalProperties": false, "required": ["name", "description", "body"], "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[\\p{L}\\p{N}_:.-]+$", "description": "At most 128 UTF-8 bytes; duplicate names are refused at Session admission." }, "description": { "type": "string", "minLength": 1, "maxLength": 4096, "description": "Nonblank text, at most 4096 UTF-8 bytes." }, "body": { "type": "string", "minLength": 1, "maxLength": 32768, "description": "Nonblank Markdown, at most 32768 UTF-8 bytes. Loaded verbatim; no permission, Hook, or model side effects." }, "base_directory": { "type": "string", "minLength": 1, "maxLength": 4096, "default": ".", "description": "A canonical POSIX directory relative to the Session working directory, at most 4096 UTF-8 bytes, matching Runtime read_file and glob semantics. The default is '.'. Absolute paths, empty/dot/traversal components, colons, backslashes, control characters, and invalid Unicode are refused at Session admission." } } }, "AgentMcpServerPin": { "description": "The supported Runtime definition pin shape at Session admission.", "type": "object", "additionalProperties": false, "required": ["server_id", "server_revision", "definition_digest"], "properties": { "server_id": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "server_revision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "definition_digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "AgentHookCatalogPin": { "description": "The supported Runtime definition pin shape at Session admission.", "type": "object", "additionalProperties": false, "required": ["catalog_id", "catalog_revision", "definition_digest"], "properties": { "catalog_id": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "catalog_revision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "definition_digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "WebShellWorkspaceCreateRequest": { "type": "object", "additionalProperties": false, "required": ["displayName", "idempotencyKey"], "properties": { "displayName": { "type": "string", "minLength": 1, "maxLength": 128, "description": "Trimmed display name, without control characters. The server validates the normalized name." }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "sourceWorkspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwdRelative": { "type": "string", "minLength": 1, "maxLength": 2048 }, "localPath": { "type": "string", "description": "Absolute execution-host directory. Requires localDirectoryImport; exclusive with Workspace-relative fields. An empty path is allowed only for directory browsing and starts at the host home directory." } }, "x-qwen-implementation-status": "implemented", "not": { "allOf": [ { "required": ["localPath"] }, { "anyOf": [ { "required": ["sourceWorkspaceId"] }, { "required": ["cwdRelative"] } ] } ] } }, "WebShellSessionOptionsRequest": { "type": "object", "additionalProperties": false, "required": ["agentId"], "properties": { "agentId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellSessionOptions": { "type": "object", "additionalProperties": false, "required": ["approvalMode", "availableApprovalModes"], "properties": { "approvalMode": { "type": "string", "enum": ["default", "auto-edit", "yolo"] }, "availableApprovalModes": { "type": "array", "minItems": 1, "maxItems": 3, "items": { "type": "string", "enum": ["default", "auto-edit", "yolo"] }, "description": "Execution policies available at creation. Stored definitions retain their initial policy; existing eligible Sessions may select a policy separately. Plan is an independent overlay." }, "planModeSupported": { "type": "boolean", "description": "Optional deployment capability; missing means false." }, "inputAttachments": { "type": "boolean", "description": "Optional deployment capability; missing means false." }, "modelSelectionSupported": { "type": "boolean", "description": "Optional capability for modelId on Workspace creation. Missing means false." }, "skillsSupported": { "type": "boolean", "description": "Optional deployment capability; missing means false. Requires a compatible Harness and durable Session Store." } } }, "WebShellModelContext": { "type": "object", "additionalProperties": false, "required": ["modelId", "observedAt"], "properties": { "modelId": { "type": "string", "minLength": 1, "description": "Actual model identity from the committed main-model usage resource." }, "inputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Provider prompt token count for the latest successfully committed main-model request; not cumulative billing usage." }, "contextWindowSize": { "type": "integer", "minimum": 1, "maximum": 9007199254740991, "description": "Context capacity from the same resolved model configuration. Missing means unknown." }, "observedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Timestamp of the committed source observation, in Unix epoch milliseconds." } }, "description": "Safe allowlisted observation for a Workspace-bound Session. Unknown counts are omitted, never estimated." }, "WebShellModelSelection": { "type": "object", "required": ["revision"], "properties": { "modelId": { "type": "string", "minLength": 1, "maxLength": 512 }, "revision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 } } }, "WebShellModelOption": { "type": "object", "required": ["modelId", "label"], "properties": { "modelId": { "type": "string", "minLength": 1, "maxLength": 512 }, "label": { "type": "string" } } }, "WebShellSessionModelsRequest": { "type": "object", "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellSessionModels": { "type": "object", "required": ["models", "modelSelection", "supported"], "properties": { "models": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellModelOption" } }, "modelSelection": { "$ref": "#/components/schemas/WebShellModelSelection" }, "supported": { "type": "boolean" } } }, "WebShellChangeModelRequest": { "type": "object", "required": [ "sessionId", "modelId", "expectedRevision", "idempotencyKey" ], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "modelId": { "type": "string", "minLength": 1, "maxLength": 512 }, "expectedRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestId": { "type": "string", "maxLength": 128 } } }, "WebShellModelChangeResult": { "type": "object", "required": ["sessionId", "modelSelection", "replayed"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 512 }, "modelSelection": { "$ref": "#/components/schemas/WebShellModelSelection" }, "replayed": { "type": "boolean" } } }, "WebShellSessionApprovalRequest": { "type": "object", "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellSessionApproval": { "type": "object", "required": [ "approvalMode", "approvalRevision", "availableApprovalModes", "supported" ], "properties": { "liveSupported": { "type": "boolean", "description": "Execution approval can change during a Turn when true. Missing means idle-only; Plan changes remain idle-only." }, "approvalMode": { "type": "string", "enum": ["default", "auto", "auto-edit", "yolo"] }, "approvalRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "availableApprovalModes": { "type": "array", "items": { "type": "string", "enum": ["default", "auto", "auto-edit", "yolo"] } }, "supported": { "type": "boolean" }, "planMode": { "type": "boolean", "description": "Persisted public Plan overlay, independent of execution permission. Omission on a change preserves the selected state." }, "planModeSupported": { "type": "boolean", "description": "Optional deployment capability; missing means false." }, "permissionRules": { "$ref": "#/components/schemas/ManagedPermissionRules", "description": "Persisted rules, including when execution capability is unavailable. Omitted when empty." }, "permissionRulesSupported": { "type": "boolean", "description": "Owner-authorized Session rule editing is available only with Harness permission-rules/1 support. Missing means false. Rule changes require an idle Session." } } }, "WebShellChangeApprovalRequest": { "type": "object", "required": [ "sessionId", "approvalMode", "expectedRevision", "idempotencyKey" ], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "expectedRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestId": { "type": "string", "maxLength": 128 }, "approvalMode": { "type": "string", "enum": ["default", "auto", "auto-edit", "yolo"] }, "planMode": { "type": "boolean", "description": "Persisted public Plan overlay, independent of execution permission. Omission on a change preserves the selected state." }, "permissionRules": { "$ref": "#/components/schemas/ManagedPermissionRules", "description": "Omission preserves the persisted rules. Supplying three empty arrays clears them. Rule edits require an idle Session, and share the approval revision and idempotency receipt with mode changes." } } }, "WebShellApprovalChangeResult": { "type": "object", "required": [ "sessionId", "approvalMode", "approvalRevision", "replayed" ], "properties": { "sessionId": { "type": "string" }, "approvalMode": { "type": "string", "enum": ["default", "auto", "auto-edit", "yolo"] }, "approvalRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "replayed": { "type": "boolean" }, "planMode": { "type": "boolean", "description": "Persisted public Plan overlay, independent of execution permission. Omission on a change preserves the selected state." }, "permissionRules": { "$ref": "#/components/schemas/ManagedPermissionRules", "description": "Committed rules; omitted when empty. Replayed requests return their original policy receipt." } } }, "WebShellApprovalSelection": { "type": "object", "required": ["mode", "revision"], "properties": { "mode": { "type": "string", "enum": ["default", "auto", "auto-edit", "yolo"] }, "revision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "planMode": { "type": "boolean", "description": "Immutable Plan overlay for this approval selection." }, "permissionRules": { "$ref": "#/components/schemas/ManagedPermissionRules", "description": "Immutable rules snapshot for this Turn; omitted when empty." } } }, "WebShellRuntimeNode": { "type": "object", "additionalProperties": false, "required": ["nodeId", "displayName"], "properties": { "nodeId": { "type": "string", "minLength": 1, "maxLength": 512 }, "displayName": { "type": "string", "minLength": 1, "maxLength": 512 } }, "x-qwen-implementation-status": "implemented" }, "WebShellRuntimeNodePage": { "type": "object", "additionalProperties": false, "required": ["supported", "data"], "properties": { "supported": { "type": "boolean", "default": false }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellRuntimeNode" } } }, "x-qwen-implementation-status": "implemented", "description": "Disabled registration returns supported=false and no nodes. This capability controls fresh registration only; existing operation queries remain available.", "allOf": [ { "if": { "properties": { "supported": { "const": false } } }, "then": { "properties": { "data": { "maxItems": 0 } } } } ] }, "WebShellWorkspaceDirectoryRequest": { "type": "object", "additionalProperties": false, "required": ["nodeId", "path"], "properties": { "nodeId": { "type": "string", "minLength": 1, "maxLength": 128 }, "path": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Existing absolute directory on the selected node; no directory or repository is created." } }, "x-qwen-implementation-status": "implemented" }, "WebShellWorkspaceDirectory": { "type": "object", "additionalProperties": false, "required": ["nodeId", "canonicalPath", "platform"], "properties": { "nodeId": { "type": "string", "minLength": 1, "maxLength": 128 }, "canonicalPath": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Canonical absolute path after remote directory validation." }, "platform": { "type": "string", "enum": ["linux", "darwin"] } }, "x-qwen-implementation-status": "implemented" }, "WebShellWorkspaceOperationRequest": { "type": "object", "additionalProperties": false, "required": ["operationId"], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "x-qwen-implementation-status": "implemented" }, "WebShellWorkspaceCreateOperation": { "type": "object", "additionalProperties": false, "required": ["operationId", "type", "status", "replayed"], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 128 }, "type": { "type": "string", "const": "workspace_create" }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "cancelled", "recovery_blocked" ] }, "workspaceId": { "type": ["string", "null"], "minLength": 1, "maxLength": 128 }, "failureCode": { "type": ["string", "null"] }, "replayed": { "type": "boolean" } }, "x-qwen-implementation-status": "implemented", "description": "workspaceId is returned only after completed registration. recovery_blocked means the registration may have reached its node: it keeps the original ownership until Java reads the node and completes it, or fails it and releases the directory. A node that cannot be read, no longer admits the actor or holds another registration's marker leaves it for administrator review, and a new browser draft does not release it. failed releases the directory if the registration reserved it. replayed=true identifies an existing operation returned by a repeated key or a query." }, "WebShellWorkspaceRegisterRequest": { "type": "object", "additionalProperties": false, "required": ["nodeId", "path", "displayName", "idempotencyKey"], "properties": { "nodeId": { "type": "string", "minLength": 1, "maxLength": 128 }, "path": { "type": "string", "minLength": 1, "maxLength": 512 }, "displayName": { "type": "string", "minLength": 1, "maxLength": 512 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 512, "description": "Actor-scoped registration key. Reuse this key and the same semantic fields until the operation identity is known." }, "requestId": { "type": ["string", "null"], "maxLength": 128, "description": "Trace correlation only; excluded from the request digest, so a retry with another requestId still replays. A header-safe value (1 to 128 visible ASCII characters) is echoed as X-Request-Id; any other value is replaced by a server-chosen id." } }, "x-qwen-implementation-status": "implemented" }, "WebShellWorkspaceDirectoryPage": { "type": "object", "additionalProperties": false, "required": ["root", "cwdRelative", "directories", "truncated"], "properties": { "root": { "type": "string" }, "cwdRelative": { "type": "string" }, "truncated": { "type": "boolean" }, "directories": { "type": "array", "maxItems": 100, "items": { "type": "object", "additionalProperties": false, "required": ["name", "cwdRelative"], "properties": { "name": { "type": "string" }, "cwdRelative": { "type": "string" } } } } } }, "WebShellWorkspaceDirectoryQueryRequest": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["workspaceId", "cwdRelative"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwdRelative": { "type": "string", "minLength": 1, "maxLength": 2048 } } }, { "type": "object", "additionalProperties": false, "required": ["localPath"], "properties": { "localPath": { "type": "string", "description": "Absolute execution-host directory. Requires localDirectoryImport; exclusive with Workspace-relative fields. An empty path is allowed only for directory browsing and starts at the host home directory." } } } ] }, "InputTextBlock": { "type": "object", "additionalProperties": false, "required": ["type", "text"], "properties": { "type": { "type": "string", "enum": ["input_text", "text"] }, "text": { "type": "string", "minLength": 1, "maxLength": 1000000 } } }, "InputFileBlock": { "type": "object", "additionalProperties": false, "required": ["type", "name", "mime_type", "text"], "properties": { "type": { "type": "string", "enum": ["input_file"] }, "name": { "type": "string", "minLength": 1, "maxLength": 255 }, "mime_type": { "type": "string", "minLength": 1, "maxLength": 128 }, "text": { "type": "string", "minLength": 1, "maxLength": 8388608 } }, "description": "Inline UTF-8 text file. No host paths, URLs, binary or NUL. Conservative text MIME/extension validation; the complete canonical input containing attachments is limited to 8 MiB." }, "InputImageBlock": { "type": "object", "additionalProperties": false, "required": ["type", "mime_type", "data"], "properties": { "type": { "type": "string", "enum": ["input_image"] }, "mime_type": { "type": "string", "enum": [ "image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp" ] }, "data": { "type": "string", "minLength": 1, "maxLength": 8388608 } }, "description": "Canonical base64 PNG, JPEG, GIF or WebP image with a matching signature. The image/jpg alias is normalized to image/jpeg. The complete canonical input containing attachments is limited to 8 MiB." }, "WebShellSkill": { "type": "object", "additionalProperties": false, "required": ["name", "description"], "properties": { "name": { "type": "string", "maxLength": 128 }, "description": { "type": "string", "maxLength": 4096 } } }, "WebShellSessionSkills": { "type": "object", "additionalProperties": false, "required": ["skills"], "properties": { "skills": { "type": "array", "maxItems": 256, "items": { "$ref": "#/components/schemas/WebShellSkill" } } } }, "WebShellWorkspaceFileQueryRequest": { "type": "object", "additionalProperties": false, "required": ["directory"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwdRelative": { "type": "string", "minLength": 1, "maxLength": 1024 }, "directory": { "type": "string", "minLength": 1, "maxLength": 1024 }, "query": { "type": "string", "maxLength": 256 }, "expectedScopeRevision": { "type": "string", "maxLength": 64 }, "sessionId": { "type": "string", "format": "uuid" } }, "oneOf": [ { "required": ["sessionId"], "not": { "anyOf": [ { "required": ["workspaceId"] }, { "required": ["cwdRelative"] } ] } }, { "required": ["workspaceId", "cwdRelative"], "not": { "required": ["sessionId"] } } ] }, "WebShellWorkspaceFileReadRequest": { "type": "object", "additionalProperties": false, "required": ["path", "expectedScopeRevision"], "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 }, "cwdRelative": { "type": "string", "minLength": 1, "maxLength": 1024 }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "expectedScopeRevision": { "type": "string", "minLength": 1, "maxLength": 64 }, "sessionId": { "type": "string", "format": "uuid" } }, "oneOf": [ { "required": ["sessionId"], "not": { "anyOf": [ { "required": ["workspaceId"] }, { "required": ["cwdRelative"] } ] } }, { "required": ["workspaceId", "cwdRelative"], "not": { "required": ["sessionId"] } } ] }, "WebShellWorkspaceFileEntry": { "type": "object", "additionalProperties": false, "required": ["path", "name", "kind"], "properties": { "path": { "type": "string" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": ["file", "directory"] } } }, "WebShellWorkspaceFilePage": { "type": "object", "additionalProperties": false, "required": ["scopeRevision", "directory", "entries", "truncated"], "properties": { "scopeRevision": { "type": "string" }, "directory": { "type": "string" }, "entries": { "type": "array", "maxItems": 50, "items": { "$ref": "#/components/schemas/WebShellWorkspaceFileEntry" } }, "truncated": { "type": "boolean" }, "maxUploadBytes": { "type": "integer", "minimum": 8388608, "maximum": 8388608, "description": "Present only when the selected CLI supports durable Workspace uploads." } } }, "WebShellWorkspaceFileSnapshot": { "type": "object", "additionalProperties": false, "required": [ "scopeRevision", "path", "name", "mimeType", "text", "byteLength", "sha256" ], "properties": { "scopeRevision": { "type": "string" }, "path": { "type": "string" }, "name": { "type": "string" }, "mimeType": { "type": "string", "enum": ["text/plain"] }, "text": { "type": "string" }, "byteLength": { "type": "integer", "minimum": 1, "maximum": 24576 }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } }, "WebShellToolDetails": { "type": "object", "additionalProperties": false, "required": ["input", "output", "truncated"], "properties": { "input": { "type": ["object", "null"], "additionalProperties": true, "description": "Allowlisted display arguments, or null when unavailable or larger than 4 KiB." }, "output": { "type": ["string", "null"], "description": "Recorded text or error, bounded to 8 KiB and 200 lines; null means unavailable, an empty string means recorded empty output." }, "truncated": { "type": "boolean" }, "shellResult": { "$ref": "#/components/schemas/WebShellShellResult", "description": "Validated saved Shell display, when available. Text fields share an 8 KiB/200-line budget; directory and output-file paths share an 8 KiB UTF-8 budget. Legacy text remains in output." } } }, "WebShellShellResult": { "type": "object", "additionalProperties": false, "required": [ "type", "version", "text", "output", "directory", "exitCode", "signal", "pid", "error", "outcome", "notices", "truncated", "outputFiles" ], "properties": { "type": { "type": "string", "const": "shell_result" }, "version": { "type": "integer", "const": 1 }, "text": { "type": "string" }, "output": { "type": "string" }, "directory": { "type": "string" }, "exitCode": { "type": ["integer", "null"], "minimum": -9007199254740991, "maximum": 9007199254740991 }, "signal": { "type": ["integer", "null"], "minimum": -9007199254740991, "maximum": 9007199254740991 }, "pid": { "type": ["integer", "null"], "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": ["string", "null"] }, "outcome": { "type": "string", "enum": ["completed", "failed", "cancelled", "timed_out"] }, "notices": { "type": "array", "maxItems": 32, "items": { "type": "string" } }, "truncated": { "type": "boolean" }, "outputFiles": { "type": "array", "maxItems": 32, "items": { "type": "string" } } } }, "WebShellRenameRequest": { "type": "object", "required": ["sessionId", "title", "idempotencyKey"], "properties": { "requestId": { "type": "string", "maxLength": 128 }, "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[!-~]+$" }, "title": { "type": "string", "minLength": 1, "maxLength": 256, "description": "The server enforces the bound in UTF-16 code units (Java String.length()), so an astral character counts as two: a title this schema's code-point maxLength accepts can still exceed the server's 256-unit bound and answer 400 invalid_title." } } }, "WebShellRenameResult": { "type": "object", "required": ["sessionId", "title", "replayed"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "title": { "type": "string", "description": "Current persisted title from the confirmed mutation or completed replay." }, "replayed": { "type": "boolean" } } }, "SessionCreationSkill": { "type": "object", "additionalProperties": false, "required": ["name", "description", "body"], "properties": { "name": { "type": "string", "minLength": 1, "description": "Unique Skill name, at most 128 UTF-8 bytes." }, "description": { "type": "string", "minLength": 1, "description": "At most 4096 UTF-8 bytes." }, "body": { "type": "string", "minLength": 1, "description": "Static instructions, at most 524288 UTF-8 bytes." }, "base_directory": { "type": "string", "description": "Canonical POSIX path relative to the Session working directory; defaults to dot." }, "model_invocable": { "type": "boolean", "description": "Whether the model may invoke this Skill; defaults to true." }, "user_invocable": { "type": "boolean", "description": "Whether the user may invoke this Skill; defaults to true." } } }, "CompressSessionRequest": { "type": "object", "additionalProperties": false, "required": ["expected_compaction_revision"], "properties": { "expected_compaction_revision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 } }, "x-qwen-implementation-status": "implemented" }, "WebShellContextCompressionRequest": { "type": "object", "additionalProperties": false, "required": [ "sessionId", "idempotencyKey", "expectedCompactionRevision" ], "properties": { "requestId": { "type": "string", "maxLength": 128 }, "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "expectedCompactionRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 } }, "x-qwen-implementation-status": "implemented" }, "PublicContextCompressionOperation": { "type": "object", "additionalProperties": false, "required": [ "id", "session_id", "type", "status", "expected_compaction_revision", "replayed" ], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 64 }, "session_id": { "type": "string", "format": "uuid" }, "type": { "const": "context_compression" }, "status": { "type": "string", "enum": [ "pending", "running", "recovery_blocked", "completed", "failed" ] }, "expected_compaction_revision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "compaction_revision": { "type": ["integer", "null"], "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "outcome": { "type": ["string", "null"], "enum": ["compressed", "noop", null] }, "failure_code": { "type": ["string", "null"], "maxLength": 128 }, "replayed": { "type": "boolean" } }, "x-qwen-implementation-status": "implemented" }, "WebShellContextCompressionOperation": { "type": "object", "additionalProperties": false, "required": [ "operationId", "sessionId", "type", "status", "expectedCompactionRevision", "replayed" ], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 64 }, "sessionId": { "type": "string", "format": "uuid" }, "type": { "const": "context_compression" }, "status": { "type": "string", "enum": [ "pending", "running", "recovery_blocked", "completed", "failed" ] }, "expectedCompactionRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "compactionRevision": { "type": ["integer", "null"], "format": "int64", "minimum": 0, "maximum": 9007199254740991 }, "outcome": { "type": ["string", "null"], "enum": ["compressed", "noop", null] }, "failureCode": { "type": ["string", "null"], "maxLength": 128 }, "replayed": { "type": "boolean" } }, "x-qwen-implementation-status": "implemented" }, "ManagedMcpServerPin": { "type": "object", "additionalProperties": false, "required": ["serverId", "serverRevision", "definitionDigest"], "properties": { "serverId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "serverRevision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "definitionDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "ManagedMcpPublishedServer": { "type": "object", "additionalProperties": false, "required": [ "serverId", "serverRevision", "definitionDigest", "transport" ], "properties": { "serverId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "serverRevision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "definitionDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "transport": { "type": "string", "enum": ["stdio", "streamable-http", "sse"] } } }, "ManagedMcpManagementServer": { "type": "object", "additionalProperties": false, "required": ["serverId", "serverRevision", "definitionDigest", "state"], "properties": { "serverId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "serverRevision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "definitionDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "state": { "type": "string", "enum": ["enabled", "disabled", "removed"] } } }, "ManagedMcpManagementOperation": { "type": "object", "additionalProperties": false, "required": ["operationId", "action", "serverId", "revision", "state"], "properties": { "operationId": { "type": "string", "format": "uuid" }, "action": { "type": "string", "enum": [ "add", "edit", "remove", "enable", "disable", "reload", "restart" ] }, "serverId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "revision": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "state": { "type": "string", "enum": ["pending", "settled", "failed", "recovery_required"] }, "error": { "type": "object", "additionalProperties": false, "required": ["code"], "properties": { "code": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,127}$" } } } } }, "ManagedMcpManagementSnapshot": { "type": "object", "additionalProperties": false, "required": [ "sessionId", "revision", "supported", "availableServers", "servers" ], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 512 }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "supported": { "type": "boolean" }, "availableServers": { "type": "array", "items": { "$ref": "#/components/schemas/ManagedMcpPublishedServer" } }, "servers": { "type": "array", "description": "The selected MCP server snapshot, including retained removed entries. Only non-removed entries count toward the 32-server live capacity, and the retained snapshot is capped at 96 total entries.", "maxItems": 96, "contains": { "type": "object", "required": ["state"], "properties": { "state": { "enum": ["enabled", "disabled"] } } }, "minContains": 0, "maxContains": 32, "items": { "$ref": "#/components/schemas/ManagedMcpManagementServer" } }, "operation": { "$ref": "#/components/schemas/ManagedMcpManagementOperation" } } }, "ManagedMcpManagementCommand": { "type": "object", "additionalProperties": false, "required": ["action", "serverId", "expectedRevision"], "properties": { "action": { "type": "string", "enum": [ "add", "edit", "remove", "enable", "disable", "reload", "restart" ] }, "serverId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740990 }, "server": { "$ref": "#/components/schemas/ManagedMcpServerPin" } }, "description": "Add and edit require an exact published server pin; other actions reject server. No recipes or credentials are accepted." }, "WebShellMcpManagementQuery": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestId": { "type": "string", "maxLength": 128 } } }, "WebShellMcpManagementSubmit": { "type": "object", "additionalProperties": false, "required": [ "sessionId", "idempotencyKey", "action", "serverId", "expectedRevision" ], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "requestId": { "type": "string", "maxLength": 128 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 128 }, "action": { "type": "string", "enum": [ "add", "edit", "remove", "enable", "disable", "reload", "restart" ] }, "serverId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740990 }, "server": { "$ref": "#/components/schemas/ManagedMcpServerPin" } } }, "WebShellMcpManagementOperationQuery": { "type": "object", "additionalProperties": false, "required": ["sessionId", "operationId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "operationId": { "type": "string", "format": "uuid" }, "requestId": { "type": "string", "maxLength": 128 } } }, "SessionRecoveryActions": { "type": "object", "additionalProperties": false, "required": ["recheck", "cancel", "continueInNewSession"], "properties": { "recheck": { "type": "boolean" }, "cancel": { "type": "boolean" }, "continueInNewSession": { "type": "boolean" } } }, "SessionRecovery": { "type": "object", "additionalProperties": false, "description": "Separate from Session lifecycle and Turn outcome. ready requires affirmative native input settlement and an admissible continuation boundary with no active Java Turn or blocking debt. Actions are authorization-scoped hints, checked again by their mutations. A new-Session action opens an editable text handoff and grants no additional Workspace permission. A cold or unreadable terminal Turn may advertise a proof-checked cleanup recheck while remaining operator_required with nextTurnAllowed=false; only affirmative native evidence after that mutation can establish readiness.", "required": ["state", "reasonCode", "nextTurnAllowed", "actions"], "properties": { "state": { "type": "string", "enum": [ "recovering", "awaiting_evidence", "cleanup_pending", "ready", "operator_required" ] }, "reasonCode": { "type": "string" }, "turnId": { "type": "string", "description": "Public Turn identity; never an internal prompt, checkpoint or execution reference." }, "nextTurnAllowed": { "type": "boolean" }, "actions": { "$ref": "#/components/schemas/SessionRecoveryActions" }, "nextRecheckAt": { "type": "integer", "format": "int64", "minimum": 0, "description": "Known next reconciliation time in Unix epoch milliseconds." } } }, "RecoveryRecheckRequest": { "type": "object", "additionalProperties": false, "required": ["turnId"], "properties": { "turnId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellRecoveryRecheckRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "turnId"], "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "turnId": { "type": "string", "minLength": 1, "maxLength": 128 } } }, "WebShellLifecycleOperation": { "type": "object", "required": ["operationId", "type", "status"], "properties": { "operationId": { "type": "string", "maxLength": 64 }, "type": { "type": "string", "enum": ["close", "archive", "delete"] }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "recovery_blocked" ] }, "failureCode": { "type": ["string", "null"] } } }, "WebShellExportPage": { "type": "object", "required": ["items", "hasMore", "snapshotThroughSequence"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellItem" } }, "nextCursor": { "type": ["string", "null"] }, "hasMore": { "type": "boolean" }, "snapshotThroughSequence": { "type": "integer", "format": "int64", "minimum": 0, "description": "Fixed first-request sequence membership upper bound. Bodies and statuses are read live on every page; this does not identify a retained content version." } } }, "WebShellExportRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "cursor": { "type": ["string", "null"], "maxLength": 4096 }, "limit": { "type": ["integer", "null"], "minimum": 1, "maximum": 100, "default": 100 } } }, "TurnCommandAdmission": { "type": "object", "required": [ "session_id", "status", "replayed", "turn_id", "operation_id", "admission_stage", "delivery_state" ], "properties": { "session_id": { "type": "string", "format": "uuid" }, "turn_id": { "type": "string", "maxLength": 64, "minLength": 1 }, "status": { "type": "string" }, "replayed": { "type": "boolean" }, "operation_id": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Durable operation identifier for turn submission or cancellation." }, "admission_stage": { "type": "string", "enum": ["java_durable", "harness_confirmed"], "description": "Persisted admission stage of the operation." }, "delivery_state": { "type": "string", "enum": ["pending", "leased", "confirmed", "blocked"], "description": "Current delivery state of the operation." } }, "description": "Durable Turn input or cancellation admission. The operation identifies the saved command and remains stable across idempotent retries." }, "WebShellTurnAdmission": { "type": "object", "required": [ "sessionId", "status", "replayed", "turnId", "operationId", "admissionStage", "deliveryState" ], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "turnId": { "type": "string", "maxLength": 64, "minLength": 1 }, "status": { "type": "string" }, "replayed": { "type": "boolean" }, "operationId": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Durable operation identifier for turn submission or cancellation." }, "admissionStage": { "type": "string", "enum": ["java_durable", "harness_confirmed"], "description": "Persisted admission stage of the operation." }, "deliveryState": { "type": "string", "enum": ["pending", "leased", "confirmed", "blocked"], "description": "Current delivery state of the operation." } }, "description": "Durable Turn input or cancellation admission. The operation identifies the saved command and remains stable across idempotent retries." }, "ManagedPermissionRules": { "type": "object", "additionalProperties": false, "required": ["allow", "ask", "deny"], "properties": { "allow": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 512 } }, "ask": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 512 } }, "deny": { "type": "array", "maxItems": 32, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 512 } } }, "description": "Session-scoped portable permission-rules/1. Each rule must be trimmed, nonempty, free of control characters, and at most 512 UTF-8 bytes. At most 32 unique strings per list, 64 across all lists and 8192 UTF-8 bytes of compact JSON. Tool names and aliases match whole tools; MCP names may end with a wildcard. Bash/Shell/run_shell_command/monitor command globs and WebFetch/web_fetch(domain:host) are supported; file-path specifiers and arbitrary tool predicates are rejected. Deny takes precedence over ask, then allow, in every mode. Rules do not provide filesystem or process isolation." }, "UserMessage": { "type": "object", "required": ["id", "sequence", "revision", "state", "input"], "properties": { "id": { "type": "string" }, "sequence": { "type": "integer" }, "revision": { "type": "integer", "minimum": 1 }, "state": { "type": "string", "enum": ["queued", "claimed", "recovery_blocked"] }, "input": { "type": "array", "items": { "type": "object", "required": ["type"], "properties": { "type": { "type": "string" }, "text": { "type": "string" }, "resource": { "type": "object", "required": ["uri", "text", "mimeType"], "properties": { "uri": { "type": "string" }, "text": { "type": "string" }, "mimeType": { "type": "string" } } } } } }, "turnId": { "type": "string", "nullable": true } } }, "UserMessageSnapshot": { "type": "object", "required": ["paused", "messages"], "properties": { "paused": { "type": "boolean" }, "messages": { "type": "array", "maxItems": 32, "items": { "$ref": "#/components/schemas/UserMessage" } } } }, "UserMessageCommand": { "type": "object", "description": "submit queues input; edit only changes queued input. withdraw removes queued input or explicitly discards recovery_blocked input without replaying it. Unknown delivery may already have reached the original Turn: discarding does not undo it, preserves late durable receipts and keeps the queue paused until resume. In-flight claimed input remains immutable. Commands replay the actor-scoped recorded result before checking new-work availability.", "required": ["action"], "properties": { "action": { "type": "string", "enum": ["submit", "edit", "withdraw", "resume"] }, "messageId": { "type": "string" }, "expectedRevision": { "type": "integer", "minimum": 1 }, "input": { "type": "array", "items": { "$ref": "#/components/schemas/InputBlock" } } } }, "WebShellUserMessageQuery": { "type": "object", "required": ["sessionId"], "properties": { "sessionId": { "type": "string" } } }, "WebShellUserMessageCommand": { "type": "object", "required": ["sessionId", "idempotencyKey", "command"], "properties": { "sessionId": { "type": "string" }, "idempotencyKey": { "type": "string" }, "command": { "$ref": "#/components/schemas/UserMessageCommand" } } }, "ManagedExtensionPackagePin": { "type": "object", "additionalProperties": false, "properties": { "extensionId": { "type": "string", "pattern": "^ext_[a-f0-9-]{36}$" }, "packageRevision": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9007199254740991 }, "packageDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "settingsRevision": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9007199254740991 } }, "required": ["extensionId", "packageRevision", "packageDigest"] }, "ManagedExtensionPackageManifest": { "type": "object", "additionalProperties": false, "properties": { "schemaVersion": { "type": "integer", "enum": [1] }, "compilerVersion": { "type": "integer", "enum": [1] }, "name": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" }, "version": { "type": "string", "minLength": 1, "maxLength": 128 }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] }, "components": { "type": "array", "maxItems": 7, "uniqueItems": true, "items": { "type": "string", "enum": [ "skills", "commands", "agents", "context", "mcp", "hooks", "settings" ] } }, "sourceType": { "type": "string", "enum": [ "git", "github-release", "npm", "directory", "archive", "archive-url", "link", "snapshot" ] }, "sourceRevision": { "type": "string", "minLength": 1, "maxLength": 256, "description": "Exact source commit, resolved npm version, or imported content revision. Supplied together with sourceType." } }, "required": [ "schemaVersion", "compilerVersion", "name", "version", "target", "components" ] }, "ManagedExtensionSourceReference": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" }, "kind": { "type": "string", "enum": ["skill", "extension"] }, "resourceId": { "type": "string", "minLength": 1, "maxLength": 512 }, "revision": { "type": "string", "pattern": "^(?![Ll][Aa][Tt][Ee][Ss][Tt]$)[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "description": "Exact immutable business revision. Dynamic selectors must be resolved by the business entry point." } }, "required": ["providerId", "kind", "resourceId", "revision"] }, "ManagedExtensionSourceOrigin": { "type": "object", "additionalProperties": false, "properties": { "reference": { "$ref": "#/components/schemas/ManagedExtensionSourceReference" }, "sourceDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$", "description": "SHA-256 of the actual raw archive bytes, distinct from packageDigest." }, "requestDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["reference", "sourceDigest", "requestDigest"] }, "ManagedExtensionSourceImport": { "type": "object", "additionalProperties": false, "properties": { "reference": { "$ref": "#/components/schemas/ManagedExtensionSourceReference" }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] } }, "required": ["reference", "target"] }, "ManagedExtensionSourceImportResult": { "type": "object", "additionalProperties": false, "properties": { "operationId": { "type": "string", "maxLength": 128 }, "state": { "type": "string", "enum": ["pending", "settled"] }, "reference": { "$ref": "#/components/schemas/ManagedExtensionSourceReference" }, "operation": { "$ref": "#/components/schemas/ManagedExtensionPackageOperation" }, "source": { "$ref": "#/components/schemas/ManagedExtensionSourceOrigin" }, "pin": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" } }, "required": ["operationId", "state", "reference"] }, "ManagedExtensionPackage": { "type": "object", "additionalProperties": false, "properties": { "pin": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" }, "manifest": { "$ref": "#/components/schemas/ManagedExtensionPackageManifest" }, "byteLength": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 104857600 }, "source": { "$ref": "#/components/schemas/ManagedExtensionSourceOrigin" } }, "required": ["pin", "manifest", "byteLength"] }, "ManagedExtensionPackageCatalog": { "type": "object", "additionalProperties": false, "properties": { "supported": { "type": "boolean" }, "extensions": { "type": "array", "maxItems": 256, "items": { "$ref": "#/components/schemas/ManagedExtensionPackage" } }, "selfService": { "type": "object", "additionalProperties": false, "properties": { "supported": { "type": "boolean" }, "canPublish": { "type": "boolean" } }, "required": ["supported", "canPublish"] } }, "required": ["supported", "extensions"] }, "ManagedExtensionPackageSettings": { "type": "object", "additionalProperties": false, "properties": { "settingsRevision": { "type": "integer", "format": "int64", "minimum": 0 }, "configuredKeys": { "type": "array", "maxItems": 128, "items": { "type": "string" } } }, "required": ["settingsRevision", "configuredKeys"] }, "ManagedExtensionPackageSettingsCommand": { "type": "object", "additionalProperties": false, "properties": { "expectedRevision": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9007199254740990 }, "values": { "type": "object", "maxProperties": 128, "additionalProperties": { "type": "string" }, "description": "Complete settings revision, bounded to 8 KiB UTF-8 JSON. Values are encrypted at rest and never returned by metadata or operation queries." } }, "required": ["expectedRevision", "values"] }, "ManagedExtensionPackageOperation": { "type": "object", "additionalProperties": false, "properties": { "operationId": { "type": "string" }, "extensionId": { "type": "string" }, "kind": { "type": "string", "enum": ["publish", "settings"] }, "state": { "type": "string", "enum": ["pending", "settled"] }, "revision": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9007199254740991 }, "packageDigest": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" } }, "required": [ "operationId", "extensionId", "kind", "state", "revision", "packageDigest" ] }, "WebShellExtensionWorkspaceQuery": { "type": "object", "additionalProperties": false, "required": ["workspaceId"], "properties": { "workspaceId": { "type": "string" } } }, "WebShellExtensionQuery": { "type": "object", "additionalProperties": false, "required": ["workspaceId", "extensionId"], "properties": { "workspaceId": { "type": "string" }, "extensionId": { "type": "string" } } }, "WebShellExtensionOperationQuery": { "type": "object", "additionalProperties": false, "required": ["workspaceId", "operationId"], "properties": { "workspaceId": { "type": "string" }, "operationId": { "type": "string" } } }, "WebShellExtensionPackageQuery": { "type": "object", "additionalProperties": false, "required": ["workspaceId", "pin"], "properties": { "workspaceId": { "type": "string" }, "pin": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" } } }, "WebShellExtensionSettingsSubmit": { "type": "object", "additionalProperties": false, "required": [ "workspaceId", "extensionId", "idempotencyKey", "expectedRevision", "values" ], "properties": { "workspaceId": { "type": "string" }, "extensionId": { "type": "string" }, "idempotencyKey": { "type": "string" }, "expectedRevision": { "type": "integer", "format": "int64", "minimum": 0 }, "values": { "type": "object", "maxProperties": 128, "additionalProperties": { "type": "string" }, "description": "Complete settings revision, bounded to 8 KiB UTF-8 JSON. Values are encrypted at rest and never returned by metadata or operation queries." } } }, "ManagedExtensionApplySelection": { "type": "object", "additionalProperties": false, "required": ["expectedConfigRevision", "extensions"], "properties": { "expectedConfigRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "extensions": { "type": "array", "maxItems": 32, "items": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" } } } }, "ManagedExtensionApplyOperation": { "type": "object", "additionalProperties": false, "required": ["operationId", "state", "mode", "revision"], "properties": { "operationId": { "type": "string", "format": "uuid" }, "state": { "type": "string", "enum": [ "preparing", "prepared", "committed", "active", "recovery_required", "failed" ] }, "mode": { "type": "string", "enum": ["apply", "recoverPrevious"] }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "error": { "type": "object", "additionalProperties": false, "required": ["code"], "properties": { "code": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,127}$" } } } } }, "ManagedExtensionManagementSnapshot": { "type": "object", "additionalProperties": false, "required": [ "sessionId", "supported", "revision", "extensions", "requestedExtensions" ], "properties": { "sessionId": { "type": "string" }, "supported": { "type": "boolean" }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "extensions": { "type": "array", "maxItems": 32, "items": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" } }, "requestedExtensions": { "type": "array", "maxItems": 32, "items": { "$ref": "#/components/schemas/ManagedExtensionPackagePin" } }, "operation": { "$ref": "#/components/schemas/ManagedExtensionApplyOperation" }, "selfService": { "type": "object", "additionalProperties": false, "properties": { "supported": { "type": "boolean" }, "canApply": { "type": "boolean" }, "runtimeSkillImportSupported": { "type": "boolean" } }, "required": ["supported", "canApply"] } } }, "WebShellExtensionSessionQuery": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "maxLength": 128 }, "operationId": { "type": "string", "format": "uuid" } } }, "WebShellExtensionSessionOperation": { "type": "object", "additionalProperties": false, "required": ["sessionId", "operationId"], "properties": { "sessionId": { "type": "string", "maxLength": 128 }, "operationId": { "type": "string", "format": "uuid" } } }, "WebShellExtensionSessionSubmit": { "type": "object", "additionalProperties": false, "required": ["sessionId", "idempotencyKey", "command"], "properties": { "sessionId": { "type": "string", "maxLength": 128 }, "idempotencyKey": { "type": "string", "maxLength": 128 }, "command": { "$ref": "#/components/schemas/ManagedExtensionApplySelection" } } }, "WebShellWorkspaceFileUploadResult": { "type": "object", "additionalProperties": false, "required": [ "scopeRevision", "uploadId", "path", "sizeBytes", "sha256" ], "properties": { "scopeRevision": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "uploadId": { "type": "string", "format": "uuid" }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "sizeBytes": { "type": "integer", "minimum": 0, "maximum": 8388608 }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } }, "WebShellWorkspaceFileUploadStatus": { "type": "object", "additionalProperties": false, "required": [ "scopeRevision", "uploadId", "path", "sizeBytes", "sha256", "state" ], "properties": { "scopeRevision": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "uploadId": { "type": "string", "format": "uuid" }, "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "sizeBytes": { "type": "integer", "minimum": 0, "maximum": 8388608 }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "state": { "type": "string", "enum": ["completed", "failed", "pending"] }, "code": { "type": "string" } } }, "WebShellWorkspaceFileUploadQueryRequest": { "type": "object", "additionalProperties": false, "required": ["uploadId"], "properties": { "uploadId": { "type": "string", "format": "uuid" } } }, "SessionWorktree": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "session_id": { "type": "string" }, "workspace_id": { "type": "string" }, "branch": { "type": "string" }, "base_commit": { "type": "string" }, "cwd_relative": { "type": "string" }, "operation_id": { "type": "string" }, "state": { "type": "string", "enum": [ "preparing", "ready", "failed", "blocked", "removing", "removed" ] }, "revision": { "type": "integer", "minimum": 1 }, "error_code": { "type": ["string", "null"] } }, "required": [ "id", "session_id", "workspace_id", "branch", "base_commit", "cwd_relative", "operation_id", "state", "revision" ] }, "WebShellSessionWorktree": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "sessionId": { "type": "string" }, "workspaceId": { "type": "string" }, "branch": { "type": "string" }, "baseCommit": { "type": "string" }, "cwdRelative": { "type": "string" }, "operationId": { "type": "string" }, "state": { "type": "string", "enum": [ "preparing", "ready", "failed", "blocked", "removing", "removed" ] }, "revision": { "type": "integer", "minimum": 1 }, "errorCode": { "type": ["string", "null"] } }, "required": [ "id", "sessionId", "workspaceId", "branch", "baseCommit", "cwdRelative", "operationId", "state", "revision" ] }, "WebShellSessionWorktreeOptions": { "type": "object", "additionalProperties": false, "properties": { "supported": { "type": "boolean" }, "reason": { "type": ["string", "null"] }, "baseCommit": { "type": ["string", "null"] }, "currentBranch": { "type": ["string", "null"], "description": "Source checkout branch independent of base ref; HEAD when detached, null when unavailable." }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["supported", "branches"] }, "SessionWorktreeOptions": { "type": "object", "additionalProperties": false, "properties": { "supported": { "type": "boolean" }, "reason": { "type": ["string", "null"] }, "base_commit": { "type": ["string", "null"] }, "current_branch": { "type": ["string", "null"], "description": "Source checkout branch independent of base ref; HEAD when detached, null when unavailable." }, "branches": { "type": "array", "items": { "type": "string" } } }, "required": ["supported", "branches"] }, "WebShellSessionWorktreePage": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellSessionWorktree" } } }, "required": ["data"] }, "WebShellSessionWorktreeInspection": { "type": "object", "additionalProperties": false, "properties": { "worktree": { "$ref": "#/components/schemas/WebShellSessionWorktree" }, "canCleanup": { "type": "boolean" }, "cleanupBlocker": { "type": ["string", "null"] } }, "required": ["worktree", "canCleanup"] }, "SessionWorktreePage": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SessionWorktree" } } }, "required": ["data"] }, "SessionWorktreeInspection": { "type": "object", "additionalProperties": false, "properties": { "worktree": { "$ref": "#/components/schemas/SessionWorktree" }, "can_cleanup": { "type": "boolean" }, "cleanup_blocker": { "type": ["string", "null"] } }, "required": ["worktree", "can_cleanup"] }, "WebShellSessionWorktreeOptionsRequest": { "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "type": "string" }, "cwdRelative": { "type": "string" }, "baseRef": { "type": "string" } }, "required": ["workspaceId", "cwdRelative"] }, "WebShellSessionWorktreeQueryRequest": { "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "type": "string" } }, "required": ["workspaceId"] }, "WebShellSessionWorktreeInspectRequest": { "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "type": "string" }, "worktreeId": { "type": "string" } }, "required": ["workspaceId", "worktreeId"] }, "WebShellSessionWorktreeCleanupRequest": { "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "type": "string" }, "worktreeId": { "type": "string" }, "idempotencyKey": { "type": "string" } }, "required": ["workspaceId", "worktreeId", "idempotencyKey"] }, "MemoryStore": { "type": "object", "additionalProperties": false, "required": ["id", "created_at"], "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 128 }, "created_at": { "type": "integer", "format": "int64", "minimum": 0 } }, "description": "One personal MemoryStore per authenticated tenant and actor. Provider credentials and namespace are not exposed." }, "MemoryStoreList": { "type": "object", "additionalProperties": false, "required": ["data"], "properties": { "data": { "type": "array", "maxItems": 1, "items": { "$ref": "#/components/schemas/MemoryStore" } } } }, "ManagedModelStatisticsBucket": { "type": "object", "additionalProperties": false, "required": [ "requests", "tokens", "usageKnown", "latencyMs", "timing", "failures", "backoffRetries" ], "properties": { "requests": { "type": "object", "additionalProperties": false, "required": [ "total", "success", "error", "cancelled", "interrupted" ], "properties": { "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "success": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "error": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cancelled": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "interrupted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "tokens": { "type": "object", "additionalProperties": false, "required": ["prompt", "candidates", "total", "cached", "thoughts"], "properties": { "prompt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "candidates": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cached": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughts": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "usageKnown": { "type": "object", "additionalProperties": false, "required": ["prompt", "candidates", "total", "cached", "thoughts"], "properties": { "prompt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "candidates": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cached": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "thoughts": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "latencyMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timing": { "type": "object", "additionalProperties": false, "required": [ "ttftCount", "totalTtftMs", "generationCount", "totalGenerationMs", "throughputOutputTokens" ], "properties": { "ttftCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalTtftMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "generationCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "totalGenerationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "throughputOutputTokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "failures": { "type": "object", "additionalProperties": false, "required": ["http", "transport", "timeout", "other"], "properties": { "http": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "transport": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timeout": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "other": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "backoffRetries": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "ManagedModelStatisticsSnapshot": { "type": "object", "additionalProperties": false, "required": [ "version", "snapshotRevision", "observedAt", "coverage", "totals", "sources", "models", "overflow", "recent", "modelBreakdownOmitted", "samplesTruncated" ], "properties": { "version": { "type": "integer", "const": 1 }, "snapshotRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "observedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "coverage": { "type": "object", "additionalProperties": false, "required": ["gaps"], "properties": { "gaps": { "type": "array", "items": { "type": "string" } } } }, "totals": { "$ref": "#/components/schemas/ManagedModelStatisticsBucket" }, "sources": { "type": "object", "additionalProperties": false, "required": ["main", "hook", "compression"], "properties": { "main": { "$ref": "#/components/schemas/ManagedModelStatisticsBucket" }, "hook": { "$ref": "#/components/schemas/ManagedModelStatisticsBucket" }, "compression": { "$ref": "#/components/schemas/ManagedModelStatisticsBucket" } } }, "models": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["key", "name", "nameTruncated", "metrics"], "properties": { "key": { "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "nameTruncated": { "type": "boolean" }, "metrics": { "$ref": "#/components/schemas/ManagedModelStatisticsBucket" } } }, "maxItems": 16 }, "overflow": { "$ref": "#/components/schemas/ManagedModelStatisticsBucket" }, "recent": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "executionId", "source", "modelKey", "at", "outcome", "durationMs", "ttftMs", "generationMs", "outputTokens", "failureKind", "statusCode", "backoffRetryOrdinal" ], "properties": { "executionId": { "type": "string" }, "source": { "type": "string", "enum": ["main", "hook", "compression"] }, "modelKey": { "type": "string" }, "at": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "outcome": { "type": "string", "enum": ["success", "error", "cancelled", "interrupted"] }, "durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "ttftMs": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "generationMs": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "outputTokens": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "failureKind": { "anyOf": [ { "type": "string", "enum": ["http", "transport", "timeout", "other"] }, { "type": "null" } ] }, "statusCode": { "anyOf": [ { "type": "integer", "minimum": 100, "maximum": 599 }, { "type": "null" } ] }, "backoffRetryOrdinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "maxItems": 20 }, "modelBreakdownOmitted": { "type": "boolean" }, "samplesTruncated": { "type": "boolean" } } }, "ManagedContextUsageSnapshot": { "type": "object", "additionalProperties": false, "required": [ "version", "attemptId", "turnId", "model", "observedAt", "inputTokens", "cachedTokens", "contextWindowSize", "breakdown", "thresholds", "details", "attributionComplete", "detailsTruncated" ], "properties": { "version": { "type": "integer", "const": 1 }, "attemptId": { "type": "string" }, "turnId": { "type": "string" }, "model": { "type": "string" }, "observedAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "inputTokens": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "cachedTokens": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "contextWindowSize": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, { "type": "null" } ] }, "breakdown": { "type": "object", "additionalProperties": false, "required": [ "systemPrompt", "builtinTools", "mcpTools", "instructionFiles", "memoryFiles", "skills", "startupContext", "messages" ], "properties": { "systemPrompt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "builtinTools": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "mcpTools": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "instructionFiles": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "memoryFiles": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "skills": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "startupContext": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "messages": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "thresholds": { "anyOf": [ { "type": "object", "additionalProperties": false, "required": ["warn", "auto", "hard"], "properties": { "warn": { "type": "number", "minimum": 0 }, "auto": { "type": "number", "minimum": 0 }, "hard": { "type": "number", "minimum": 0 } } }, { "type": "null" } ] }, "details": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["category", "name", "tokens"], "properties": { "category": { "type": "string", "enum": [ "systemPrompt", "builtinTools", "mcpTools", "instructionFiles", "memoryFiles", "skills", "startupContext", "messages" ] }, "name": { "type": "string" }, "tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "maxItems": 32 }, "attributionComplete": { "type": "boolean" }, "detailsTruncated": { "type": "boolean" } } }, "ManagedDiagnosticContextUsage": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "readRevision", "availability", "coverageReasons", "sourceSequence", "stale", "staleReasons", "estimated", "context" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "sourceSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "stale": { "type": "boolean" }, "staleReasons": { "type": "array", "items": { "type": "string" } }, "estimated": { "type": "boolean", "const": true }, "context": { "anyOf": [ { "$ref": "#/components/schemas/ManagedContextUsageSnapshot" }, { "type": "null" } ] } } }, "ManagedDiagnosticStats": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "readRevision", "availability", "coverageReasons", "sourceSequence", "statistics" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "sourceSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statistics": { "anyOf": [ { "$ref": "#/components/schemas/ManagedModelStatisticsSnapshot" }, { "type": "null" } ] } } }, "ManagedDiagnosticSkill": { "type": "object", "additionalProperties": false, "required": [ "name", "description", "kind", "origin", "extensionId", "modelInvocable", "userInvocable" ], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "kind": { "type": "string", "enum": ["skill", "command"] }, "origin": { "type": "string", "enum": ["base", "extension"] }, "extensionId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "modelInvocable": { "type": "boolean" }, "userInvocable": { "type": "boolean" } } }, "ManagedDiagnosticMcpServer": { "type": "object", "additionalProperties": false, "required": [ "serverId", "serverRevision", "origin", "extensionId", "selectionState", "liveState", "catalogRevision", "catalogServerRevision", "attemptRevision", "attemptServerRevision", "lastAttemptState", "lastExecutionState", "releaseState", "historical", "discovery", "tools", "resources", "prompts" ], "properties": { "serverId": { "type": "string" }, "serverRevision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "origin": { "type": "string", "enum": ["base", "extension", "independent"] }, "extensionId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "selectionState": { "type": "string", "enum": ["enabled", "disabled", "removed", "unknown"] }, "liveState": { "type": "string", "const": "unknown" }, "catalogRevision": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "catalogServerRevision": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "attemptRevision": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "attemptServerRevision": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "lastAttemptState": { "type": ["string", "null"], "description": "Last persisted configuration attempt state, distinct from physical execution evidence." }, "lastExecutionState": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "releaseState": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "historical": { "type": "boolean" }, "discovery": { "type": "object", "additionalProperties": false, "required": ["tools", "resources", "prompts"], "properties": { "tools": { "type": "string", "enum": ["complete", "partial", "failed", "stale", "unknown"] }, "resources": { "type": "string", "enum": ["complete", "partial", "failed", "stale", "unknown"] }, "prompts": { "type": "string", "enum": ["complete", "partial", "failed", "stale", "unknown"] } } }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "uri": { "type": "string" }, "mimeType": { "type": "string" } } } }, "resources": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "uri": { "type": "string" }, "mimeType": { "type": "string" } } } }, "prompts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "uri": { "type": "string" }, "mimeType": { "type": "string" } } } } } }, "ManagedDiagnosticResources": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "readRevision", "availability", "coverageReasons", "configCoverage", "historyCoverage", "activeConfigRevision", "activeOperationPhase", "outputTruncated", "skills", "servers" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "configCoverage": { "type": "string", "enum": ["complete", "partial"] }, "historyCoverage": { "type": "string", "enum": ["complete", "partial"] }, "activeConfigRevision": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "activeOperationPhase": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "outputTruncated": { "type": "boolean" }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/ManagedDiagnosticSkill" } }, "servers": { "type": "array", "items": { "$ref": "#/components/schemas/ManagedDiagnosticMcpServer" } } } }, "ManagedDiagnosticAgentInvocation": { "type": "object", "additionalProperties": false, "required": [ "taskId", "parentSessionId", "childSessionId", "description", "state", "runtimeState", "createdAt", "startedAt", "settledAt" ], "properties": { "taskId": { "type": "string" }, "parentSessionId": { "type": "string" }, "childSessionId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "state": { "type": "string" }, "runtimeState": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "startedAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "settledAt": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "predecessorTaskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, "ManagedDiagnosticAgentTrace": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "readRevision", "availability", "coverageReasons", "scope", "items", "nextCursor", "hasMore" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "scope": { "type": "string", "const": "direct-invocations" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ManagedDiagnosticAgentInvocation" } }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "hasMore": { "type": "boolean" } } }, "WebShellDiagnosticTraceRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "cursor": { "anyOf": [ { "type": "string", "maxLength": 256 }, { "type": "null" } ] }, "limit": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, { "type": "null" } ] } } }, "ManagedActivityMetrics": { "type": "object", "additionalProperties": false, "required": ["requested", "admission", "execution", "delivery"], "properties": { "requested": { "type": "integer", "minimum": 0 }, "admission": { "type": "object", "additionalProperties": false, "required": ["allowed", "denied", "invalid", "unknown"], "properties": { "allowed": { "type": "integer", "minimum": 0 }, "denied": { "type": "integer", "minimum": 0 }, "invalid": { "type": "integer", "minimum": 0 }, "unknown": { "type": "integer", "minimum": 0 } } }, "execution": { "type": "object", "additionalProperties": false, "required": [ "not_started", "running", "success", "error", "cancelled", "unknown" ], "properties": { "not_started": { "type": "integer", "minimum": 0 }, "running": { "type": "integer", "minimum": 0 }, "success": { "type": "integer", "minimum": 0 }, "error": { "type": "integer", "minimum": 0 }, "cancelled": { "type": "integer", "minimum": 0 }, "unknown": { "type": "integer", "minimum": 0 } } }, "delivery": { "type": "object", "additionalProperties": false, "required": [ "pending", "complete", "partial", "unavailable", "unknown" ], "properties": { "pending": { "type": "integer", "minimum": 0 }, "complete": { "type": "integer", "minimum": 0 }, "partial": { "type": "integer", "minimum": 0 }, "unavailable": { "type": "integer", "minimum": 0 }, "unknown": { "type": "integer", "minimum": 0 } } }, "measurements": { "$ref": "#/components/schemas/ManagedActivityMeasurementTotals" } } }, "ManagedActivityFile": { "type": "object", "additionalProperties": false, "required": ["operation", "path", "cwdRelative"], "properties": { "operation": { "type": "string", "enum": ["read", "write", "edit"] }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cwdRelative": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, "ManagedActivitySkill": { "type": "object", "additionalProperties": false, "required": ["resourceKind", "name", "pin", "origin", "delivery"], "properties": { "resourceKind": { "type": "string", "enum": ["skill", "extension_command"] }, "name": { "type": "string" }, "pin": { "type": "string" }, "origin": { "type": "string", "enum": ["user", "model", "unknown"] }, "delivery": { "type": "string", "enum": ["complete", "partial", "unknown"] } } }, "ManagedActivityInvocation": { "type": "object", "additionalProperties": false, "required": [ "invocationId", "assistantMessageId", "ordinal", "toolName", "functionCallId", "providerCallId", "executionCallId", "taskId", "toolKind", "serverId", "admission", "execution", "delivery", "capture", "file", "skill", "requestSequence", "requestedAt" ], "properties": { "invocationId": { "type": "string" }, "assistantMessageId": { "type": "string" }, "ordinal": { "type": "integer", "minimum": 0 }, "toolName": { "type": "string" }, "functionCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "providerCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "executionCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "toolKind": { "type": "string", "enum": ["builtin", "mcp", "hosted", "unknown"] }, "serverId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "admission": { "type": "string", "enum": ["allowed", "denied", "invalid", "unknown"] }, "execution": { "type": "string", "enum": [ "not_started", "running", "success", "error", "cancelled", "unknown" ] }, "delivery": { "type": "string", "enum": ["pending", "complete", "partial", "unavailable", "unknown"] }, "capture": { "type": "string", "enum": ["complete", "partial", "unavailable", "unknown"] }, "file": { "anyOf": [ { "$ref": "#/components/schemas/ManagedActivityFile" }, { "type": "null" } ] }, "skill": { "anyOf": [ { "$ref": "#/components/schemas/ManagedActivitySkill" }, { "type": "null" } ] }, "requestSequence": { "type": "string" }, "requestedAt": { "type": "integer", "minimum": 0 }, "conflictingEvidence": { "type": "boolean" }, "taskState": { "type": "string" }, "taskRuntimeState": { "type": ["string", "null"] }, "measurements": { "$ref": "#/components/schemas/ManagedActivityMeasurement" } } }, "ManagedActivityStatistics": { "type": "object", "additionalProperties": false, "required": [ "tools", "files", "skills", "otherTools", "otherSkills", "toolBuckets", "skillBuckets", "skillLoads", "extensionCommands", "fileOperations" ], "properties": { "tools": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "files": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "skills": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "otherTools": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "otherSkills": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "toolBuckets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["key", "name", "metrics"], "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "metrics": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "resource": { "type": "object", "additionalProperties": false, "required": ["resourceKind", "name", "pin"], "properties": { "resourceKind": { "type": "string", "enum": ["skill", "extension_command"] }, "name": { "type": "string" }, "pin": { "type": "string" } } } } } }, "skillBuckets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["key", "name", "metrics"], "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "metrics": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "resource": { "type": "object", "additionalProperties": false, "required": ["resourceKind", "name", "pin"], "properties": { "resourceKind": { "type": "string", "enum": ["skill", "extension_command"] }, "name": { "type": "string" }, "pin": { "type": "string" } } } } } }, "skillLoads": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "extensionCommands": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "fileOperations": { "type": "object", "additionalProperties": false, "required": ["read", "write", "edit"], "properties": { "read": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "write": { "$ref": "#/components/schemas/ManagedActivityMetrics" }, "edit": { "$ref": "#/components/schemas/ManagedActivityMetrics" } } }, "measurementStartSequence": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 } } }, "ManagedDiagnosticActivityStats": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "scope", "readRevision", "coverageStartSequence", "coveredThroughSequence", "startedAt", "availability", "coverageReasons", "statistics" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "scope": { "type": "string", "const": "self" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coverageStartSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coveredThroughSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startedAt": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "statistics": { "anyOf": [ { "$ref": "#/components/schemas/ManagedActivityStatistics" }, { "type": "null" } ] } } }, "ManagedActivityToolsPage": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "scope", "readRevision", "coverageStartSequence", "coveredThroughSequence", "startedAt", "availability", "coverageReasons", "kind", "items", "hasMore", "nextCursor" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "scope": { "type": "string", "const": "self" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coverageStartSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coveredThroughSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startedAt": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "kind": { "type": "string", "const": "tools" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ManagedActivityInvocation" } }, "hasMore": { "type": "boolean" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, "ManagedActivityFilesPage": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "scope", "readRevision", "coverageStartSequence", "coveredThroughSequence", "startedAt", "availability", "coverageReasons", "kind", "items", "hasMore", "nextCursor" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "scope": { "type": "string", "const": "self" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coverageStartSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coveredThroughSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startedAt": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "kind": { "type": "string", "const": "files" }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "invocationId", "assistantMessageId", "ordinal", "toolName", "functionCallId", "providerCallId", "executionCallId", "taskId", "toolKind", "serverId", "admission", "execution", "delivery", "capture", "file", "skill", "requestSequence", "requestedAt" ], "properties": { "invocationId": { "type": "string" }, "assistantMessageId": { "type": "string" }, "ordinal": { "type": "integer", "minimum": 0 }, "toolName": { "type": "string" }, "functionCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "providerCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "executionCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "toolKind": { "type": "string", "enum": ["builtin", "mcp", "hosted", "unknown"] }, "serverId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "admission": { "type": "string", "enum": ["allowed", "denied", "invalid", "unknown"] }, "execution": { "type": "string", "enum": [ "not_started", "running", "success", "error", "cancelled", "unknown" ] }, "delivery": { "type": "string", "enum": [ "pending", "complete", "partial", "unavailable", "unknown" ] }, "capture": { "type": "string", "enum": ["complete", "partial", "unavailable", "unknown"] }, "file": { "$ref": "#/components/schemas/ManagedActivityFile" }, "skill": { "anyOf": [ { "$ref": "#/components/schemas/ManagedActivitySkill" }, { "type": "null" } ] }, "requestSequence": { "type": "string" }, "requestedAt": { "type": "integer", "minimum": 0 }, "conflictingEvidence": { "type": "boolean" }, "taskState": { "type": "string" }, "taskRuntimeState": { "type": ["string", "null"] }, "measurements": { "$ref": "#/components/schemas/ManagedActivityMeasurement" } } } }, "hasMore": { "type": "boolean" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, "ManagedActivitySkillsPage": { "type": "object", "additionalProperties": false, "required": [ "schemaVersion", "sessionId", "scope", "readRevision", "coverageStartSequence", "coveredThroughSequence", "startedAt", "availability", "coverageReasons", "kind", "items", "hasMore", "nextCursor" ], "properties": { "schemaVersion": { "type": "integer", "const": 1 }, "sessionId": { "type": "string" }, "scope": { "type": "string", "const": "self" }, "readRevision": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coverageStartSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coveredThroughSequence": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startedAt": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "coverageReasons": { "type": "array", "items": { "type": "string" } }, "kind": { "type": "string", "const": "skills" }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "invocationId", "assistantMessageId", "ordinal", "toolName", "functionCallId", "providerCallId", "executionCallId", "taskId", "toolKind", "serverId", "admission", "execution", "delivery", "capture", "file", "skill", "requestSequence", "requestedAt" ], "properties": { "invocationId": { "type": "string" }, "assistantMessageId": { "type": "string" }, "ordinal": { "type": "integer", "minimum": 0 }, "toolName": { "type": "string" }, "functionCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "providerCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "executionCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "toolKind": { "type": "string", "enum": ["builtin", "mcp", "hosted", "unknown"] }, "serverId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "admission": { "type": "string", "enum": ["allowed", "denied", "invalid", "unknown"] }, "execution": { "type": "string", "enum": [ "not_started", "running", "success", "error", "cancelled", "unknown" ] }, "delivery": { "type": "string", "enum": [ "pending", "complete", "partial", "unavailable", "unknown" ] }, "capture": { "type": "string", "enum": ["complete", "partial", "unavailable", "unknown"] }, "file": { "anyOf": [ { "$ref": "#/components/schemas/ManagedActivityFile" }, { "type": "null" } ] }, "skill": { "$ref": "#/components/schemas/ManagedActivitySkill" }, "requestSequence": { "type": "string" }, "requestedAt": { "type": "integer", "minimum": 0 }, "conflictingEvidence": { "type": "boolean" }, "taskState": { "type": "string" }, "taskRuntimeState": { "type": ["string", "null"] }, "measurements": { "$ref": "#/components/schemas/ManagedActivityMeasurement" } } } }, "hasMore": { "type": "boolean" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, "WebShellActivityQueryRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "kind"], "properties": { "sessionId": { "type": "string", "format": "uuid" }, "kind": { "type": "string", "enum": ["tools", "files", "skills"] }, "cursor": { "type": "string", "maxLength": 512 }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 } } }, "ManagedDiagnosticActivityPage": { "oneOf": [ { "$ref": "#/components/schemas/ManagedActivityToolsPage" }, { "$ref": "#/components/schemas/ManagedActivityFilesPage" }, { "$ref": "#/components/schemas/ManagedActivitySkillsPage" } ] }, "ManagedExtensionImportMetadata": { "type": "object", "additionalProperties": false, "properties": { "sourceKind": { "type": "string", "enum": ["skill", "extension", "mcp"] }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] }, "sourceDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "compilerVersion": { "type": "integer", "enum": [1] }, "packageName": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" } }, "required": ["sourceKind", "target", "sourceDigest", "compilerVersion"] }, "ManagedExtensionPackageInspection": { "type": "object", "additionalProperties": false, "properties": { "manifest": { "$ref": "#/components/schemas/ManagedExtensionPackageManifest" }, "fileCount": { "type": "integer", "minimum": 0, "maximum": 100000 }, "files": { "type": "array", "maxItems": 256, "items": { "type": "string" } }, "truncated": { "type": "boolean" }, "skills": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name", "description"] } }, "mcpServers": { "type": "array", "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "recipe": { "type": "object", "additionalProperties": true }, "redacted": { "type": "boolean" } }, "required": ["name", "recipe", "redacted"] } }, "settings": { "type": "array", "maxItems": 128, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "envVar": { "type": "string" }, "sensitive": { "type": "boolean" } }, "required": ["name", "envVar"] } } }, "required": [ "manifest", "fileCount", "files", "truncated", "skills", "mcpServers", "settings" ] }, "ManagedExtensionOperationLookup": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": ["publish", "settings", "source-import"] }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": ["kind", "idempotencyKey"] }, "WebShellExtensionOperationLookup": { "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "type": "string", "minLength": 1, "maxLength": 512 }, "kind": { "type": "string", "enum": ["publish", "settings"] }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": ["workspaceId", "kind", "idempotencyKey"] }, "ManagedExtensionApplyLookup": { "type": "object", "additionalProperties": false, "properties": { "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": ["idempotencyKey"] }, "WebShellExtensionApplyLookup": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 512 }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": ["sessionId", "idempotencyKey"] }, "ManagedRuntimeSkillOwner": { "type": "object", "additionalProperties": false, "properties": { "bindingId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "generation": { "type": "string", "pattern": "^[1-9][0-9]{0,15}$" } }, "required": ["bindingId", "generation"] }, "ManagedRuntimeSkillCandidate": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "path": { "type": "string" }, "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "shadowed": { "type": "boolean" }, "compatible": { "type": "boolean" }, "error": { "type": "string" } }, "required": [ "name", "description", "path", "digest", "shadowed", "compatible" ] }, "ManagedRuntimeSkillCandidates": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "format": "uuid" }, "owner": { "$ref": "#/components/schemas/ManagedRuntimeSkillOwner" }, "candidates": { "type": "array", "maxItems": 256, "items": { "$ref": "#/components/schemas/ManagedRuntimeSkillCandidate" } } }, "required": ["sessionId", "owner", "candidates"] }, "ManagedRuntimeSkillSnapshotRequest": { "type": "object", "additionalProperties": false, "properties": { "owner": { "$ref": "#/components/schemas/ManagedRuntimeSkillOwner" }, "path": { "type": "string" }, "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] } }, "required": ["owner", "path", "digest", "target"] }, "ManagedRuntimeSkillImportRequest": { "type": "object", "additionalProperties": false, "properties": { "owner": { "$ref": "#/components/schemas/ManagedRuntimeSkillOwner" }, "operationId": { "type": "string", "format": "uuid" }, "preparationId": { "type": "string", "format": "uuid" }, "sourceDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "byteLength": { "type": "integer", "minimum": 1, "maximum": 104857600 }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] }, "extensionId": { "type": "string", "pattern": "^ext_[a-f0-9-]{36}$" } }, "required": [ "owner", "operationId", "preparationId", "sourceDigest", "byteLength", "target" ] }, "ManagedRuntimeSkillSnapshot": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "format": "uuid" }, "owner": { "$ref": "#/components/schemas/ManagedRuntimeSkillOwner" }, "operationId": { "type": "string", "format": "uuid" }, "preparationId": { "type": "string", "format": "uuid" }, "sourceDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "byteLength": { "type": "integer", "minimum": 1, "maximum": 104857600 }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] }, "inspection": { "$ref": "#/components/schemas/ManagedExtensionPackageInspection" } }, "required": [ "sessionId", "owner", "operationId", "preparationId", "sourceDigest", "byteLength", "target", "inspection" ] }, "WebShellRuntimeSkillQuery": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "format": "uuid" } }, "required": ["sessionId"] }, "WebShellRuntimeSkillSnapshotRequest": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "format": "uuid" }, "owner": { "$ref": "#/components/schemas/ManagedRuntimeSkillOwner" }, "path": { "type": "string" }, "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] } }, "required": ["sessionId", "owner", "path", "digest", "target"] }, "WebShellRuntimeSkillImportRequest": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "format": "uuid" }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 512 }, "owner": { "$ref": "#/components/schemas/ManagedRuntimeSkillOwner" }, "operationId": { "type": "string", "format": "uuid" }, "preparationId": { "type": "string", "format": "uuid" }, "sourceDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "byteLength": { "type": "integer", "minimum": 1, "maximum": 104857600 }, "target": { "type": "object", "additionalProperties": false, "properties": { "platform": { "type": "string", "enum": ["linux", "darwin"] }, "arch": { "type": "string", "enum": ["x64", "arm64", "any"] } }, "required": ["platform", "arch"] }, "extensionId": { "type": "string", "pattern": "^ext_[a-f0-9-]{36}$" } }, "required": [ "sessionId", "idempotencyKey", "owner", "operationId", "preparationId", "sourceDigest", "byteLength", "target" ] }, "ManagedActivityMeasurement": { "type": "object", "additionalProperties": false, "required": [ "sourceSequence", "availability", "executionDurationMs", "file" ], "properties": { "sourceSequence": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "availability": { "type": "string", "enum": ["available", "partial", "unsupported"] }, "executionDurationMs": { "anyOf": [ { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, { "type": "null" } ] }, "file": { "anyOf": [ { "type": "object", "additionalProperties": false, "required": [ "operation", "status", "modelLinesAdded", "modelLinesRemoved", "appliedLinesAdded", "appliedLinesRemoved" ], "properties": { "operation": { "type": "string", "enum": ["read", "write", "edit"] }, "status": { "type": "string", "enum": ["measured", "unchanged", "unmeasured"] }, "modelLinesAdded": { "anyOf": [ { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, { "type": "null" } ] }, "modelLinesRemoved": { "anyOf": [ { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, { "type": "null" } ] }, "appliedLinesAdded": { "anyOf": [ { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, { "type": "null" } ] }, "appliedLinesRemoved": { "anyOf": [ { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, { "type": "null" } ] } } }, { "type": "null" } ] } } }, "ManagedActivityMeasurementTotals": { "type": "object", "additionalProperties": false, "required": [ "availability", "recorded", "unsupported", "executionDurationMs", "executionDurationSamples", "fileSamples", "modelDiffSamples", "appliedDiffSamples", "modelLinesAdded", "modelLinesRemoved", "appliedLinesAdded", "appliedLinesRemoved", "partial" ], "properties": { "availability": { "type": "string", "enum": ["available", "partial", "not_recorded", "unsupported"] }, "recorded": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "unsupported": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "executionDurationMs": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "executionDurationSamples": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "fileSamples": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "modelDiffSamples": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "appliedDiffSamples": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "modelLinesAdded": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "modelLinesRemoved": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "appliedLinesAdded": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "appliedLinesRemoved": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 }, "partial": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 128 } } }, "WebShellSideQueryPrefix": { "type": "object", "additionalProperties": false, "required": [ "journalRevision", "committedSequence", "lastCommitDigest", "completedTurnSequence", "contentVersion", "completedUserTurnCount", "mainInputBoundary" ], "properties": { "journalRevision": { "type": "integer", "minimum": 0 }, "committedSequence": { "type": "integer", "minimum": 0 }, "lastCommitDigest": { "type": ["string", "null"] }, "completedTurnSequence": { "type": "integer", "minimum": 0 }, "contentVersion": { "type": "string" }, "completedUserTurnCount": { "type": "integer", "minimum": 0 }, "mainInputBoundary": { "type": "integer", "minimum": 0 } } }, "WebShellSideQuery": { "type": "object", "additionalProperties": false, "required": [ "queryId", "sessionId", "kind", "trigger", "question", "status", "outcome", "source", "resultRevision", "text", "usage", "errorCode", "createdAt", "updatedAt", "deadlineAt" ], "properties": { "queryId": { "type": "string", "format": "uuid" }, "sessionId": { "type": "string", "format": "uuid" }, "kind": { "enum": ["btw", "recap"] }, "trigger": { "enum": ["manual", "automatic"] }, "question": { "type": ["string", "null"] }, "status": { "enum": [ "preparing", "running", "completed", "failed", "cancelled", "interrupted" ] }, "outcome": { "type": ["string", "null"] }, "source": { "$ref": "#/components/schemas/WebShellSideQueryPrefix" }, "resultRevision": { "type": "integer", "minimum": 0 }, "text": { "type": ["string", "null"] }, "usage": { "type": ["object", "null"], "additionalProperties": true }, "errorCode": { "type": ["string", "null"] }, "createdAt": { "type": "integer", "minimum": 0 }, "updatedAt": { "type": "integer", "minimum": 0 }, "deadlineAt": { "type": "integer", "minimum": 0 } } }, "WebShellSideQueryContext": { "type": "object", "additionalProperties": false, "required": [ "actorScopeKey", "contentVersion", "completedUserTurnCount", "mainInputBoundary", "automaticEligible", "generationAvailable", "unavailableReason", "latestRecapContentVersion", "latestRecapUserTurnCount" ], "properties": { "actorScopeKey": { "type": "string" }, "contentVersion": { "type": ["string", "null"] }, "completedUserTurnCount": { "type": "integer", "minimum": -1 }, "mainInputBoundary": { "type": "integer", "minimum": -1 }, "automaticEligible": { "type": "boolean" }, "generationAvailable": { "type": "boolean" }, "unavailableReason": { "type": ["string", "null"] }, "latestRecapContentVersion": { "type": ["string", "null"] }, "latestRecapUserTurnCount": { "type": ["integer", "null"], "minimum": 0 } } }, "WebShellSideQueryPage": { "type": "object", "additionalProperties": false, "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/WebShellSideQuery" } }, "nextCursor": { "type": ["string", "null"] } } }, "WebShellSideQueryCreateRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "kind", "idempotencyKey"], "properties": { "sessionId": { "type": "string" }, "kind": { "enum": ["btw", "recap"] }, "trigger": { "enum": ["manual", "automatic"] }, "question": { "type": "string", "maxLength": 4096 }, "expectedContentVersion": { "type": "string" }, "expectedMainInputBoundary": { "type": "integer", "minimum": 0 }, "idempotencyKey": { "type": "string" }, "requestId": { "type": "string" } } }, "WebShellSideQueryGetRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "queryId"], "properties": { "sessionId": { "type": "string" }, "queryId": { "type": "string" }, "afterRevision": { "type": "integer", "minimum": 0 }, "requestId": { "type": "string" } } }, "WebShellSideQueryListRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "requestId": { "type": "string" } } }, "WebShellClientFilesRegisterRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "connectionId"], "properties": { "sessionId": { "type": "string" }, "connectionId": { "type": "string", "maxLength": 64, "description": "Browser-generated identity correlating this registration's downlink and teardown with its own binding." } } }, "WebShellClientFilesUnregisterRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string" }, "connectionId": { "type": "string", "maxLength": 64, "description": "The unregistering bridge's owned registration identity; a stale teardown of a replaced binding is a no-op." } } }, "WebShellClientFilesStatusRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId"], "properties": { "sessionId": { "type": "string" }, "connectionId": { "type": "string", "maxLength": 64, "description": "The caller's own registration identity. The response echoes the live generation and identity only when this matches the binding; a merely readable session learns that a binding exists, not how to attach to it." } } }, "WebShellClientFilesStreamRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "generation", "connectionId"], "properties": { "sessionId": { "type": "string" }, "generation": { "type": "integer", "minimum": 1 }, "connectionId": { "type": "string", "maxLength": 64, "description": "The downlink's owned registration identity; a stream omitting it or naming another tab's binding is refused." } } }, "WebShellClientFilesRespondRequest": { "type": "object", "additionalProperties": false, "required": ["sessionId", "generation", "connectionId", "rpcRequestId"], "properties": { "sessionId": { "type": "string" }, "generation": { "type": "integer", "minimum": 1 }, "connectionId": { "type": "string", "maxLength": 64, "description": "The settling client's owned registration identity; a response omitting it or naming another tab's binding is refused, so a second client of the same actor cannot answer this registration's queued requests." }, "rpcRequestId": { "type": "string", "maxLength": 128, "description": "The JSON-RPC request identity being settled; distinct from the HTTP request id echo field." }, "responseJson": { "type": "string" }, "errorCode": { "type": "string", "maxLength": 128 } } }, "WebShellClientFilesRegistration": { "type": "object", "additionalProperties": false, "description": "The browser-facing registration ack. The relay credential is dispatched server-to-harness and is never part of this response; the bridge correlates on generation, toolCount and connectionId.", "required": [ "serverId", "generation", "expiresAt", "toolCount", "connectionId" ], "properties": { "serverId": { "type": "string" }, "generation": { "type": "integer", "minimum": 1 }, "expiresAt": { "type": "integer", "format": "int64", "description": "Binding deadline in Unix epoch milliseconds." }, "toolCount": { "type": "integer", "minimum": 0, "description": "Number of browser tools the Harness discovered during registration." }, "connectionId": { "type": "string", "description": "Echo of the registration identity the caller supplied, for downlink correlation." } } }, "WebShellClientFilesStatus": { "type": "object", "additionalProperties": false, "description": "The binding summary. Every field is optional because an absent binding answers 200 with an empty body, which a client reads as an empty object. The generation and connectionId are the fence for the downlink and settlement, so they are echoed only when the request's connectionId proves the caller owns the binding (owned=true); otherwise they are 0 / absent and only the non-secret summary is returned.", "properties": { "serverId": { "type": "string" }, "generation": { "type": "integer", "minimum": 0, "description": "The binding generation, echoed only when owned; 0 otherwise." }, "state": { "enum": ["active", "closed"] }, "expiresAt": { "type": "integer", "format": "int64", "description": "Binding deadline in Unix epoch milliseconds." }, "connectionId": { "type": "string", "description": "The binding's registration identity, echoed only when the request proved it (owned=true); absent otherwise." }, "owned": { "type": "boolean", "description": "Whether the request's connectionId matched the live binding, gating the generation/connectionId echo." } } }, "WebShellClientFilesRespondReceipt": { "type": "object", "additionalProperties": false, "required": ["settled"], "properties": { "settled": { "type": "boolean" } } }, "SideQueryPrefix": { "type": "object", "additionalProperties": false, "required": [ "journal_revision", "committed_sequence", "last_commit_digest", "completed_turn_sequence", "content_version", "completed_user_turn_count", "main_input_boundary" ], "properties": { "journal_revision": { "type": "integer", "minimum": 0 }, "committed_sequence": { "type": "integer", "minimum": 0 }, "last_commit_digest": { "type": ["string", "null"] }, "completed_turn_sequence": { "type": "integer", "minimum": 0 }, "content_version": { "type": "string" }, "completed_user_turn_count": { "type": "integer", "minimum": 0 }, "main_input_boundary": { "type": "integer", "minimum": 0 } } }, "SideQuery": { "type": "object", "additionalProperties": false, "required": [ "query_id", "session_id", "kind", "trigger", "question", "status", "outcome", "source", "result_revision", "text", "usage", "error_code", "created_at", "updated_at", "deadline_at" ], "properties": { "query_id": { "type": "string", "format": "uuid" }, "session_id": { "type": "string", "format": "uuid" }, "kind": { "enum": ["btw", "recap"] }, "trigger": { "enum": ["manual", "automatic"] }, "question": { "type": ["string", "null"] }, "status": { "enum": [ "preparing", "running", "completed", "failed", "cancelled", "interrupted" ] }, "outcome": { "type": ["string", "null"] }, "source": { "$ref": "#/components/schemas/SideQueryPrefix" }, "result_revision": { "type": "integer", "minimum": 0 }, "text": { "type": ["string", "null"] }, "usage": { "type": ["object", "null"], "additionalProperties": true }, "error_code": { "type": ["string", "null"] }, "created_at": { "type": "integer", "minimum": 0 }, "updated_at": { "type": "integer", "minimum": 0 }, "deadline_at": { "type": "integer", "minimum": 0 } } }, "SideQueryContext": { "type": "object", "additionalProperties": false, "required": [ "actor_scope_key", "content_version", "completed_user_turn_count", "main_input_boundary", "automatic_eligible", "generation_available", "unavailable_reason", "latest_recap_content_version", "latest_recap_user_turn_count" ], "properties": { "actor_scope_key": { "type": "string" }, "content_version": { "type": ["string", "null"] }, "completed_user_turn_count": { "type": "integer", "minimum": -1 }, "main_input_boundary": { "type": "integer", "minimum": -1 }, "automatic_eligible": { "type": "boolean" }, "generation_available": { "type": "boolean" }, "unavailable_reason": { "type": ["string", "null"] }, "latest_recap_content_version": { "type": ["string", "null"] }, "latest_recap_user_turn_count": { "type": ["integer", "null"], "minimum": 0 } } }, "SideQueryPage": { "type": "object", "additionalProperties": false, "required": ["items", "next_cursor"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/SideQuery" } }, "next_cursor": { "type": ["string", "null"] } } }, "SideQueryCreateRequest": { "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "enum": ["btw", "recap"] }, "trigger": { "enum": ["manual", "automatic"] }, "question": { "type": "string", "maxLength": 4096 }, "expected_content_version": { "type": "string" }, "expected_main_input_boundary": { "type": "integer", "minimum": 0 } } } } } }