From 6da20f0efe1ef99f578b657af1b62b6f54ee8601 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 28 Aug 2026 13:37:11 -0400 Subject: [PATCH] chore(protocol): refresh committed OpenAPI baseline (#45969) --- packages/protocol/openapi.json | 286 ++++++++++++++++++++++++++++++- packages/www/openapi.json | 286 ++++++++++++++++++++++++++++++- packages/www/public/openapi.json | 286 ++++++++++++++++++++++++++++++- 3 files changed, 849 insertions(+), 9 deletions(-) diff --git a/packages/protocol/openapi.json b/packages/protocol/openapi.json index 3539338410c..ad2a5596cde 100644 --- a/packages/protocol/openapi.json +++ b/packages/protocol/openapi.json @@ -790,6 +790,16 @@ "type": "null" } ] + }, + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Metadata" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -977,6 +987,16 @@ } } }, + "404": { + "description": "SessionNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" + } + } + } + }, "409": { "description": "ConflictError", "content": { @@ -988,7 +1008,7 @@ } } }, - "description": "Import a projected session transcript at the requested location.", + "description": "Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.", "summary": "Import session", "requestBody": { "content": { @@ -9872,6 +9892,97 @@ "x-websocket": true } }, + "/api/experimental/session/{sessionID}/terminal/read": { + "get": { + "tags": ["persistentPty"], + "operationId": "server.experimental.persistentPty.read", + "parameters": [ + { + "name": "sessionID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^ses" + }, + "required": true + }, + { + "name": "lines", + "in": "query", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.ReadLinesEncoded" + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.ReadResult" + }, + { + "type": "null" + } + ] + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "503": { + "description": "ServiceUnavailableError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" + } + } + } + } + }, + "description": "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.", + "summary": "Read the session's most recently controlled terminal" + } + }, "/api/experimental/session/{sessionID}/terminal": { "get": { "tags": ["persistentPty"], @@ -10074,6 +10185,70 @@ } } }, + "/api/experimental/persistent-pty/handoff": { + "post": { + "tags": ["persistentPty"], + "operationId": "server.experimental.persistentPty.handoff", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "handoff": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.Handoff" + }, + { + "type": "null" + } + ] + } + }, + "required": ["handoff"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "503": { + "description": "ServiceUnavailableError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" + } + } + } + } + } + } + }, "/api/experimental/persistent-pty/{ptyID}": { "get": { "tags": ["persistentPty"], @@ -14983,6 +15158,9 @@ "name": { "type": "string" }, + "metadata": { + "type": "object" + }, "methods": { "type": "array", "items": { @@ -15493,6 +15671,9 @@ "reasoningField": { "$ref": "#/components/schemas/Model.ReasoningField" }, + "requireReasoning": { + "type": "boolean" + }, "maxTokensField": { "$ref": "#/components/schemas/Model.MaxTokensField" }, @@ -15870,7 +16051,34 @@ "additionalProperties": false } }, - "required": ["command", "args", "cwd", "title", "env"], + "required": ["args", "title", "env"], + "additionalProperties": false + }, + "PersistentPty.Handoff": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "instanceID": { + "type": "string" + }, + "ticket": { + "type": "string" + }, + "expiresAt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["directory", "instanceID", "ticket", "expiresAt"], "additionalProperties": false }, "PersistentPty.Info": { @@ -15967,6 +16175,69 @@ ], "additionalProperties": false }, + "PersistentPty.ReadLinesEncoded": { + "type": "string" + }, + "PersistentPty.ReadResult": { + "type": "object", + "properties": { + "ptyID": { + "type": "string", + "pattern": "^pty" + }, + "title": { + "type": "string" + }, + "cwd": { + "type": "string" + }, + "foregroundProcess": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "screen": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "cols": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "rows": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "cursor": { + "type": "object", + "properties": { + "x": { + "type": "integer", + "minimum": 0 + }, + "y": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["x", "y"], + "additionalProperties": false + } + }, + "required": ["text", "cols", "rows", "cursor"], + "additionalProperties": false + } + }, + "required": ["ptyID", "title", "cwd", "foregroundProcess", "screen"], + "additionalProperties": false + }, "PersistentPty.Snapshot": { "type": "object", "properties": { @@ -16222,7 +16493,7 @@ }, "Project.Vcs": { "type": "string", - "enum": ["git", "hg"] + "pattern": "^[a-z][a-z0-9._-]*$" }, "ProjectNotFoundErrorEncoded": { "type": "object", @@ -16983,6 +17254,9 @@ "subpath": { "type": "string" }, + "metadata": { + "$ref": "#/components/schemas/Session.Metadata" + }, "revert": { "$ref": "#/components/schemas/Session.Revert" } @@ -17040,6 +17314,9 @@ "created": { "type": "number" }, + "streamed": { + "type": "number" + }, "completed": { "type": "number" } @@ -17831,6 +18108,9 @@ "required": ["id", "time", "text", "type"], "additionalProperties": false }, + "Session.Metadata": { + "type": "object" + }, "Session.Revert": { "type": "object", "properties": { diff --git a/packages/www/openapi.json b/packages/www/openapi.json index 3539338410c..ad2a5596cde 100644 --- a/packages/www/openapi.json +++ b/packages/www/openapi.json @@ -790,6 +790,16 @@ "type": "null" } ] + }, + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Metadata" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -977,6 +987,16 @@ } } }, + "404": { + "description": "SessionNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" + } + } + } + }, "409": { "description": "ConflictError", "content": { @@ -988,7 +1008,7 @@ } } }, - "description": "Import a projected session transcript at the requested location.", + "description": "Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.", "summary": "Import session", "requestBody": { "content": { @@ -9872,6 +9892,97 @@ "x-websocket": true } }, + "/api/experimental/session/{sessionID}/terminal/read": { + "get": { + "tags": ["persistentPty"], + "operationId": "server.experimental.persistentPty.read", + "parameters": [ + { + "name": "sessionID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^ses" + }, + "required": true + }, + { + "name": "lines", + "in": "query", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.ReadLinesEncoded" + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.ReadResult" + }, + { + "type": "null" + } + ] + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "503": { + "description": "ServiceUnavailableError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" + } + } + } + } + }, + "description": "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.", + "summary": "Read the session's most recently controlled terminal" + } + }, "/api/experimental/session/{sessionID}/terminal": { "get": { "tags": ["persistentPty"], @@ -10074,6 +10185,70 @@ } } }, + "/api/experimental/persistent-pty/handoff": { + "post": { + "tags": ["persistentPty"], + "operationId": "server.experimental.persistentPty.handoff", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "handoff": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.Handoff" + }, + { + "type": "null" + } + ] + } + }, + "required": ["handoff"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "503": { + "description": "ServiceUnavailableError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" + } + } + } + } + } + } + }, "/api/experimental/persistent-pty/{ptyID}": { "get": { "tags": ["persistentPty"], @@ -14983,6 +15158,9 @@ "name": { "type": "string" }, + "metadata": { + "type": "object" + }, "methods": { "type": "array", "items": { @@ -15493,6 +15671,9 @@ "reasoningField": { "$ref": "#/components/schemas/Model.ReasoningField" }, + "requireReasoning": { + "type": "boolean" + }, "maxTokensField": { "$ref": "#/components/schemas/Model.MaxTokensField" }, @@ -15870,7 +16051,34 @@ "additionalProperties": false } }, - "required": ["command", "args", "cwd", "title", "env"], + "required": ["args", "title", "env"], + "additionalProperties": false + }, + "PersistentPty.Handoff": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "instanceID": { + "type": "string" + }, + "ticket": { + "type": "string" + }, + "expiresAt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["directory", "instanceID", "ticket", "expiresAt"], "additionalProperties": false }, "PersistentPty.Info": { @@ -15967,6 +16175,69 @@ ], "additionalProperties": false }, + "PersistentPty.ReadLinesEncoded": { + "type": "string" + }, + "PersistentPty.ReadResult": { + "type": "object", + "properties": { + "ptyID": { + "type": "string", + "pattern": "^pty" + }, + "title": { + "type": "string" + }, + "cwd": { + "type": "string" + }, + "foregroundProcess": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "screen": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "cols": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "rows": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "cursor": { + "type": "object", + "properties": { + "x": { + "type": "integer", + "minimum": 0 + }, + "y": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["x", "y"], + "additionalProperties": false + } + }, + "required": ["text", "cols", "rows", "cursor"], + "additionalProperties": false + } + }, + "required": ["ptyID", "title", "cwd", "foregroundProcess", "screen"], + "additionalProperties": false + }, "PersistentPty.Snapshot": { "type": "object", "properties": { @@ -16222,7 +16493,7 @@ }, "Project.Vcs": { "type": "string", - "enum": ["git", "hg"] + "pattern": "^[a-z][a-z0-9._-]*$" }, "ProjectNotFoundErrorEncoded": { "type": "object", @@ -16983,6 +17254,9 @@ "subpath": { "type": "string" }, + "metadata": { + "$ref": "#/components/schemas/Session.Metadata" + }, "revert": { "$ref": "#/components/schemas/Session.Revert" } @@ -17040,6 +17314,9 @@ "created": { "type": "number" }, + "streamed": { + "type": "number" + }, "completed": { "type": "number" } @@ -17831,6 +18108,9 @@ "required": ["id", "time", "text", "type"], "additionalProperties": false }, + "Session.Metadata": { + "type": "object" + }, "Session.Revert": { "type": "object", "properties": { diff --git a/packages/www/public/openapi.json b/packages/www/public/openapi.json index 3539338410c..ad2a5596cde 100644 --- a/packages/www/public/openapi.json +++ b/packages/www/public/openapi.json @@ -790,6 +790,16 @@ "type": "null" } ] + }, + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Metadata" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -977,6 +987,16 @@ } } }, + "404": { + "description": "SessionNotFoundError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" + } + } + } + }, "409": { "description": "ConflictError", "content": { @@ -988,7 +1008,7 @@ } } }, - "description": "Import a projected session transcript at the requested location.", + "description": "Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.", "summary": "Import session", "requestBody": { "content": { @@ -9872,6 +9892,97 @@ "x-websocket": true } }, + "/api/experimental/session/{sessionID}/terminal/read": { + "get": { + "tags": ["persistentPty"], + "operationId": "server.experimental.persistentPty.read", + "parameters": [ + { + "name": "sessionID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^ses" + }, + "required": true + }, + { + "name": "lines", + "in": "query", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.ReadLinesEncoded" + }, + { + "type": "null" + } + ] + }, + "required": false + } + ], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.ReadResult" + }, + { + "type": "null" + } + ] + } + }, + "required": ["data"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "503": { + "description": "ServiceUnavailableError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" + } + } + } + } + }, + "description": "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.", + "summary": "Read the session's most recently controlled terminal" + } + }, "/api/experimental/session/{sessionID}/terminal": { "get": { "tags": ["persistentPty"], @@ -10074,6 +10185,70 @@ } } }, + "/api/experimental/persistent-pty/handoff": { + "post": { + "tags": ["persistentPty"], + "operationId": "server.experimental.persistentPty.handoff", + "parameters": [], + "security": [], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "handoff": { + "anyOf": [ + { + "$ref": "#/components/schemas/PersistentPty.Handoff" + }, + { + "type": "null" + } + ] + } + }, + "required": ["handoff"], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "InvalidRequestError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorEncoded" + } + } + } + }, + "401": { + "description": "UnauthorizedError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorEncoded" + } + } + } + }, + "503": { + "description": "ServiceUnavailableError", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" + } + } + } + } + } + } + }, "/api/experimental/persistent-pty/{ptyID}": { "get": { "tags": ["persistentPty"], @@ -14983,6 +15158,9 @@ "name": { "type": "string" }, + "metadata": { + "type": "object" + }, "methods": { "type": "array", "items": { @@ -15493,6 +15671,9 @@ "reasoningField": { "$ref": "#/components/schemas/Model.ReasoningField" }, + "requireReasoning": { + "type": "boolean" + }, "maxTokensField": { "$ref": "#/components/schemas/Model.MaxTokensField" }, @@ -15870,7 +16051,34 @@ "additionalProperties": false } }, - "required": ["command", "args", "cwd", "title", "env"], + "required": ["args", "title", "env"], + "additionalProperties": false + }, + "PersistentPty.Handoff": { + "type": "object", + "properties": { + "directory": { + "type": "string" + }, + "instanceID": { + "type": "string" + }, + "ticket": { + "type": "string" + }, + "expiresAt": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["Infinity", "-Infinity", "NaN"] + } + ] + } + }, + "required": ["directory", "instanceID", "ticket", "expiresAt"], "additionalProperties": false }, "PersistentPty.Info": { @@ -15967,6 +16175,69 @@ ], "additionalProperties": false }, + "PersistentPty.ReadLinesEncoded": { + "type": "string" + }, + "PersistentPty.ReadResult": { + "type": "object", + "properties": { + "ptyID": { + "type": "string", + "pattern": "^pty" + }, + "title": { + "type": "string" + }, + "cwd": { + "type": "string" + }, + "foregroundProcess": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "screen": { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "cols": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "rows": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "cursor": { + "type": "object", + "properties": { + "x": { + "type": "integer", + "minimum": 0 + }, + "y": { + "type": "integer", + "minimum": 0 + } + }, + "required": ["x", "y"], + "additionalProperties": false + } + }, + "required": ["text", "cols", "rows", "cursor"], + "additionalProperties": false + } + }, + "required": ["ptyID", "title", "cwd", "foregroundProcess", "screen"], + "additionalProperties": false + }, "PersistentPty.Snapshot": { "type": "object", "properties": { @@ -16222,7 +16493,7 @@ }, "Project.Vcs": { "type": "string", - "enum": ["git", "hg"] + "pattern": "^[a-z][a-z0-9._-]*$" }, "ProjectNotFoundErrorEncoded": { "type": "object", @@ -16983,6 +17254,9 @@ "subpath": { "type": "string" }, + "metadata": { + "$ref": "#/components/schemas/Session.Metadata" + }, "revert": { "$ref": "#/components/schemas/Session.Revert" } @@ -17040,6 +17314,9 @@ "created": { "type": "number" }, + "streamed": { + "type": "number" + }, "completed": { "type": "number" } @@ -17831,6 +18108,9 @@ "required": ["id", "time", "text", "type"], "additionalProperties": false }, + "Session.Metadata": { + "type": "object" + }, "Session.Revert": { "type": "object", "properties": {