diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.json index f0e2ff4a8c..dc5dd6ad60 100644 --- a/codex-rs/app-server-protocol/schema/json/ClientRequest.json +++ b/codex-rs/app-server-protocol/schema/json/ClientRequest.json @@ -5,48 +5,6 @@ "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "type": "string" }, - "AccountSessionsAddParams": { - "properties": { - "switchToAddedAccount": { - "type": "boolean" - } - }, - "type": "object" - }, - "AccountSessionsListParams": { - "properties": { - "refreshWorkspaceMetadata": { - "type": "boolean" - } - }, - "type": "object" - }, - "AccountSessionsLogoutParams": { - "properties": { - "sessionId": { - "type": "string" - } - }, - "required": [ - "sessionId" - ], - "type": "object" - }, - "AccountSessionsSwitchParams": { - "properties": { - "accountId": { - "type": "string" - }, - "sessionId": { - "type": "string" - } - }, - "required": [ - "accountId", - "sessionId" - ], - "type": "object" - }, "AddCreditsNudgeCreditType": { "enum": [ "credits", @@ -5917,102 +5875,6 @@ "title": "Account/login/cancelRequest", "type": "object" }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/add" - ], - "title": "AccountSession/addRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsAddParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/addRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/list" - ], - "title": "AccountSession/listRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsListParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/listRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/logout" - ], - "title": "AccountSession/logoutRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsLogoutParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/logoutRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/switch" - ], - "title": "AccountSession/switchRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsSwitchParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/switchRequest", - "type": "object" - }, { "properties": { "id": { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 774ca0497e..0c2ebf121e 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -1787,102 +1787,6 @@ "title": "Account/login/cancelRequest", "type": "object" }, - { - "properties": { - "id": { - "$ref": "#/definitions/v2/RequestId" - }, - "method": { - "enum": [ - "accountSession/add" - ], - "title": "AccountSession/addRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/v2/AccountSessionsAddParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/addRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/v2/RequestId" - }, - "method": { - "enum": [ - "accountSession/list" - ], - "title": "AccountSession/listRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/v2/AccountSessionsListParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/listRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/v2/RequestId" - }, - "method": { - "enum": [ - "accountSession/logout" - ], - "title": "AccountSession/logoutRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/v2/AccountSessionsLogoutParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/logoutRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/v2/RequestId" - }, - "method": { - "enum": [ - "accountSession/switch" - ], - "title": "AccountSession/switchRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/v2/AccountSessionsSwitchParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/switchRequest", - "type": "object" - }, { "properties": { "id": { @@ -5827,193 +5731,6 @@ "title": "AccountRateLimitsUpdatedNotification", "type": "object" }, - "AccountSession": { - "properties": { - "displayName": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "isActive": { - "type": "boolean" - }, - "lastUsedAt": { - "format": "int64", - "type": "integer" - }, - "plan": { - "type": [ - "string", - "null" - ] - }, - "selectedWorkspaceAccountId": { - "type": [ - "string", - "null" - ] - }, - "sessionId": { - "type": "string" - }, - "userId": { - "type": [ - "string", - "null" - ] - }, - "workspaces": { - "items": { - "$ref": "#/definitions/v2/AccountSessionWorkspace" - }, - "type": "array" - } - }, - "required": [ - "isActive", - "lastUsedAt", - "sessionId", - "workspaces" - ], - "type": "object" - }, - "AccountSessionWorkspace": { - "properties": { - "accountId": { - "type": "string" - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/v2/AccountSessionWorkspaceKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": [ - "string", - "null" - ] - }, - "status": { - "$ref": "#/definitions/v2/AccountSessionWorkspaceStatus" - } - }, - "required": [ - "accountId", - "status" - ], - "type": "object" - }, - "AccountSessionWorkspaceKind": { - "enum": [ - "personal", - "workspace" - ], - "type": "string" - }, - "AccountSessionWorkspaceStatus": { - "enum": [ - "active", - "disabled", - "deactivated" - ], - "type": "string" - }, - "AccountSessionsAddParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "switchToAddedAccount": { - "type": "boolean" - } - }, - "title": "AccountSessionsAddParams", - "type": "object" - }, - "AccountSessionsListParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "refreshWorkspaceMetadata": { - "type": "boolean" - } - }, - "title": "AccountSessionsListParams", - "type": "object" - }, - "AccountSessionsLogoutParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "sessionId": { - "type": "string" - } - }, - "required": [ - "sessionId" - ], - "title": "AccountSessionsLogoutParams", - "type": "object" - }, - "AccountSessionsResponse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "activeSessionId": { - "type": [ - "string", - "null" - ] - }, - "sessions": { - "items": { - "$ref": "#/definitions/v2/AccountSession" - }, - "type": "array" - } - }, - "required": [ - "sessions" - ], - "title": "AccountSessionsResponse", - "type": "object" - }, - "AccountSessionsSwitchParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "accountId": { - "type": "string" - }, - "sessionId": { - "type": "string" - } - }, - "required": [ - "accountId", - "sessionId" - ], - "title": "AccountSessionsSwitchParams", - "type": "object" - }, "AccountUpdatedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 591f0545ee..c6ea51680d 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -103,193 +103,6 @@ "title": "AccountRateLimitsUpdatedNotification", "type": "object" }, - "AccountSession": { - "properties": { - "displayName": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "isActive": { - "type": "boolean" - }, - "lastUsedAt": { - "format": "int64", - "type": "integer" - }, - "plan": { - "type": [ - "string", - "null" - ] - }, - "selectedWorkspaceAccountId": { - "type": [ - "string", - "null" - ] - }, - "sessionId": { - "type": "string" - }, - "userId": { - "type": [ - "string", - "null" - ] - }, - "workspaces": { - "items": { - "$ref": "#/definitions/AccountSessionWorkspace" - }, - "type": "array" - } - }, - "required": [ - "isActive", - "lastUsedAt", - "sessionId", - "workspaces" - ], - "type": "object" - }, - "AccountSessionWorkspace": { - "properties": { - "accountId": { - "type": "string" - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/AccountSessionWorkspaceKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": [ - "string", - "null" - ] - }, - "status": { - "$ref": "#/definitions/AccountSessionWorkspaceStatus" - } - }, - "required": [ - "accountId", - "status" - ], - "type": "object" - }, - "AccountSessionWorkspaceKind": { - "enum": [ - "personal", - "workspace" - ], - "type": "string" - }, - "AccountSessionWorkspaceStatus": { - "enum": [ - "active", - "disabled", - "deactivated" - ], - "type": "string" - }, - "AccountSessionsAddParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "switchToAddedAccount": { - "type": "boolean" - } - }, - "title": "AccountSessionsAddParams", - "type": "object" - }, - "AccountSessionsListParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "refreshWorkspaceMetadata": { - "type": "boolean" - } - }, - "title": "AccountSessionsListParams", - "type": "object" - }, - "AccountSessionsLogoutParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "sessionId": { - "type": "string" - } - }, - "required": [ - "sessionId" - ], - "title": "AccountSessionsLogoutParams", - "type": "object" - }, - "AccountSessionsResponse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "activeSessionId": { - "type": [ - "string", - "null" - ] - }, - "sessions": { - "items": { - "$ref": "#/definitions/AccountSession" - }, - "type": "array" - } - }, - "required": [ - "sessions" - ], - "title": "AccountSessionsResponse", - "type": "object" - }, - "AccountSessionsSwitchParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "accountId": { - "type": "string" - }, - "sessionId": { - "type": "string" - } - }, - "required": [ - "accountId", - "sessionId" - ], - "title": "AccountSessionsSwitchParams", - "type": "object" - }, "AccountUpdatedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -2722,102 +2535,6 @@ "title": "Account/login/cancelRequest", "type": "object" }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/add" - ], - "title": "AccountSession/addRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsAddParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/addRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/list" - ], - "title": "AccountSession/listRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsListParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/listRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/logout" - ], - "title": "AccountSession/logoutRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsLogoutParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/logoutRequest", - "type": "object" - }, - { - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "enum": [ - "accountSession/switch" - ], - "title": "AccountSession/switchRequestMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/AccountSessionsSwitchParams" - } - }, - "required": [ - "id", - "method", - "params" - ], - "title": "AccountSession/switchRequest", - "type": "object" - }, { "properties": { "id": { diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsAddParams.json b/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsAddParams.json deleted file mode 100644 index a2f4af7018..0000000000 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsAddParams.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "switchToAddedAccount": { - "type": "boolean" - } - }, - "title": "AccountSessionsAddParams", - "type": "object" -} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsListParams.json b/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsListParams.json deleted file mode 100644 index b92cd0ab00..0000000000 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsListParams.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "refreshWorkspaceMetadata": { - "type": "boolean" - } - }, - "title": "AccountSessionsListParams", - "type": "object" -} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsLogoutParams.json b/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsLogoutParams.json deleted file mode 100644 index be3c2719da..0000000000 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsLogoutParams.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "sessionId": { - "type": "string" - } - }, - "required": [ - "sessionId" - ], - "title": "AccountSessionsLogoutParams", - "type": "object" -} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsResponse.json b/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsResponse.json deleted file mode 100644 index 3cf11fca62..0000000000 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsResponse.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "AccountSession": { - "properties": { - "displayName": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "isActive": { - "type": "boolean" - }, - "lastUsedAt": { - "format": "int64", - "type": "integer" - }, - "plan": { - "type": [ - "string", - "null" - ] - }, - "selectedWorkspaceAccountId": { - "type": [ - "string", - "null" - ] - }, - "sessionId": { - "type": "string" - }, - "userId": { - "type": [ - "string", - "null" - ] - }, - "workspaces": { - "items": { - "$ref": "#/definitions/AccountSessionWorkspace" - }, - "type": "array" - } - }, - "required": [ - "isActive", - "lastUsedAt", - "sessionId", - "workspaces" - ], - "type": "object" - }, - "AccountSessionWorkspace": { - "properties": { - "accountId": { - "type": "string" - }, - "imageUrl": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/AccountSessionWorkspaceKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": [ - "string", - "null" - ] - }, - "status": { - "$ref": "#/definitions/AccountSessionWorkspaceStatus" - } - }, - "required": [ - "accountId", - "status" - ], - "type": "object" - }, - "AccountSessionWorkspaceKind": { - "enum": [ - "personal", - "workspace" - ], - "type": "string" - }, - "AccountSessionWorkspaceStatus": { - "enum": [ - "active", - "disabled", - "deactivated" - ], - "type": "string" - } - }, - "properties": { - "activeSessionId": { - "type": [ - "string", - "null" - ] - }, - "sessions": { - "items": { - "$ref": "#/definitions/AccountSession" - }, - "type": "array" - } - }, - "required": [ - "sessions" - ], - "title": "AccountSessionsResponse", - "type": "object" -} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsSwitchParams.json b/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsSwitchParams.json deleted file mode 100644 index 0a34ef0842..0000000000 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountSessionsSwitchParams.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "accountId": { - "type": "string" - }, - "sessionId": { - "type": "string" - } - }, - "required": [ - "accountId", - "sessionId" - ], - "title": "AccountSessionsSwitchParams", - "type": "object" -} \ No newline at end of file diff --git a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts index 2aec503709..e19ac2dfde 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts @@ -7,10 +7,6 @@ import type { GetConversationSummaryParams } from "./GetConversationSummaryParam import type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams"; import type { InitializeParams } from "./InitializeParams"; import type { RequestId } from "./RequestId"; -import type { AccountSessionsAddParams } from "./v2/AccountSessionsAddParams"; -import type { AccountSessionsListParams } from "./v2/AccountSessionsListParams"; -import type { AccountSessionsLogoutParams } from "./v2/AccountSessionsLogoutParams"; -import type { AccountSessionsSwitchParams } from "./v2/AccountSessionsSwitchParams"; import type { AppsListParams } from "./v2/AppsListParams"; import type { CancelLoginAccountParams } from "./v2/CancelLoginAccountParams"; import type { CommandExecParams } from "./v2/CommandExecParams"; @@ -90,4 +86,4 @@ import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupSta /** * Request from the client to the server. */ -export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/goal/set", id: RequestId, params: ThreadGoalSetParams, } | { "method": "thread/goal/get", id: RequestId, params: ThreadGoalGetParams, } | { "method": "thread/goal/clear", id: RequestId, params: ThreadGoalClearParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/approveGuardianDeniedAction", id: RequestId, params: ThreadApproveGuardianDeniedActionParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/inject_items", id: RequestId, params: ThreadInjectItemsParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "skills/extraRoots/set", id: RequestId, params: SkillsExtraRootsSetParams, } | { "method": "hooks/list", id: RequestId, params: HooksListParams, } | { "method": "marketplace/add", id: RequestId, params: MarketplaceAddParams, } | { "method": "marketplace/remove", id: RequestId, params: MarketplaceRemoveParams, } | { "method": "marketplace/upgrade", id: RequestId, params: MarketplaceUpgradeParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/installed", id: RequestId, params: PluginInstalledParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "plugin/skill/read", id: RequestId, params: PluginSkillReadParams, } | { "method": "plugin/share/save", id: RequestId, params: PluginShareSaveParams, } | { "method": "plugin/share/updateTargets", id: RequestId, params: PluginShareUpdateTargetsParams, } | { "method": "plugin/share/list", id: RequestId, params: PluginShareListParams, } | { "method": "plugin/share/checkout", id: RequestId, params: PluginShareCheckoutParams, } | { "method": "plugin/share/delete", id: RequestId, params: PluginShareDeleteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "modelProvider/capabilities/read", id: RequestId, params: ModelProviderCapabilitiesReadParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "permissionProfile/list", id: RequestId, params: PermissionProfileListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "windowsSandbox/readiness", id: RequestId, params: undefined, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "accountSession/add", id: RequestId, params: AccountSessionsAddParams, } | { "method": "accountSession/list", id: RequestId, params: AccountSessionsListParams, } | { "method": "accountSession/logout", id: RequestId, params: AccountSessionsLogoutParams, } | { "method": "accountSession/switch", id: RequestId, params: AccountSessionsSwitchParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "account/sendAddCreditsNudgeEmail", id: RequestId, params: SendAddCreditsNudgeEmailParams, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, }; +export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/goal/set", id: RequestId, params: ThreadGoalSetParams, } | { "method": "thread/goal/get", id: RequestId, params: ThreadGoalGetParams, } | { "method": "thread/goal/clear", id: RequestId, params: ThreadGoalClearParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/approveGuardianDeniedAction", id: RequestId, params: ThreadApproveGuardianDeniedActionParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/inject_items", id: RequestId, params: ThreadInjectItemsParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "skills/extraRoots/set", id: RequestId, params: SkillsExtraRootsSetParams, } | { "method": "hooks/list", id: RequestId, params: HooksListParams, } | { "method": "marketplace/add", id: RequestId, params: MarketplaceAddParams, } | { "method": "marketplace/remove", id: RequestId, params: MarketplaceRemoveParams, } | { "method": "marketplace/upgrade", id: RequestId, params: MarketplaceUpgradeParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/installed", id: RequestId, params: PluginInstalledParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "plugin/skill/read", id: RequestId, params: PluginSkillReadParams, } | { "method": "plugin/share/save", id: RequestId, params: PluginShareSaveParams, } | { "method": "plugin/share/updateTargets", id: RequestId, params: PluginShareUpdateTargetsParams, } | { "method": "plugin/share/list", id: RequestId, params: PluginShareListParams, } | { "method": "plugin/share/checkout", id: RequestId, params: PluginShareCheckoutParams, } | { "method": "plugin/share/delete", id: RequestId, params: PluginShareDeleteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "modelProvider/capabilities/read", id: RequestId, params: ModelProviderCapabilitiesReadParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "permissionProfile/list", id: RequestId, params: PermissionProfileListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "windowsSandbox/readiness", id: RequestId, params: undefined, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "account/sendAddCreditsNudgeEmail", id: RequestId, params: SendAddCreditsNudgeEmailParams, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSession.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSession.ts deleted file mode 100644 index 93f2be5d56..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSession.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AccountSessionWorkspace } from "./AccountSessionWorkspace"; - -export type AccountSession = { sessionId: string, email: string | null, userId: string | null, displayName: string | null, imageUrl: string | null, plan: string | null, lastUsedAt: bigint, isActive: boolean, selectedWorkspaceAccountId: string | null, workspaces: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspace.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspace.ts deleted file mode 100644 index e67c9aa473..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspace.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AccountSessionWorkspaceKind } from "./AccountSessionWorkspaceKind"; -import type { AccountSessionWorkspaceStatus } from "./AccountSessionWorkspaceStatus"; - -export type AccountSessionWorkspace = { accountId: string, name: string | null, imageUrl: string | null, kind: AccountSessionWorkspaceKind | null, status: AccountSessionWorkspaceStatus, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspaceKind.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspaceKind.ts deleted file mode 100644 index 1ece70db35..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspaceKind.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountSessionWorkspaceKind = "personal" | "workspace"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspaceStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspaceStatus.ts deleted file mode 100644 index c2f3e8e0e3..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionWorkspaceStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountSessionWorkspaceStatus = "active" | "disabled" | "deactivated"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsAddParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsAddParams.ts deleted file mode 100644 index 8095a42ef1..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsAddParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountSessionsAddParams = { switchToAddedAccount?: boolean, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsListParams.ts deleted file mode 100644 index c0e9762416..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsListParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountSessionsListParams = { refreshWorkspaceMetadata?: boolean, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsLogoutParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsLogoutParams.ts deleted file mode 100644 index 928eb3c72d..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsLogoutParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountSessionsLogoutParams = { sessionId: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsResponse.ts deleted file mode 100644 index ceb55ece7f..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AccountSession } from "./AccountSession"; - -export type AccountSessionsResponse = { activeSessionId: string | null, sessions: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsSwitchParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsSwitchParams.ts deleted file mode 100644 index 532e50ad9c..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountSessionsSwitchParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountSessionsSwitchParams = { sessionId: string, accountId: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index 1c1c463a20..66b67fb1b4 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -3,15 +3,6 @@ export type { Account } from "./Account"; export type { AccountLoginCompletedNotification } from "./AccountLoginCompletedNotification"; export type { AccountRateLimitsUpdatedNotification } from "./AccountRateLimitsUpdatedNotification"; -export type { AccountSession } from "./AccountSession"; -export type { AccountSessionWorkspace } from "./AccountSessionWorkspace"; -export type { AccountSessionWorkspaceKind } from "./AccountSessionWorkspaceKind"; -export type { AccountSessionWorkspaceStatus } from "./AccountSessionWorkspaceStatus"; -export type { AccountSessionsAddParams } from "./AccountSessionsAddParams"; -export type { AccountSessionsListParams } from "./AccountSessionsListParams"; -export type { AccountSessionsLogoutParams } from "./AccountSessionsLogoutParams"; -export type { AccountSessionsResponse } from "./AccountSessionsResponse"; -export type { AccountSessionsSwitchParams } from "./AccountSessionsSwitchParams"; export type { AccountUpdatedNotification } from "./AccountUpdatedNotification"; export type { ActivePermissionProfile } from "./ActivePermissionProfile"; export type { AddCreditsNudgeCreditType } from "./AddCreditsNudgeCreditType"; diff --git a/codex-rs/app-server-protocol/src/protocol/common.rs b/codex-rs/app-server-protocol/src/protocol/common.rs index 0b9ffdb5cc..71c89a185c 100644 --- a/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/codex-rs/app-server-protocol/src/protocol/common.rs @@ -919,33 +919,6 @@ client_request_definitions! { response: v2::CancelLoginAccountResponse, }, - AccountSessionsAdd => "accountSession/add" { - params: v2::AccountSessionsAddParams, - serialization: global("account-auth"), - response: v2::AccountSessionsResponse, - }, - - AccountSessionsList => "accountSession/list" { - params: v2::AccountSessionsListParams, - serialization: global("account-auth"), - manual_payload_conversion: manual, - response: v2::AccountSessionsResponse, - }, - - AccountSessionsLogout => "accountSession/logout" { - params: v2::AccountSessionsLogoutParams, - serialization: global("account-auth"), - manual_payload_conversion: manual, - response: v2::AccountSessionsResponse, - }, - - AccountSessionsSwitch => "accountSession/switch" { - params: v2::AccountSessionsSwitchParams, - serialization: global("account-auth"), - manual_payload_conversion: manual, - response: v2::AccountSessionsResponse, - }, - LogoutAccount => "account/logout" { params: #[ts(type = "undefined")] #[serde(skip_serializing_if = "Option::is_none")] Option<()>, serialization: global("account-auth"), diff --git a/codex-rs/backend-client/src/types.rs b/codex-rs/backend-client/src/types.rs index e1845a4f16..66dfe31e36 100644 --- a/codex-rs/backend-client/src/types.rs +++ b/codex-rs/backend-client/src/types.rs @@ -13,13 +13,10 @@ use serde::de::Deserializer; use serde_json::Value; use std::collections::HashMap; -#[derive(Clone, Debug, Deserialize)] +#[derive(Clone, Debug)] pub struct AccountsCheckResponse { - #[serde(default)] pub accounts: Vec, - #[serde(default)] pub account_ordering: Vec, - #[serde(default)] pub default_account_id: Option, } @@ -34,6 +31,75 @@ pub struct AccountEntry { pub structure: String, } +#[derive(Deserialize)] +struct RawAccountsCheckResponse { + #[serde(default)] + accounts: RawAccounts, + #[serde(default)] + account_ordering: Vec, + #[serde(default)] + default_account_id: Option, +} + +#[derive(Deserialize)] +#[serde(untagged)] +enum RawAccounts { + List(Vec), + Map(HashMap), +} + +impl Default for RawAccounts { + fn default() -> Self { + Self::List(Vec::new()) + } +} + +#[derive(Deserialize)] +struct ChatGptAccountEntry { + account: ChatGptAccountInfo, +} + +#[derive(Deserialize)] +struct ChatGptAccountInfo { + account_id: Option, + #[serde(default)] + name: Option, + #[serde(default)] + profile_picture_url: Option, + #[serde(default)] + structure: String, +} + +impl<'de> Deserialize<'de> for AccountsCheckResponse { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let raw = RawAccountsCheckResponse::deserialize(deserializer)?; + let accounts = match raw.accounts { + RawAccounts::List(accounts) => accounts, + RawAccounts::Map(mut accounts) => raw + .account_ordering + .iter() + .filter_map(|account_id| { + let account = accounts.remove(account_id)?.account; + Some(AccountEntry { + id: account.account_id?, + name: account.name, + profile_picture_url: account.profile_picture_url, + structure: account.structure, + }) + }) + .collect(), + }; + Ok(Self { + accounts, + account_ordering: raw.account_ordering, + default_account_id: raw.default_account_id, + }) + } +} + /// Hand-rolled models for the Cloud Tasks task-details response. /// The generated OpenAPI models are pretty bad. This is a half-step /// towards hand-rolling them.