From 62a0bf2f41cb066589eaa2fe419740f378bca58d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Jul 2026 07:37:06 +0000 Subject: [PATCH 1/2] Update codex to 0.145.0 --- package-lock.json | 56 ++++++------ package.json | 2 +- src/app-server/ClientRequest.ts | 4 +- src/app-server/CodexResponseHandoffMode.ts | 5 ++ src/app-server/ContentItem.ts | 2 +- .../FunctionCallOutputContentItem.ts | 2 +- src/app-server/InputModality.ts | 2 +- src/app-server/LegacyAppPathString.ts | 13 +-- src/app-server/RealtimeConversationVersion.ts | 2 +- src/app-server/ResponseItem.ts | 7 +- src/app-server/ResponseItemId.ts | 9 ++ src/app-server/ReviewDecision.ts | 2 +- src/app-server/ServerNotification.ts | 4 +- src/app-server/ServerNotificationEnvelope.ts | 89 +++++++++++++++++++ src/app-server/SleepItem.ts | 8 ++ src/app-server/WebSearchItem.ts | 10 ++- src/app-server/index.ts | 4 + src/app-server/v2/Account.ts | 3 +- src/app-server/v2/AppToolSummary.ts | 8 ++ src/app-server/v2/AppsInstalledParams.ts | 17 ++++ src/app-server/v2/AppsInstalledResponse.ts | 9 ++ src/app-server/v2/AppsReadParams.ts | 17 ++++ src/app-server/v2/AppsReadResponse.ts | 9 ++ src/app-server/v2/ConfiguredHookHandler.ts | 9 +- src/app-server/v2/ConnectorMetadata.ts | 9 ++ .../v2/DynamicToolCallOutputContentItem.ts | 2 +- .../v2/EnvironmentConnectionNotification.ts | 5 ++ .../v2/ExternalAgentConfigDetectParams.ts | 11 ++- ...lAgentConfigImportHistoriesReadResponse.ts | 3 +- ...xternalAgentConfigImportItemTypeFailure.ts | 2 +- .../v2/ExternalAgentConfigImportParams.ts | 9 +- .../ExternalAgentConfigMigrationItemType.ts | 2 +- ...ExternalAgentImportedConnectorCandidate.ts | 6 ++ .../ExternalAgentImportedConnectorSource.ts | 5 ++ src/app-server/v2/FileSystemSpecialPath.ts | 3 +- src/app-server/v2/HookEventName.ts | 2 +- src/app-server/v2/HookMetadata.ts | 7 +- src/app-server/v2/InstalledApp.ts | 23 +++++ src/app-server/v2/LoginAccountParams.ts | 2 +- src/app-server/v2/LoginAccountResponse.ts | 2 +- src/app-server/v2/ManagedHooksRequirements.ts | 2 +- src/app-server/v2/McpToolCallAppContext.ts | 2 +- src/app-server/v2/MigrationDetails.ts | 2 +- src/app-server/v2/PluginDetail.ts | 3 +- .../v2/PluginShareUpdateDiscoverability.ts | 2 +- src/app-server/v2/PluginSummary.ts | 2 +- src/app-server/v2/RateLimitSnapshot.ts | 6 +- .../v2/RawResponseCompletedNotification.ts | 10 +++ src/app-server/v2/ScheduledTaskSchedule.ts | 6 ++ src/app-server/v2/ScheduledTaskSummary.ts | 6 ++ src/app-server/v2/ScheduledTaskWeekday.ts | 5 ++ src/app-server/v2/ThreadItem.ts | 3 +- src/app-server/v2/ThreadItemEntry.ts | 10 +++ .../v2/ThreadRealtimeInitialItem.ts | 9 ++ src/app-server/v2/TokenUsageBreakdown.ts | 2 +- src/app-server/v2/TurnEnvironmentParams.ts | 6 +- src/app-server/v2/UserInput.ts | 2 +- src/app-server/v2/index.ts | 16 ++++ 58 files changed, 408 insertions(+), 72 deletions(-) create mode 100644 src/app-server/CodexResponseHandoffMode.ts create mode 100644 src/app-server/ResponseItemId.ts create mode 100644 src/app-server/ServerNotificationEnvelope.ts create mode 100644 src/app-server/SleepItem.ts create mode 100644 src/app-server/v2/AppToolSummary.ts create mode 100644 src/app-server/v2/AppsInstalledParams.ts create mode 100644 src/app-server/v2/AppsInstalledResponse.ts create mode 100644 src/app-server/v2/AppsReadParams.ts create mode 100644 src/app-server/v2/AppsReadResponse.ts create mode 100644 src/app-server/v2/ConnectorMetadata.ts create mode 100644 src/app-server/v2/EnvironmentConnectionNotification.ts create mode 100644 src/app-server/v2/ExternalAgentImportedConnectorCandidate.ts create mode 100644 src/app-server/v2/ExternalAgentImportedConnectorSource.ts create mode 100644 src/app-server/v2/InstalledApp.ts create mode 100644 src/app-server/v2/RawResponseCompletedNotification.ts create mode 100644 src/app-server/v2/ScheduledTaskSchedule.ts create mode 100644 src/app-server/v2/ScheduledTaskSummary.ts create mode 100644 src/app-server/v2/ScheduledTaskWeekday.ts create mode 100644 src/app-server/v2/ThreadItemEntry.ts create mode 100644 src/app-server/v2/ThreadRealtimeInitialItem.ts diff --git a/package-lock.json b/package-lock.json index ea67f9a6..597e5362 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@agentclientprotocol/sdk": "^1.2.1", - "@openai/codex": "^0.144.6", + "@openai/codex": "^0.145.0", "diff": "^9.0.0", "open": "^11.0.0", "vscode-jsonrpc": "^9.0.1", @@ -929,9 +929,9 @@ } }, "node_modules/@openai/codex": { - "version": "0.144.6", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6.tgz", - "integrity": "sha512-wk+2CWiBNXiJLBoN2D08N9RceWkSBnlgk5g2K1a4CXrP/C0gdlHyRUG7RFzm9y41DCK/7tvCct233JVxyFmznw==", + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0.tgz", + "integrity": "sha512-/PSPSFujjjmiyVFvG2yu/grOFhsWdokTH8t2KGWhXSo/M5n/dIDsnbsnO82/7bLtIoDuzQf7ATBUMWqPWQINlQ==", "license": "Apache-2.0", "bin": { "codex": "bin/codex.js" @@ -940,19 +940,19 @@ "node": ">=16" }, "optionalDependencies": { - "@openai/codex-darwin-arm64": "npm:@openai/codex@0.144.6-darwin-arm64", - "@openai/codex-darwin-x64": "npm:@openai/codex@0.144.6-darwin-x64", - "@openai/codex-linux-arm64": "npm:@openai/codex@0.144.6-linux-arm64", - "@openai/codex-linux-x64": "npm:@openai/codex@0.144.6-linux-x64", - "@openai/codex-win32-arm64": "npm:@openai/codex@0.144.6-win32-arm64", - "@openai/codex-win32-x64": "npm:@openai/codex@0.144.6-win32-x64" + "@openai/codex-darwin-arm64": "npm:@openai/codex@0.145.0-darwin-arm64", + "@openai/codex-darwin-x64": "npm:@openai/codex@0.145.0-darwin-x64", + "@openai/codex-linux-arm64": "npm:@openai/codex@0.145.0-linux-arm64", + "@openai/codex-linux-x64": "npm:@openai/codex@0.145.0-linux-x64", + "@openai/codex-win32-arm64": "npm:@openai/codex@0.145.0-win32-arm64", + "@openai/codex-win32-x64": "npm:@openai/codex@0.145.0-win32-x64" } }, "node_modules/@openai/codex-darwin-arm64": { "name": "@openai/codex", - "version": "0.144.6-darwin-arm64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-darwin-arm64.tgz", - "integrity": "sha512-6zgvh70MzBNSeT17HEhSOrmmGGZGAKzSC7x6JAq+edkJkdPYA9P0I1tG7aJ49GlBkBxuC+MKBH1qm6+2Cghcww==", + "version": "0.145.0-darwin-arm64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0-darwin-arm64.tgz", + "integrity": "sha512-h6aQ0UxnaP8mIM/9/qPAH9MNkRliJo88toq1T36IxNM2L5JSU0TFamu+MZn7YkFgDsrp0RfiI+97Tm8AVVxqtA==", "cpu": [ "arm64" ], @@ -967,9 +967,9 @@ }, "node_modules/@openai/codex-darwin-x64": { "name": "@openai/codex", - "version": "0.144.6-darwin-x64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-darwin-x64.tgz", - "integrity": "sha512-THRyPG0zSU6M8NQAge1LHEHsJDnoH4BpKsfJHB/qe3Fm+Wf6zqAmWJFlOKzBm27m0K2Hq3za4Ac2I5p5i4yp/A==", + "version": "0.145.0-darwin-x64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0-darwin-x64.tgz", + "integrity": "sha512-FCYzVKCa9VoLtg9gVyzKpqylonfgZrfcWZN6HsXAZPeuo8CukdMqdgTUOhDn2V6h3MbqS0z6VqQVKUllN/yKhA==", "cpu": [ "x64" ], @@ -984,9 +984,9 @@ }, "node_modules/@openai/codex-linux-arm64": { "name": "@openai/codex", - "version": "0.144.6-linux-arm64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-linux-arm64.tgz", - "integrity": "sha512-PGiLXMN+2IQRkf7tOLi64dMInjU1pRLbz0Rwfj/yt2Y97SZQqAjFQoi2wmswmqtqMDnfwCPTC1DRXVQkvU6T6Q==", + "version": "0.145.0-linux-arm64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0-linux-arm64.tgz", + "integrity": "sha512-8OLcPXaAol/FOrRoDxWhIiHIFa73KRsM41EKocjRZOwiT4TcelzJWn3dHyiuSb7teWF25rrslvSPyvhULYRRCQ==", "cpu": [ "arm64" ], @@ -1001,9 +1001,9 @@ }, "node_modules/@openai/codex-linux-x64": { "name": "@openai/codex", - "version": "0.144.6-linux-x64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-linux-x64.tgz", - "integrity": "sha512-4E7EnzCg0OnBxCyYnwJ+qnZwWHYe0YScr5ucKWbngE9u4+0XrpWELqq2Kn9jl5GZK8MDjU7PrJwFIwusHOHjuw==", + "version": "0.145.0-linux-x64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0-linux-x64.tgz", + "integrity": "sha512-u8w8LLv3DvsfrDCoswLIemZ0SoNEXyi511WsfFsSiYUazk9qMsB/NtU8N9vhAfN7mZAxLFoMex4v66JjHuZWwA==", "cpu": [ "x64" ], @@ -1018,9 +1018,9 @@ }, "node_modules/@openai/codex-win32-arm64": { "name": "@openai/codex", - "version": "0.144.6-win32-arm64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-win32-arm64.tgz", - "integrity": "sha512-SpMjXJLW43JzMP0K62mVcYfmFcpk0BK4AOgYmWSfyZHs3iRtHMd0UYw7605n/9lwkT2EqbwQLT2omZFeKJFzwA==", + "version": "0.145.0-win32-arm64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0-win32-arm64.tgz", + "integrity": "sha512-sub61rjEFevi1i3Zx7nAd4JM5XxoNFqMqFc5LfTo2xSI8ixHjFvEYDFDXwXOftT04n3Ht1Wh271ioUZpDiEjEg==", "cpu": [ "arm64" ], @@ -1035,9 +1035,9 @@ }, "node_modules/@openai/codex-win32-x64": { "name": "@openai/codex", - "version": "0.144.6-win32-x64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.144.6-win32-x64.tgz", - "integrity": "sha512-dN39VnjEthKz5io1RNWwZDtErdSn07nW3pGUgvlA6DMxgm/nuGaIAZO/sG/Hgxq/x5j9HteAENfrFgVkpZ0lFg==", + "version": "0.145.0-win32-x64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.145.0-win32-x64.tgz", + "integrity": "sha512-u0h9lk094CaXRSqE34SBW2dRaQTPa6fASXqehczWH9QdsU62mBsiAgAdp6tCG4i+YzPmmhjD8FdXNnYGNmwuMg==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index b2576e00..e299b070 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ }, "dependencies": { "@agentclientprotocol/sdk": "^1.2.1", - "@openai/codex": "^0.144.6", + "@openai/codex": "^0.145.0", "diff": "^9.0.0", "open": "^11.0.0", "vscode-jsonrpc": "^9.0.1", diff --git a/src/app-server/ClientRequest.ts b/src/app-server/ClientRequest.ts index 6af04ef4..bcfcaf6d 100644 --- a/src/app-server/ClientRequest.ts +++ b/src/app-server/ClientRequest.ts @@ -7,7 +7,9 @@ import type { GetConversationSummaryParams } from "./GetConversationSummaryParam import type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams"; import type { InitializeParams } from "./InitializeParams"; import type { RequestId } from "./RequestId"; +import type { AppsInstalledParams } from "./v2/AppsInstalledParams"; import type { AppsListParams } from "./v2/AppsListParams"; +import type { AppsReadParams } from "./v2/AppsReadParams"; import type { CancelLoginAccountParams } from "./v2/CancelLoginAccountParams"; import type { CommandExecParams } from "./v2/CommandExecParams"; import type { CommandExecResizeParams } from "./v2/CommandExecResizeParams"; @@ -88,4 +90,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/delete", id: RequestId, params: ThreadDeleteParams, } | { "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/rateLimitResetCredit/consume", id: RequestId, params: ConsumeAccountRateLimitResetCreditParams, } | { "method": "account/usage/read", id: RequestId, params: undefined, } | { "method": "account/workspaceMessages/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": "externalAgentConfig/import/readHistories", id: RequestId, params: undefined, } | { "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/delete", id: RequestId, params: ThreadDeleteParams, } | { "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/read", id: RequestId, params: AppsReadParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "app/installed", id: RequestId, params: AppsInstalledParams, } | { "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/rateLimitResetCredit/consume", id: RequestId, params: ConsumeAccountRateLimitResetCreditParams, } | { "method": "account/usage/read", id: RequestId, params: undefined, } | { "method": "account/workspaceMessages/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": "externalAgentConfig/import/readHistories", id: RequestId, params: undefined, } | { "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/src/app-server/CodexResponseHandoffMode.ts b/src/app-server/CodexResponseHandoffMode.ts new file mode 100644 index 00000000..3eb90dad --- /dev/null +++ b/src/app-server/CodexResponseHandoffMode.ts @@ -0,0 +1,5 @@ +// 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 CodexResponseHandoffMode = "thinking" | "commentary" | "bemTags"; diff --git a/src/app-server/ContentItem.ts b/src/app-server/ContentItem.ts index 21cd8d02..9e53b5fc 100644 --- a/src/app-server/ContentItem.ts +++ b/src/app-server/ContentItem.ts @@ -3,4 +3,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ImageDetail } from "./ImageDetail"; -export type ContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, } | { "type": "output_text", text: string, }; +export type ContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, } | { "type": "input_audio", audio_url: string, } | { "type": "output_text", text: string, }; diff --git a/src/app-server/FunctionCallOutputContentItem.ts b/src/app-server/FunctionCallOutputContentItem.ts index cd189081..6c2ab2af 100644 --- a/src/app-server/FunctionCallOutputContentItem.ts +++ b/src/app-server/FunctionCallOutputContentItem.ts @@ -7,4 +7,4 @@ import type { ImageDetail } from "./ImageDetail"; * Responses API compatible content items that can be returned by a tool call. * This is a subset of ContentItem with the types we support as function call outputs. */ -export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, } | { "type": "encrypted_content", encrypted_content: string, }; +export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, } | { "type": "input_audio", audio_url: string, } | { "type": "encrypted_content", encrypted_content: string, }; diff --git a/src/app-server/InputModality.ts b/src/app-server/InputModality.ts index 73661938..40d598df 100644 --- a/src/app-server/InputModality.ts +++ b/src/app-server/InputModality.ts @@ -5,4 +5,4 @@ /** * Canonical user-input modality tags advertised by a model. */ -export type InputModality = "text" | "image"; +export type InputModality = "text" | "image" | "audio"; diff --git a/src/app-server/LegacyAppPathString.ts b/src/app-server/LegacyAppPathString.ts index e39784a8..5c0a1b1e 100644 --- a/src/app-server/LegacyAppPathString.ts +++ b/src/app-server/LegacyAppPathString.ts @@ -16,11 +16,12 @@ * boundary. Non-UTF-8 paths are converted to UTF-8 lossily because this API * value is serialized as a JSON string. * - * Deserialization accepts any UTF-8 string without interpreting or validating - * it. That unrestricted construction path is intentionally available only to - * serde: Codex-internal code cannot construct this type directly from a raw - * `String` and is instead encouraged to convert through [`PathUri`] or - * [`AbsolutePathBuf`]. Relative path text remains valid until an operation - * such as [`Self::to_path_uri`] requires an absolute path. + * Deserialization and [`Self::from_string`] accept any UTF-8 string without + * interpreting or validating it. Use [`Self::from_string`] when a caller + * already owns legacy app-server path text and needs to preserve its wire + * spelling; use [`Self::from_path`], [`Self::from_abs_path`], or + * [`Self::from_path_uri`] when converting an actual path value. Relative + * path text remains valid until an operation such as [`Self::to_path_uri`] + * requires an absolute path. */ export type LegacyAppPathString = string; diff --git a/src/app-server/RealtimeConversationVersion.ts b/src/app-server/RealtimeConversationVersion.ts index cedc4bbe..81b8d311 100644 --- a/src/app-server/RealtimeConversationVersion.ts +++ b/src/app-server/RealtimeConversationVersion.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type RealtimeConversationVersion = "v1" | "v2"; +export type RealtimeConversationVersion = "v1" | "v2" | "v3"; diff --git a/src/app-server/ResponseItem.ts b/src/app-server/ResponseItem.ts index 769b1b08..2758941b 100644 --- a/src/app-server/ResponseItem.ts +++ b/src/app-server/ResponseItem.ts @@ -10,14 +10,15 @@ import type { LocalShellStatus } from "./LocalShellStatus"; import type { MessagePhase } from "./MessagePhase"; import type { ReasoningItemContent } from "./ReasoningItemContent"; import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary"; +import type { ResponseItemId } from "./ResponseItemId"; import type { WebSearchAction } from "./WebSearchAction"; -export type ResponseItem = { "type": "message", id?: string, role: string, content: Array, phase?: MessagePhase, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "agent_message", id?: string, author: string, recipient: string, content: Array, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "reasoning", id?: string, summary: Array, content?: Array, encrypted_content: string | null, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "local_shell_call", +export type ResponseItem = { "type": "message", id?: ResponseItemId, role: string, content: Array, phase?: MessagePhase, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "agent_message", id?: ResponseItemId, author: string, recipient: string, content: Array, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "reasoning", id?: ResponseItemId, summary: Array, content?: Array, encrypted_content: string | null, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "local_shell_call", /** * Legacy id field retained for compatibility with older payloads. */ -id?: string, +id?: ResponseItemId, /** * Set when using the Responses API. */ -call_id: string | null, status: LocalShellStatus, action: LocalShellAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call", id?: string, name: string, namespace?: string, arguments: string, call_id: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_call", id?: string, call_id: string | null, status?: string, execution: string, arguments: unknown, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call_output", id?: string, call_id: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call", id?: string, status?: string, call_id: string, name: string, namespace?: string, input: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call_output", id?: string, call_id: string, name?: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_output", id?: string, call_id: string | null, status: string, execution: string, tools: unknown[], internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "web_search_call", id?: string, status?: string, action?: WebSearchAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "image_generation_call", id?: string, status: string, revised_prompt?: string, result: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction", id?: string, encrypted_content: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction_trigger", } | { "type": "context_compaction", id?: string, encrypted_content?: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "other" }; +call_id: string | null, status: LocalShellStatus, action: LocalShellAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call", id?: ResponseItemId, name: string, namespace?: string, arguments: string, call_id: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_call", id?: ResponseItemId, call_id: string | null, status?: string, execution: string, arguments: unknown, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call_output", id?: ResponseItemId, call_id: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call", id?: ResponseItemId, status?: string, call_id: string, name: string, namespace?: string, input: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call_output", id?: ResponseItemId, call_id: string, name?: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_output", id?: ResponseItemId, call_id: string | null, status: string, execution: string, tools: unknown[], internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "web_search_call", id?: ResponseItemId, status?: string, action?: WebSearchAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "image_generation_call", id?: ResponseItemId, status: string, revised_prompt?: string, result: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction", id?: ResponseItemId, encrypted_content: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction_trigger", } | { "type": "context_compaction", id?: ResponseItemId, encrypted_content?: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "other" }; diff --git a/src/app-server/ResponseItemId.ts b/src/app-server/ResponseItemId.ts new file mode 100644 index 00000000..c4f17ec5 --- /dev/null +++ b/src/app-server/ResponseItemId.ts @@ -0,0 +1,9 @@ +// 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. + +/** + * A Responses API item ID. New IDs require an explicit prefix; deserialization + * remains permissive so legacy rollouts can still be read. + */ +export type ResponseItemId = string; diff --git a/src/app-server/ReviewDecision.ts b/src/app-server/ReviewDecision.ts index 109f7292..22c09a24 100644 --- a/src/app-server/ReviewDecision.ts +++ b/src/app-server/ReviewDecision.ts @@ -7,4 +7,4 @@ import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment"; /** * User's decision in response to an ExecApprovalRequest. */ -export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "timed_out" | "abort"; +export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | { "denied": { rejection: string, } } | "timed_out" | "abort"; diff --git a/src/app-server/ServerNotification.ts b/src/app-server/ServerNotification.ts index f3f828b8..271bfd4f 100644 --- a/src/app-server/ServerNotification.ts +++ b/src/app-server/ServerNotification.ts @@ -13,6 +13,7 @@ import type { CommandExecutionOutputDeltaNotification } from "./v2/CommandExecut import type { ConfigWarningNotification } from "./v2/ConfigWarningNotification"; import type { ContextCompactedNotification } from "./v2/ContextCompactedNotification"; import type { DeprecationNoticeNotification } from "./v2/DeprecationNoticeNotification"; +import type { EnvironmentConnectionNotification } from "./v2/EnvironmentConnectionNotification"; import type { ErrorNotification } from "./v2/ErrorNotification"; import type { ExternalAgentConfigImportCompletedNotification } from "./v2/ExternalAgentConfigImportCompletedNotification"; import type { ExternalAgentConfigImportProgressNotification } from "./v2/ExternalAgentConfigImportProgressNotification"; @@ -35,6 +36,7 @@ import type { ModelVerificationNotification } from "./v2/ModelVerificationNotifi import type { PlanDeltaNotification } from "./v2/PlanDeltaNotification"; import type { ProcessExitedNotification } from "./v2/ProcessExitedNotification"; import type { ProcessOutputDeltaNotification } from "./v2/ProcessOutputDeltaNotification"; +import type { RawResponseCompletedNotification } from "./v2/RawResponseCompletedNotification"; import type { RawResponseItemCompletedNotification } from "./v2/RawResponseItemCompletedNotification"; import type { ReasoningSummaryPartAddedNotification } from "./v2/ReasoningSummaryPartAddedNotification"; import type { ReasoningSummaryTextDeltaNotification } from "./v2/ReasoningSummaryTextDeltaNotification"; @@ -74,4 +76,4 @@ import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldW /** * Notification sent from the server to the client. */ -export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/deleted", "params": ThreadDeletedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/goal/updated", "params": ThreadGoalUpdatedNotification } | { "method": "thread/goal/cleared", "params": ThreadGoalClearedNotification } | { "method": "thread/settings/updated", "params": ThreadSettingsUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "process/outputDelta", "params": ProcessOutputDeltaNotification } | { "method": "process/exited", "params": ProcessExitedNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "remoteControl/status/changed", "params": RemoteControlStatusChangedNotification } | { "method": "externalAgentConfig/import/progress", "params": ExternalAgentConfigImportProgressNotification } | { "method": "externalAgentConfig/import/completed", "params": ExternalAgentConfigImportCompletedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "model/verification", "params": ModelVerificationNotification } | { "method": "turn/moderationMetadata", "params": TurnModerationMetadataNotification } | { "method": "model/safetyBuffering/updated", "params": ModelSafetyBufferingUpdatedNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; +export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/deleted", "params": ThreadDeletedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/goal/updated", "params": ThreadGoalUpdatedNotification } | { "method": "thread/goal/cleared", "params": ThreadGoalClearedNotification } | { "method": "thread/environment/connected", "params": EnvironmentConnectionNotification } | { "method": "thread/environment/disconnected", "params": EnvironmentConnectionNotification } | { "method": "thread/settings/updated", "params": ThreadSettingsUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "rawResponse/completed", "params": RawResponseCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "process/outputDelta", "params": ProcessOutputDeltaNotification } | { "method": "process/exited", "params": ProcessExitedNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "remoteControl/status/changed", "params": RemoteControlStatusChangedNotification } | { "method": "externalAgentConfig/import/progress", "params": ExternalAgentConfigImportProgressNotification } | { "method": "externalAgentConfig/import/completed", "params": ExternalAgentConfigImportCompletedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "model/verification", "params": ModelVerificationNotification } | { "method": "turn/moderationMetadata", "params": TurnModerationMetadataNotification } | { "method": "model/safetyBuffering/updated", "params": ModelSafetyBufferingUpdatedNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; diff --git a/src/app-server/ServerNotificationEnvelope.ts b/src/app-server/ServerNotificationEnvelope.ts new file mode 100644 index 00000000..46c4fb06 --- /dev/null +++ b/src/app-server/ServerNotificationEnvelope.ts @@ -0,0 +1,89 @@ +// 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 { FuzzyFileSearchSessionCompletedNotification } from "./FuzzyFileSearchSessionCompletedNotification"; +import type { FuzzyFileSearchSessionUpdatedNotification } from "./FuzzyFileSearchSessionUpdatedNotification"; +import type { AccountLoginCompletedNotification } from "./v2/AccountLoginCompletedNotification"; +import type { AccountRateLimitsUpdatedNotification } from "./v2/AccountRateLimitsUpdatedNotification"; +import type { AccountUpdatedNotification } from "./v2/AccountUpdatedNotification"; +import type { AgentMessageDeltaNotification } from "./v2/AgentMessageDeltaNotification"; +import type { AppListUpdatedNotification } from "./v2/AppListUpdatedNotification"; +import type { CommandExecOutputDeltaNotification } from "./v2/CommandExecOutputDeltaNotification"; +import type { CommandExecutionOutputDeltaNotification } from "./v2/CommandExecutionOutputDeltaNotification"; +import type { ConfigWarningNotification } from "./v2/ConfigWarningNotification"; +import type { ContextCompactedNotification } from "./v2/ContextCompactedNotification"; +import type { DeprecationNoticeNotification } from "./v2/DeprecationNoticeNotification"; +import type { EnvironmentConnectionNotification } from "./v2/EnvironmentConnectionNotification"; +import type { ErrorNotification } from "./v2/ErrorNotification"; +import type { ExternalAgentConfigImportCompletedNotification } from "./v2/ExternalAgentConfigImportCompletedNotification"; +import type { ExternalAgentConfigImportProgressNotification } from "./v2/ExternalAgentConfigImportProgressNotification"; +import type { FileChangeOutputDeltaNotification } from "./v2/FileChangeOutputDeltaNotification"; +import type { FileChangePatchUpdatedNotification } from "./v2/FileChangePatchUpdatedNotification"; +import type { FsChangedNotification } from "./v2/FsChangedNotification"; +import type { GuardianWarningNotification } from "./v2/GuardianWarningNotification"; +import type { HookCompletedNotification } from "./v2/HookCompletedNotification"; +import type { HookStartedNotification } from "./v2/HookStartedNotification"; +import type { ItemCompletedNotification } from "./v2/ItemCompletedNotification"; +import type { ItemGuardianApprovalReviewCompletedNotification } from "./v2/ItemGuardianApprovalReviewCompletedNotification"; +import type { ItemGuardianApprovalReviewStartedNotification } from "./v2/ItemGuardianApprovalReviewStartedNotification"; +import type { ItemStartedNotification } from "./v2/ItemStartedNotification"; +import type { McpServerOauthLoginCompletedNotification } from "./v2/McpServerOauthLoginCompletedNotification"; +import type { McpServerStatusUpdatedNotification } from "./v2/McpServerStatusUpdatedNotification"; +import type { McpToolCallProgressNotification } from "./v2/McpToolCallProgressNotification"; +import type { ModelReroutedNotification } from "./v2/ModelReroutedNotification"; +import type { ModelSafetyBufferingUpdatedNotification } from "./v2/ModelSafetyBufferingUpdatedNotification"; +import type { ModelVerificationNotification } from "./v2/ModelVerificationNotification"; +import type { PlanDeltaNotification } from "./v2/PlanDeltaNotification"; +import type { ProcessExitedNotification } from "./v2/ProcessExitedNotification"; +import type { ProcessOutputDeltaNotification } from "./v2/ProcessOutputDeltaNotification"; +import type { RawResponseCompletedNotification } from "./v2/RawResponseCompletedNotification"; +import type { RawResponseItemCompletedNotification } from "./v2/RawResponseItemCompletedNotification"; +import type { ReasoningSummaryPartAddedNotification } from "./v2/ReasoningSummaryPartAddedNotification"; +import type { ReasoningSummaryTextDeltaNotification } from "./v2/ReasoningSummaryTextDeltaNotification"; +import type { ReasoningTextDeltaNotification } from "./v2/ReasoningTextDeltaNotification"; +import type { RemoteControlStatusChangedNotification } from "./v2/RemoteControlStatusChangedNotification"; +import type { ServerRequestResolvedNotification } from "./v2/ServerRequestResolvedNotification"; +import type { SkillsChangedNotification } from "./v2/SkillsChangedNotification"; +import type { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification"; +import type { ThreadArchivedNotification } from "./v2/ThreadArchivedNotification"; +import type { ThreadClosedNotification } from "./v2/ThreadClosedNotification"; +import type { ThreadDeletedNotification } from "./v2/ThreadDeletedNotification"; +import type { ThreadGoalClearedNotification } from "./v2/ThreadGoalClearedNotification"; +import type { ThreadGoalUpdatedNotification } from "./v2/ThreadGoalUpdatedNotification"; +import type { ThreadNameUpdatedNotification } from "./v2/ThreadNameUpdatedNotification"; +import type { ThreadRealtimeClosedNotification } from "./v2/ThreadRealtimeClosedNotification"; +import type { ThreadRealtimeErrorNotification } from "./v2/ThreadRealtimeErrorNotification"; +import type { ThreadRealtimeItemAddedNotification } from "./v2/ThreadRealtimeItemAddedNotification"; +import type { ThreadRealtimeOutputAudioDeltaNotification } from "./v2/ThreadRealtimeOutputAudioDeltaNotification"; +import type { ThreadRealtimeSdpNotification } from "./v2/ThreadRealtimeSdpNotification"; +import type { ThreadRealtimeStartedNotification } from "./v2/ThreadRealtimeStartedNotification"; +import type { ThreadRealtimeTranscriptDeltaNotification } from "./v2/ThreadRealtimeTranscriptDeltaNotification"; +import type { ThreadRealtimeTranscriptDoneNotification } from "./v2/ThreadRealtimeTranscriptDoneNotification"; +import type { ThreadSettingsUpdatedNotification } from "./v2/ThreadSettingsUpdatedNotification"; +import type { ThreadStartedNotification } from "./v2/ThreadStartedNotification"; +import type { ThreadStatusChangedNotification } from "./v2/ThreadStatusChangedNotification"; +import type { ThreadTokenUsageUpdatedNotification } from "./v2/ThreadTokenUsageUpdatedNotification"; +import type { ThreadUnarchivedNotification } from "./v2/ThreadUnarchivedNotification"; +import type { TurnCompletedNotification } from "./v2/TurnCompletedNotification"; +import type { TurnDiffUpdatedNotification } from "./v2/TurnDiffUpdatedNotification"; +import type { TurnModerationMetadataNotification } from "./v2/TurnModerationMetadataNotification"; +import type { TurnPlanUpdatedNotification } from "./v2/TurnPlanUpdatedNotification"; +import type { TurnStartedNotification } from "./v2/TurnStartedNotification"; +import type { WarningNotification } from "./v2/WarningNotification"; +import type { WindowsSandboxSetupCompletedNotification } from "./v2/WindowsSandboxSetupCompletedNotification"; +import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldWritableWarningNotification"; + +/** + * Server notification envelope sent over app-server transports. + * + * `emitted_at_ms` records when app-server emitted the notification, before it + * is fanned out to individual connections. + */ +export type ServerNotificationEnvelope = { +/** + * Unix timestamp (in milliseconds) when app-server emitted this notification. + * + * Optional so clients can decode notifications from older app-server + * versions. Current app-server versions always populate it. + */ +emittedAtMs?: number, } & ({ "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/deleted", "params": ThreadDeletedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/goal/updated", "params": ThreadGoalUpdatedNotification } | { "method": "thread/goal/cleared", "params": ThreadGoalClearedNotification } | { "method": "thread/environment/connected", "params": EnvironmentConnectionNotification } | { "method": "thread/environment/disconnected", "params": EnvironmentConnectionNotification } | { "method": "thread/settings/updated", "params": ThreadSettingsUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "rawResponse/completed", "params": RawResponseCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "process/outputDelta", "params": ProcessOutputDeltaNotification } | { "method": "process/exited", "params": ProcessExitedNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "remoteControl/status/changed", "params": RemoteControlStatusChangedNotification } | { "method": "externalAgentConfig/import/progress", "params": ExternalAgentConfigImportProgressNotification } | { "method": "externalAgentConfig/import/completed", "params": ExternalAgentConfigImportCompletedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "model/verification", "params": ModelVerificationNotification } | { "method": "turn/moderationMetadata", "params": TurnModerationMetadataNotification } | { "method": "model/safetyBuffering/updated", "params": ModelSafetyBufferingUpdatedNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }); diff --git a/src/app-server/SleepItem.ts b/src/app-server/SleepItem.ts new file mode 100644 index 00000000..b399551c --- /dev/null +++ b/src/app-server/SleepItem.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * Display item emitted by the interruptible `clock.sleep` tool. + */ +export type SleepItem = { id: string, durationMs: number, }; diff --git a/src/app-server/WebSearchItem.ts b/src/app-server/WebSearchItem.ts index bc1e6d54..9ce72a2f 100644 --- a/src/app-server/WebSearchItem.ts +++ b/src/app-server/WebSearchItem.ts @@ -1,6 +1,14 @@ // 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 { JsonValue } from "./serde_json/JsonValue"; import type { WebSearchAction } from "./v2/WebSearchAction"; -export type WebSearchItem = { id: string, query: string, action: WebSearchAction | null, }; +export type WebSearchItem = { id: string, query: string, action: WebSearchAction | null, +/** + * Structured search results returned out-of-band by standalone web search. + * + * These stay as opaque JSON at the extension/app-server boundary so new + * result fields and result types can pass through without a Codex release. + */ +results: Array | null, }; diff --git a/src/app-server/index.ts b/src/app-server/index.ts index 747a0a66..cd3b3f53 100644 --- a/src/app-server/index.ts +++ b/src/app-server/index.ts @@ -39,6 +39,7 @@ export type { ClientInfo } from "./ClientInfo"; export type { ClientNotification } from "./ClientNotification"; export type { ClientRequest } from "./ClientRequest"; export type { CodexErrorInfo } from "./CodexErrorInfo"; +export type { CodexResponseHandoffMode } from "./CodexResponseHandoffMode"; export type { CollabAgentInteractionBeginEvent } from "./CollabAgentInteractionBeginEvent"; export type { CollabAgentInteractionEndEvent } from "./CollabAgentInteractionEndEvent"; export type { CollabAgentRef } from "./CollabAgentRef"; @@ -232,6 +233,7 @@ export type { ResourceContent } from "./ResourceContent"; export type { ResourceLink } from "./ResourceLink"; export type { ResourceTemplate } from "./ResourceTemplate"; export type { ResponseItem } from "./ResponseItem"; +export type { ResponseItemId } from "./ResponseItemId"; export type { ResponseItemMetadata } from "./ResponseItemMetadata"; export type { ResumeConversationParams } from "./ResumeConversationParams"; export type { ResumeConversationResponse } from "./ResumeConversationResponse"; @@ -253,6 +255,7 @@ export type { SendUserMessageResponse } from "./SendUserMessageResponse"; export type { SendUserTurnParams } from "./SendUserTurnParams"; export type { SendUserTurnResponse } from "./SendUserTurnResponse"; export type { ServerNotification } from "./ServerNotification"; +export type { ServerNotificationEnvelope } from "./ServerNotificationEnvelope"; export type { ServerRequest } from "./ServerRequest"; export type { ServiceTier } from "./ServiceTier"; export type { SessionConfiguredEvent } from "./SessionConfiguredEvent"; @@ -270,6 +273,7 @@ export type { SkillRequestApprovalEvent } from "./SkillRequestApprovalEvent"; export type { SkillScope } from "./SkillScope"; export type { SkillToolDependency } from "./SkillToolDependency"; export type { SkillsListEntry } from "./SkillsListEntry"; +export type { SleepItem } from "./SleepItem"; export type { StepStatus } from "./StepStatus"; export type { StreamErrorEvent } from "./StreamErrorEvent"; export type { SubAgentSource } from "./SubAgentSource"; diff --git a/src/app-server/v2/Account.ts b/src/app-server/v2/Account.ts index 1b7953e5..1f1ad851 100644 --- a/src/app-server/v2/Account.ts +++ b/src/app-server/v2/Account.ts @@ -1,7 +1,6 @@ // 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 { AmazonBedrockCredentialSource } from "../AmazonBedrockCredentialSource"; import type { PlanType } from "../PlanType"; -export type Account = { "type": "apiKey", } | { "type": "chatgpt", email: string | null, planType: PlanType, } | { "type": "amazonBedrock", credentialSource: AmazonBedrockCredentialSource, }; +export type Account = { "type": "apiKey", } | { "type": "chatgpt", email: string | null, planType: PlanType, } | { "type": "amazonBedrock", usesCodexManagedCredentials: boolean, }; diff --git a/src/app-server/v2/AppToolSummary.ts b/src/app-server/v2/AppToolSummary.ts new file mode 100644 index 00000000..15677b0c --- /dev/null +++ b/src/app-server/v2/AppToolSummary.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - metadata returned by app/read. + */ +export type AppToolSummary = { name: string, title: string | null, description: string, }; diff --git a/src/app-server/v2/AppsInstalledParams.ts b/src/app-server/v2/AppsInstalledParams.ts new file mode 100644 index 00000000..d832da6d --- /dev/null +++ b/src/app-server/v2/AppsInstalledParams.ts @@ -0,0 +1,17 @@ +// 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. + +/** + * Read the committed installed connector runtime snapshot. + */ +export type AppsInstalledParams = { +/** + * Optional loaded thread id used to evaluate effective app configuration. + */ +threadId?: string | null, +/** + * When true and Apps are permitted, refresh and publish the hosted connector runtime tool + * snapshot first. + */ +forceRefresh?: boolean, }; diff --git a/src/app-server/v2/AppsInstalledResponse.ts b/src/app-server/v2/AppsInstalledResponse.ts new file mode 100644 index 00000000..4978452a --- /dev/null +++ b/src/app-server/v2/AppsInstalledResponse.ts @@ -0,0 +1,9 @@ +// 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 { InstalledApp } from "./InstalledApp"; + +/** + * The installed connectors in one committed runtime snapshot. + */ +export type AppsInstalledResponse = { apps: Array, }; diff --git a/src/app-server/v2/AppsReadParams.ts b/src/app-server/v2/AppsReadParams.ts new file mode 100644 index 00000000..4d58f86b --- /dev/null +++ b/src/app-server/v2/AppsReadParams.ts @@ -0,0 +1,17 @@ +// 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. + +/** + * EXPERIMENTAL - read metadata for specific apps/connectors. + */ +export type AppsReadParams = { +/** + * App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while + * preserving their first-request order. + */ +appIds: Array, +/** + * When true, include display-only public tool summaries in the returned metadata. + */ +includeTools?: boolean, }; diff --git a/src/app-server/v2/AppsReadResponse.ts b/src/app-server/v2/AppsReadResponse.ts new file mode 100644 index 00000000..308d7dde --- /dev/null +++ b/src/app-server/v2/AppsReadResponse.ts @@ -0,0 +1,9 @@ +// 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 { ConnectorMetadata } from "./ConnectorMetadata"; + +/** + * EXPERIMENTAL - app/read response. + */ +export type AppsReadResponse = { apps: Array, missingAppIds: Array, }; diff --git a/src/app-server/v2/ConfiguredHookHandler.ts b/src/app-server/v2/ConfiguredHookHandler.ts index 42b05cf8..38adeb2b 100644 --- a/src/app-server/v2/ConfiguredHookHandler.ts +++ b/src/app-server/v2/ConfiguredHookHandler.ts @@ -2,4 +2,11 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ConfiguredHookHandler = { "type": "command", command: string, commandWindows: string | null, timeoutSec: bigint | null, async: boolean, statusMessage: string | null, } | { "type": "prompt", } | { "type": "agent", }; +export type ConfiguredHookHandler = { "type": "command", command: string, commandWindows: string | null, timeoutSec: bigint | null, async: boolean, statusMessage: string | null, +/** + * Approximate token threshold for spilling this hook's `additionalContext` to disk. + * `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is + * evaluated against the original context; a spilled preview also includes recovery + * metadata. + */ +additionalContextLimit: number | null, } | { "type": "prompt", } | { "type": "agent", }; diff --git a/src/app-server/v2/ConnectorMetadata.ts b/src/app-server/v2/ConnectorMetadata.ts new file mode 100644 index 00000000..54c18a78 --- /dev/null +++ b/src/app-server/v2/ConnectorMetadata.ts @@ -0,0 +1,9 @@ +// 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 { AppToolSummary } from "./AppToolSummary"; + +/** + * EXPERIMENTAL - metadata returned by app/read. + */ +export type ConnectorMetadata = { id: string, name: string, description: string | null, iconUrl: string | null, iconUrlDark: string | null, distributionChannel: string | null, installUrl: string | null, pluginDisplayNames: Array, toolSummaries: Array | null, }; diff --git a/src/app-server/v2/DynamicToolCallOutputContentItem.ts b/src/app-server/v2/DynamicToolCallOutputContentItem.ts index 8f432109..9be1a809 100644 --- a/src/app-server/v2/DynamicToolCallOutputContentItem.ts +++ b/src/app-server/v2/DynamicToolCallOutputContentItem.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DynamicToolCallOutputContentItem = { "type": "inputText", text: string, } | { "type": "inputImage", imageUrl: string, }; +export type DynamicToolCallOutputContentItem = { "type": "inputText", text: string, } | { "type": "inputImage", imageUrl: string, } | { "type": "inputAudio", audioUrl: string, }; diff --git a/src/app-server/v2/EnvironmentConnectionNotification.ts b/src/app-server/v2/EnvironmentConnectionNotification.ts new file mode 100644 index 00000000..518f75c0 --- /dev/null +++ b/src/app-server/v2/EnvironmentConnectionNotification.ts @@ -0,0 +1,5 @@ +// 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 EnvironmentConnectionNotification = { threadId: string, environmentId: string, }; diff --git a/src/app-server/v2/ExternalAgentConfigDetectParams.ts b/src/app-server/v2/ExternalAgentConfigDetectParams.ts index 48b55e9b..5d43fb44 100644 --- a/src/app-server/v2/ExternalAgentConfigDetectParams.ts +++ b/src/app-server/v2/ExternalAgentConfigDetectParams.ts @@ -10,4 +10,13 @@ includeHome?: boolean, /** * Zero or more working directories to include for repo-scoped detection. */ -cwds?: Array | null, }; +cwds?: Array | null, +/** + * Deprecated field retained for compatibility. This field is ignored; use `migrationSource` + * to select the migration source. + */ +source?: string | null, +/** + * Optional migration-source selector. Missing or unrecognized values use the default source. + */ +migrationSource?: string | null, }; diff --git a/src/app-server/v2/ExternalAgentConfigImportHistoriesReadResponse.ts b/src/app-server/v2/ExternalAgentConfigImportHistoriesReadResponse.ts index 9df61f55..b48aa224 100644 --- a/src/app-server/v2/ExternalAgentConfigImportHistoriesReadResponse.ts +++ b/src/app-server/v2/ExternalAgentConfigImportHistoriesReadResponse.ts @@ -2,5 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ExternalAgentConfigImportHistory } from "./ExternalAgentConfigImportHistory"; +import type { ExternalAgentImportedConnectorCandidate } from "./ExternalAgentImportedConnectorCandidate"; -export type ExternalAgentConfigImportHistoriesReadResponse = { data: Array, }; +export type ExternalAgentConfigImportHistoriesReadResponse = { data: Array, connectors: Array, }; diff --git a/src/app-server/v2/ExternalAgentConfigImportItemTypeFailure.ts b/src/app-server/v2/ExternalAgentConfigImportItemTypeFailure.ts index 13e02bf1..f2f6ebc5 100644 --- a/src/app-server/v2/ExternalAgentConfigImportItemTypeFailure.ts +++ b/src/app-server/v2/ExternalAgentConfigImportItemTypeFailure.ts @@ -3,4 +3,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ExternalAgentConfigMigrationItemType } from "./ExternalAgentConfigMigrationItemType"; -export type ExternalAgentConfigImportItemTypeFailure = { itemType: ExternalAgentConfigMigrationItemType, errorType: string | null, failureStage: string, message: string, cwd: string | null, source: string | null, }; +export type ExternalAgentConfigImportItemTypeFailure = { itemType: ExternalAgentConfigMigrationItemType, errorType: string | null, subErrorType: string | null, failureStage: string, message: string, cwd: string | null, source: string | null, }; diff --git a/src/app-server/v2/ExternalAgentConfigImportParams.ts b/src/app-server/v2/ExternalAgentConfigImportParams.ts index be7f7ffe..8c28680b 100644 --- a/src/app-server/v2/ExternalAgentConfigImportParams.ts +++ b/src/app-server/v2/ExternalAgentConfigImportParams.ts @@ -5,6 +5,11 @@ import type { ExternalAgentConfigMigrationItem } from "./ExternalAgentConfigMigr export type ExternalAgentConfigImportParams = { migrationItems: Array, /** - * Source product that produced the migration items. Missing means unspecified. + * Optional identifier for the product that initiated the import. */ -source?: string | null, }; +source?: string | null, +/** + * Migration-source selector used to produce the migration items. Pass the same value to + * detection and import; missing or unrecognized values use the default source. + */ +migrationSource?: string | null, }; diff --git a/src/app-server/v2/ExternalAgentConfigMigrationItemType.ts b/src/app-server/v2/ExternalAgentConfigMigrationItemType.ts index d8576937..b356690e 100644 --- a/src/app-server/v2/ExternalAgentConfigMigrationItemType.ts +++ b/src/app-server/v2/ExternalAgentConfigMigrationItemType.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExternalAgentConfigMigrationItemType = "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" | "MCP_SERVER_CONFIG" | "SUBAGENTS" | "HOOKS" | "COMMANDS" | "SESSIONS"; +export type ExternalAgentConfigMigrationItemType = "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" | "MCP_SERVER_CONFIG" | "SUBAGENTS" | "HOOKS" | "COMMANDS" | "MEMORY" | "SESSIONS"; diff --git a/src/app-server/v2/ExternalAgentImportedConnectorCandidate.ts b/src/app-server/v2/ExternalAgentImportedConnectorCandidate.ts new file mode 100644 index 00000000..9aad5f5a --- /dev/null +++ b/src/app-server/v2/ExternalAgentImportedConnectorCandidate.ts @@ -0,0 +1,6 @@ +// 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 { ExternalAgentImportedConnectorSource } from "./ExternalAgentImportedConnectorSource"; + +export type ExternalAgentImportedConnectorCandidate = { name: string, sessionCount: number, source: ExternalAgentImportedConnectorSource, }; diff --git a/src/app-server/v2/ExternalAgentImportedConnectorSource.ts b/src/app-server/v2/ExternalAgentImportedConnectorSource.ts new file mode 100644 index 00000000..5398eb44 --- /dev/null +++ b/src/app-server/v2/ExternalAgentImportedConnectorSource.ts @@ -0,0 +1,5 @@ +// 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 ExternalAgentImportedConnectorSource = "remoteMcpServersConfig"; diff --git a/src/app-server/v2/FileSystemSpecialPath.ts b/src/app-server/v2/FileSystemSpecialPath.ts index f4dc2b01..10c69e3e 100644 --- a/src/app-server/v2/FileSystemSpecialPath.ts +++ b/src/app-server/v2/FileSystemSpecialPath.ts @@ -1,5 +1,6 @@ // 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 { LegacyAppPathString } from "../LegacyAppPathString"; -export type FileSystemSpecialPath = { "kind": "root" } | { "kind": "minimal" } | { "kind": "project_roots", subpath: string | null, } | { "kind": "tmpdir" } | { "kind": "slash_tmp" } | { "kind": "unknown", path: string, subpath: string | null, }; +export type FileSystemSpecialPath = { "kind": "root" } | { "kind": "minimal" } | { "kind": "project_roots", subpath: LegacyAppPathString | null, } | { "kind": "tmpdir" } | { "kind": "slash_tmp" } | { "kind": "unknown", path: string, subpath: LegacyAppPathString | null, }; diff --git a/src/app-server/v2/HookEventName.ts b/src/app-server/v2/HookEventName.ts index 47747628..ae8a7f38 100644 --- a/src/app-server/v2/HookEventName.ts +++ b/src/app-server/v2/HookEventName.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop"; +export type HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop"; diff --git a/src/app-server/v2/HookMetadata.ts b/src/app-server/v2/HookMetadata.ts index 94e3c30c..82244f0a 100644 --- a/src/app-server/v2/HookMetadata.ts +++ b/src/app-server/v2/HookMetadata.ts @@ -7,4 +7,9 @@ import type { HookHandlerType } from "./HookHandlerType"; import type { HookSource } from "./HookSource"; import type { HookTrustStatus } from "./HookTrustStatus"; -export type HookMetadata = { key: string, eventName: HookEventName, handlerType: HookHandlerType, matcher: string | null, command: string | null, timeoutSec: bigint, statusMessage: string | null, sourcePath: AbsolutePathBuf, source: HookSource, pluginId: string | null, displayOrder: bigint, enabled: boolean, isManaged: boolean, currentHash: string, trustStatus: HookTrustStatus, }; +export type HookMetadata = { key: string, eventName: HookEventName, handlerType: HookHandlerType, matcher: string | null, command: string | null, timeoutSec: bigint, statusMessage: string | null, +/** + * Configured `additionalContext` spill threshold. + * `null` uses 2,500 tokens; `0` disables spilling. + */ +additionalContextLimit: number | null, sourcePath: AbsolutePathBuf, source: HookSource, pluginId: string | null, displayOrder: bigint, enabled: boolean, isManaged: boolean, currentHash: string, trustStatus: HookTrustStatus, }; diff --git a/src/app-server/v2/InstalledApp.ts b/src/app-server/v2/InstalledApp.ts new file mode 100644 index 00000000..9fce592d --- /dev/null +++ b/src/app-server/v2/InstalledApp.ts @@ -0,0 +1,23 @@ +// 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. + +/** + * Installed connector runtime state. + */ +export type InstalledApp = { id: string, +/** + * Best-effort name carried by the runtime tool catalog. Canonical app metadata remains owned + * by `app/read`. + */ +runtimeName: string | null, +/** + * Effective enabled state after applying global, workspace, local, and managed configuration + * at read time. + */ +enabled: boolean, +/** + * Whether the connector is enabled and has a non-synthetic, model-visible tool allowed by + * effective MCP and app/tool policy in the committed runtime snapshot. + */ +callable: boolean, }; diff --git a/src/app-server/v2/LoginAccountParams.ts b/src/app-server/v2/LoginAccountParams.ts index 1606f167..41d6075e 100644 --- a/src/app-server/v2/LoginAccountParams.ts +++ b/src/app-server/v2/LoginAccountParams.ts @@ -19,4 +19,4 @@ chatgptAccountId: string, * When `null`, Codex attempts to derive the plan type from access-token * claims. If unavailable, the plan defaults to `unknown`. */ -chatgptPlanType?: string | null, }; +chatgptPlanType?: string | null, } | { "type": "amazonBedrock", apiKey: string, region: string, }; diff --git a/src/app-server/v2/LoginAccountResponse.ts b/src/app-server/v2/LoginAccountResponse.ts index 34bccd65..5a9f34ea 100644 --- a/src/app-server/v2/LoginAccountResponse.ts +++ b/src/app-server/v2/LoginAccountResponse.ts @@ -14,4 +14,4 @@ verificationUrl: string, /** * One-time code the user must enter after signing in. */ -userCode: string, } | { "type": "chatgptAuthTokens", }; +userCode: string, } | { "type": "chatgptAuthTokens", } | { "type": "amazonBedrock", }; diff --git a/src/app-server/v2/ManagedHooksRequirements.ts b/src/app-server/v2/ManagedHooksRequirements.ts index 1143bd01..6d49d5f0 100644 --- a/src/app-server/v2/ManagedHooksRequirements.ts +++ b/src/app-server/v2/ManagedHooksRequirements.ts @@ -3,4 +3,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ConfiguredHookMatcherGroup } from "./ConfiguredHookMatcherGroup"; -export type ManagedHooksRequirements = { managedDir: string | null, windowsManagedDir: string | null, PreToolUse: Array, PermissionRequest: Array, PostToolUse: Array, PreCompact: Array, PostCompact: Array, SessionStart: Array, UserPromptSubmit: Array, SubagentStart: Array, SubagentStop: Array, Stop: Array, }; +export type ManagedHooksRequirements = { managedDir: string | null, windowsManagedDir: string | null, PreToolUse: Array, PermissionRequest: Array, PostToolUse: Array, PreCompact: Array, PostCompact: Array, SessionStart: Array, SessionEnd: Array, UserPromptSubmit: Array, SubagentStart: Array, SubagentStop: Array, Stop: Array, }; diff --git a/src/app-server/v2/McpToolCallAppContext.ts b/src/app-server/v2/McpToolCallAppContext.ts index e4bc5a11..28c28453 100644 --- a/src/app-server/v2/McpToolCallAppContext.ts +++ b/src/app-server/v2/McpToolCallAppContext.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type McpToolCallAppContext = { connectorId: string, linkId: string | null, resourceUri: string | null, appName: string | null, templateId: string | null, actionName: string | null, }; +export type McpToolCallAppContext = { connectorId: string, linkId: string | null, resourceUri: string | null, appName: string | null, actionName: string | null, }; diff --git a/src/app-server/v2/MigrationDetails.ts b/src/app-server/v2/MigrationDetails.ts index 21f77984..3c99c3e7 100644 --- a/src/app-server/v2/MigrationDetails.ts +++ b/src/app-server/v2/MigrationDetails.ts @@ -9,4 +9,4 @@ import type { SessionMigration } from "./SessionMigration"; import type { SkillMigration } from "./SkillMigration"; import type { SubagentMigration } from "./SubagentMigration"; -export type MigrationDetails = { plugins: Array, skills: Array, sessions: Array, mcpServers: Array, hooks: Array, subagents: Array, commands: Array, }; +export type MigrationDetails = { plugins: Array, skills: Array, sessions: Array, mcpServers: Array, hooks: Array, subagents: Array, commands: Array, memory?: Array, }; diff --git a/src/app-server/v2/PluginDetail.ts b/src/app-server/v2/PluginDetail.ts index ab2e3fd5..d4bf3f82 100644 --- a/src/app-server/v2/PluginDetail.ts +++ b/src/app-server/v2/PluginDetail.ts @@ -6,6 +6,7 @@ import type { AppSummary } from "./AppSummary"; import type { AppTemplateSummary } from "./AppTemplateSummary"; import type { PluginHookSummary } from "./PluginHookSummary"; import type { PluginSummary } from "./PluginSummary"; +import type { ScheduledTaskSummary } from "./ScheduledTaskSummary"; import type { SkillSummary } from "./SkillSummary"; -export type PluginDetail = { marketplaceName: string, marketplacePath: AbsolutePathBuf | null, summary: PluginSummary, shareUrl: string | null, description: string | null, skills: Array, hooks: Array, apps: Array, appTemplates: Array, mcpServers: Array, }; +export type PluginDetail = { marketplaceName: string, marketplacePath: AbsolutePathBuf | null, summary: PluginSummary, shareUrl: string | null, description: string | null, skills: Array, hooks: Array, apps: Array, appTemplates: Array, mcpServers: Array, scheduledTasks: Array | null, }; diff --git a/src/app-server/v2/PluginShareUpdateDiscoverability.ts b/src/app-server/v2/PluginShareUpdateDiscoverability.ts index fd601987..767acae9 100644 --- a/src/app-server/v2/PluginShareUpdateDiscoverability.ts +++ b/src/app-server/v2/PluginShareUpdateDiscoverability.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE"; +export type PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED"; diff --git a/src/app-server/v2/PluginSummary.ts b/src/app-server/v2/PluginSummary.ts index 10fd5aa2..b02eba16 100644 --- a/src/app-server/v2/PluginSummary.ts +++ b/src/app-server/v2/PluginSummary.ts @@ -25,7 +25,7 @@ localVersion: string | null, name: string, /** * Remote sharing context associated with this plugin when available. */ -shareContext: PluginShareContext | null, source: PluginSource, installed: boolean, enabled: boolean, installPolicy: PluginInstallPolicy, installPolicySource: PluginInstallPolicySource | null, authPolicy: PluginAuthPolicy, +shareContext: PluginShareContext | null, source: PluginSource, installed: boolean, enabled: boolean, installPolicy: PluginInstallPolicy, installPolicySource: PluginInstallPolicySource | null, mustShowInstallationInterstitial: boolean | null, authPolicy: PluginAuthPolicy, /** * Availability state for installing and using the plugin. */ diff --git a/src/app-server/v2/RateLimitSnapshot.ts b/src/app-server/v2/RateLimitSnapshot.ts index c1e3953d..13c1604b 100644 --- a/src/app-server/v2/RateLimitSnapshot.ts +++ b/src/app-server/v2/RateLimitSnapshot.ts @@ -7,4 +7,8 @@ import type { RateLimitReachedType } from "./RateLimitReachedType"; import type { RateLimitWindow } from "./RateLimitWindow"; import type { SpendControlLimitSnapshot } from "./SpendControlLimitSnapshot"; -export type RateLimitSnapshot = { limitId: string | null, limitName: string | null, primary: RateLimitWindow | null, secondary: RateLimitWindow | null, credits: CreditsSnapshot | null, individualLimit: SpendControlLimitSnapshot | null, planType: PlanType | null, rateLimitReachedType: RateLimitReachedType | null, }; +export type RateLimitSnapshot = { limitId: string | null, limitName: string | null, primary: RateLimitWindow | null, secondary: RateLimitWindow | null, credits: CreditsSnapshot | null, individualLimit: SpendControlLimitSnapshot | null, +/** + * Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery. + */ +spendControlReached: boolean | null, planType: PlanType | null, rateLimitReachedType: RateLimitReachedType | null, }; diff --git a/src/app-server/v2/RawResponseCompletedNotification.ts b/src/app-server/v2/RawResponseCompletedNotification.ts new file mode 100644 index 00000000..b06e74b4 --- /dev/null +++ b/src/app-server/v2/RawResponseCompletedNotification.ts @@ -0,0 +1,10 @@ +// 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 { TokenUsageBreakdown } from "./TokenUsageBreakdown"; + +/** + * Internal-only notification containing the exact usage from one upstream + * Responses API completion. + */ +export type RawResponseCompletedNotification = { threadId: string, turnId: string, responseId: string, usage: TokenUsageBreakdown | null, }; diff --git a/src/app-server/v2/ScheduledTaskSchedule.ts b/src/app-server/v2/ScheduledTaskSchedule.ts new file mode 100644 index 00000000..c8171273 --- /dev/null +++ b/src/app-server/v2/ScheduledTaskSchedule.ts @@ -0,0 +1,6 @@ +// 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 { ScheduledTaskWeekday } from "./ScheduledTaskWeekday"; + +export type ScheduledTaskSchedule = { "type": "hourly", intervalHours: number, days: Array | null, } | { "type": "daily", time: string, } | { "type": "weekdays", time: string, } | { "type": "weekly", days: Array, time: string, }; diff --git a/src/app-server/v2/ScheduledTaskSummary.ts b/src/app-server/v2/ScheduledTaskSummary.ts new file mode 100644 index 00000000..91f7f954 --- /dev/null +++ b/src/app-server/v2/ScheduledTaskSummary.ts @@ -0,0 +1,6 @@ +// 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 { ScheduledTaskSchedule } from "./ScheduledTaskSchedule"; + +export type ScheduledTaskSummary = { key: string, name: string, prompt: string, schedule: ScheduledTaskSchedule, }; diff --git a/src/app-server/v2/ScheduledTaskWeekday.ts b/src/app-server/v2/ScheduledTaskWeekday.ts new file mode 100644 index 00000000..bf21096a --- /dev/null +++ b/src/app-server/v2/ScheduledTaskWeekday.ts @@ -0,0 +1,5 @@ +// 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 ScheduledTaskWeekday = "MO" | "TU" | "WE" | "TH" | "FR" | "SA" | "SU"; diff --git a/src/app-server/v2/ThreadItem.ts b/src/app-server/v2/ThreadItem.ts index a4453855..df1a5dbe 100644 --- a/src/app-server/v2/ThreadItem.ts +++ b/src/app-server/v2/ThreadItem.ts @@ -5,6 +5,7 @@ import type { ImageGenerationItem } from "../ImageGenerationItem"; import type { LegacyAppPathString } from "../LegacyAppPathString"; import type { MessagePhase } from "../MessagePhase"; import type { ReasoningEffort } from "../ReasoningEffort"; +import type { SleepItem } from "../SleepItem"; import type { WebSearchItem } from "../WebSearchItem"; import type { JsonValue } from "../serde_json/JsonValue"; import type { CollabAgentState } from "./CollabAgentState"; @@ -105,4 +106,4 @@ reasoningEffort: ReasoningEffort | null, /** * Last known status of the target agents, when available. */ -agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "subAgentActivity", id: string, kind: SubAgentActivityKind, agentThreadId: string, agentPath: string, } | { "type": "webSearch" } & WebSearchItem | { "type": "imageView", id: string, path: LegacyAppPathString, } | { "type": "sleep", id: string, durationMs: number, } | { "type": "imageGeneration" } & ImageGenerationItem | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, }; +agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "subAgentActivity", id: string, kind: SubAgentActivityKind, agentThreadId: string, agentPath: string, } | { "type": "webSearch" } & WebSearchItem | { "type": "imageView", id: string, path: LegacyAppPathString, } | { "type": "sleep" } & SleepItem | { "type": "imageGeneration" } & ImageGenerationItem | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, }; diff --git a/src/app-server/v2/ThreadItemEntry.ts b/src/app-server/v2/ThreadItemEntry.ts new file mode 100644 index 00000000..c59564f2 --- /dev/null +++ b/src/app-server/v2/ThreadItemEntry.ts @@ -0,0 +1,10 @@ +// 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 { ThreadItem } from "./ThreadItem"; + +export type ThreadItemEntry = { +/** + * Turn containing this item. + */ +turnId: string, item: ThreadItem, }; diff --git a/src/app-server/v2/ThreadRealtimeInitialItem.ts b/src/app-server/v2/ThreadRealtimeInitialItem.ts new file mode 100644 index 00000000..6801b94f --- /dev/null +++ b/src/app-server/v2/ThreadRealtimeInitialItem.ts @@ -0,0 +1,9 @@ +// 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 { ConversationTextRole } from "../ConversationTextRole"; + +/** + * EXPERIMENTAL - role-bearing text item included when a realtime V3 session starts. + */ +export type ThreadRealtimeInitialItem = { role: ConversationTextRole, text: string, }; diff --git a/src/app-server/v2/TokenUsageBreakdown.ts b/src/app-server/v2/TokenUsageBreakdown.ts index 1d4e408f..dbb1b1fb 100644 --- a/src/app-server/v2/TokenUsageBreakdown.ts +++ b/src/app-server/v2/TokenUsageBreakdown.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type TokenUsageBreakdown = { totalTokens: number, inputTokens: number, cachedInputTokens: number, outputTokens: number, reasoningOutputTokens: number, }; +export type TokenUsageBreakdown = { totalTokens: number, inputTokens: number, cachedInputTokens: number, cacheWriteInputTokens: number, outputTokens: number, reasoningOutputTokens: number, }; diff --git a/src/app-server/v2/TurnEnvironmentParams.ts b/src/app-server/v2/TurnEnvironmentParams.ts index cb93ba39..f51fcf33 100644 --- a/src/app-server/v2/TurnEnvironmentParams.ts +++ b/src/app-server/v2/TurnEnvironmentParams.ts @@ -3,4 +3,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { LegacyAppPathString } from "../LegacyAppPathString"; -export type TurnEnvironmentParams = { environmentId: string, cwd: LegacyAppPathString, }; +export type TurnEnvironmentParams = { environmentId: string, cwd: LegacyAppPathString, +/** + * Environment-native runtime workspace roots. Omitted defaults to `cwd`. + */ +runtimeWorkspaceRoots?: Array | null, }; diff --git a/src/app-server/v2/UserInput.ts b/src/app-server/v2/UserInput.ts index 2ac37c52..c268cb4f 100644 --- a/src/app-server/v2/UserInput.ts +++ b/src/app-server/v2/UserInput.ts @@ -8,4 +8,4 @@ export type UserInput = { "type": "text", text: string, /** * UI-defined spans within `text` used to render or persist special elements. */ -text_elements: Array, } | { "type": "image", detail?: ImageDetail, url: string, } | { "type": "localImage", detail?: ImageDetail, path: string, } | { "type": "skill", name: string, path: string, } | { "type": "mention", name: string, path: string, }; +text_elements: Array, } | { "type": "image", detail?: ImageDetail, url: string, } | { "type": "localImage", detail?: ImageDetail, path: string, } | { "type": "audio", url: string, } | { "type": "localAudio", path: string, } | { "type": "skill", name: string, path: string, } | { "type": "mention", name: string, path: string, }; diff --git a/src/app-server/v2/index.ts b/src/app-server/v2/index.ts index ab1d684c..ccfc604f 100644 --- a/src/app-server/v2/index.ts +++ b/src/app-server/v2/index.ts @@ -29,13 +29,18 @@ export type { AppSummary } from "./AppSummary"; export type { AppTemplateSummary } from "./AppTemplateSummary"; export type { AppTemplateUnavailableReason } from "./AppTemplateUnavailableReason"; export type { AppToolApproval } from "./AppToolApproval"; +export type { AppToolSummary } from "./AppToolSummary"; export type { AppToolsConfig } from "./AppToolsConfig"; export type { ApprovalDecision } from "./ApprovalDecision"; export type { ApprovalsReviewer } from "./ApprovalsReviewer"; export type { AppsConfig } from "./AppsConfig"; export type { AppsDefaultConfig } from "./AppsDefaultConfig"; +export type { AppsInstalledParams } from "./AppsInstalledParams"; +export type { AppsInstalledResponse } from "./AppsInstalledResponse"; export type { AppsListParams } from "./AppsListParams"; export type { AppsListResponse } from "./AppsListResponse"; +export type { AppsReadParams } from "./AppsReadParams"; +export type { AppsReadResponse } from "./AppsReadResponse"; export type { AskForApproval } from "./AskForApproval"; export type { AttestationGenerateParams } from "./AttestationGenerateParams"; export type { AttestationGenerateResponse } from "./AttestationGenerateResponse"; @@ -93,6 +98,7 @@ export type { ConfigWarningNotification } from "./ConfigWarningNotification"; export type { ConfigWriteResponse } from "./ConfigWriteResponse"; export type { ConfiguredHookHandler } from "./ConfiguredHookHandler"; export type { ConfiguredHookMatcherGroup } from "./ConfiguredHookMatcherGroup"; +export type { ConnectorMetadata } from "./ConnectorMetadata"; export type { ConsumeAccountRateLimitResetCreditOutcome } from "./ConsumeAccountRateLimitResetCreditOutcome"; export type { ConsumeAccountRateLimitResetCreditParams } from "./ConsumeAccountRateLimitResetCreditParams"; export type { ConsumeAccountRateLimitResetCreditResponse } from "./ConsumeAccountRateLimitResetCreditResponse"; @@ -117,6 +123,7 @@ export type { DynamicToolFunctionSpec } from "./DynamicToolFunctionSpec"; export type { DynamicToolNamespaceSpec } from "./DynamicToolNamespaceSpec"; export type { DynamicToolNamespaceTool } from "./DynamicToolNamespaceTool"; export type { DynamicToolSpec } from "./DynamicToolSpec"; +export type { EnvironmentConnectionNotification } from "./EnvironmentConnectionNotification"; export type { ErrorNotification } from "./ErrorNotification"; export type { ExecPolicyAmendment } from "./ExecPolicyAmendment"; export type { ExperimentalFeature } from "./ExperimentalFeature"; @@ -138,6 +145,8 @@ export type { ExternalAgentConfigImportResponse } from "./ExternalAgentConfigImp export type { ExternalAgentConfigImportTypeResult } from "./ExternalAgentConfigImportTypeResult"; export type { ExternalAgentConfigMigrationItem } from "./ExternalAgentConfigMigrationItem"; export type { ExternalAgentConfigMigrationItemType } from "./ExternalAgentConfigMigrationItemType"; +export type { ExternalAgentImportedConnectorCandidate } from "./ExternalAgentImportedConnectorCandidate"; +export type { ExternalAgentImportedConnectorSource } from "./ExternalAgentImportedConnectorSource"; export type { FeedbackUploadParams } from "./FeedbackUploadParams"; export type { FeedbackUploadResponse } from "./FeedbackUploadResponse"; export type { FileChangeApprovalDecision } from "./FileChangeApprovalDecision"; @@ -206,6 +215,7 @@ export type { HookTrustStatus } from "./HookTrustStatus"; export type { HooksListEntry } from "./HooksListEntry"; export type { HooksListParams } from "./HooksListParams"; export type { HooksListResponse } from "./HooksListResponse"; +export type { InstalledApp } from "./InstalledApp"; export type { ItemCompletedNotification } from "./ItemCompletedNotification"; export type { ItemGuardianApprovalReviewCompletedNotification } from "./ItemGuardianApprovalReviewCompletedNotification"; export type { ItemGuardianApprovalReviewStartedNotification } from "./ItemGuardianApprovalReviewStartedNotification"; @@ -373,6 +383,7 @@ export type { RateLimitResetCreditsSummary } from "./RateLimitResetCreditsSummar export type { RateLimitResetType } from "./RateLimitResetType"; export type { RateLimitSnapshot } from "./RateLimitSnapshot"; export type { RateLimitWindow } from "./RateLimitWindow"; +export type { RawResponseCompletedNotification } from "./RawResponseCompletedNotification"; export type { RawResponseItemCompletedNotification } from "./RawResponseItemCompletedNotification"; export type { ReadOnlyAccess } from "./ReadOnlyAccess"; export type { ReasoningEffortOption } from "./ReasoningEffortOption"; @@ -396,6 +407,9 @@ export type { SandboxCommandAssessment } from "./SandboxCommandAssessment"; export type { SandboxMode } from "./SandboxMode"; export type { SandboxPolicy } from "./SandboxPolicy"; export type { SandboxWorkspaceWrite } from "./SandboxWorkspaceWrite"; +export type { ScheduledTaskSchedule } from "./ScheduledTaskSchedule"; +export type { ScheduledTaskSummary } from "./ScheduledTaskSummary"; +export type { ScheduledTaskWeekday } from "./ScheduledTaskWeekday"; export type { SelectedCapabilityRoot } from "./SelectedCapabilityRoot"; export type { SendAddCreditsNudgeEmailParams } from "./SendAddCreditsNudgeEmailParams"; export type { SendAddCreditsNudgeEmailResponse } from "./SendAddCreditsNudgeEmailResponse"; @@ -466,6 +480,7 @@ export type { ThreadHistoryMode } from "./ThreadHistoryMode"; export type { ThreadInjectItemsParams } from "./ThreadInjectItemsParams"; export type { ThreadInjectItemsResponse } from "./ThreadInjectItemsResponse"; export type { ThreadItem } from "./ThreadItem"; +export type { ThreadItemEntry } from "./ThreadItemEntry"; export type { ThreadListParams } from "./ThreadListParams"; export type { ThreadListResponse } from "./ThreadListResponse"; export type { ThreadLoadedListParams } from "./ThreadLoadedListParams"; @@ -479,6 +494,7 @@ export type { ThreadReadResponse } from "./ThreadReadResponse"; export type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk"; export type { ThreadRealtimeClosedNotification } from "./ThreadRealtimeClosedNotification"; export type { ThreadRealtimeErrorNotification } from "./ThreadRealtimeErrorNotification"; +export type { ThreadRealtimeInitialItem } from "./ThreadRealtimeInitialItem"; export type { ThreadRealtimeItemAddedNotification } from "./ThreadRealtimeItemAddedNotification"; export type { ThreadRealtimeOutputAudioDeltaNotification } from "./ThreadRealtimeOutputAudioDeltaNotification"; export type { ThreadRealtimeSdpNotification } from "./ThreadRealtimeSdpNotification"; From ca7cbfa08b1a039b6aea78dc9b2c7a1d49ae477f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Jul 2026 07:39:54 +0000 Subject: [PATCH 2/2] Fix types and tests after Codex update --- src/CodexEventHandler.ts | 3 ++ src/CodexToolCallMapper.ts | 13 +++++-- .../CodexACPAgent/CodexAcpClient.test.ts | 2 ++ .../CodexACPAgent/token-usage-events.test.ts | 34 +++++++++++-------- .../CodexACPAgent/web-search-events.test.ts | 4 +++ 5 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/CodexEventHandler.ts b/src/CodexEventHandler.ts index 9b83a1d6..5739e44e 100644 --- a/src/CodexEventHandler.ts +++ b/src/CodexEventHandler.ts @@ -190,6 +190,8 @@ export class CodexEventHandler { return this.createTerminalInteractionEvent(notification.params); // ignored events case "thread/deleted": + case "thread/environment/connected": + case "thread/environment/disconnected": case "command/exec/outputDelta": case "hook/started": case "hook/completed": @@ -219,6 +221,7 @@ export class CodexEventHandler { case "mcpServer/oauthLogin/completed": case "externalAgentConfig/import/completed": case "rawResponseItem/completed": + case "rawResponse/completed": case "thread/started": case "item/plan/delta": case "remoteControl/status/changed": diff --git a/src/CodexToolCallMapper.ts b/src/CodexToolCallMapper.ts index c14612eb..3402cfc0 100644 --- a/src/CodexToolCallMapper.ts +++ b/src/CodexToolCallMapper.ts @@ -387,7 +387,7 @@ export function createWebSearchStartUpdate( kind: "search", title: formatWebSearchTitle(item), status: "in_progress", - rawInput: item, + rawInput: createWebSearchRawInput(item), }; } @@ -399,7 +399,16 @@ export function createWebSearchCompleteUpdate( toolCallId: item.id, title: formatWebSearchTitle(item), status: "completed", - rawInput: item, + rawInput: createWebSearchRawInput(item), + }; +} + +function createWebSearchRawInput(item: WebSearchItem): Record { + return { + type: item.type, + id: item.id, + query: item.query, + action: item.action, }; } diff --git a/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts b/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts index 4399afc8..d58bd594 100644 --- a/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts +++ b/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts @@ -3340,6 +3340,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { secondary: null, credits: null, individualLimit: null, + spendControlReached: null, planType: null, rateLimitReachedType: null, } @@ -3354,6 +3355,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { secondary: null, credits: null, individualLimit: null, + spendControlReached: null, planType: null, rateLimitReachedType: null, } diff --git a/src/__tests__/CodexACPAgent/token-usage-events.test.ts b/src/__tests__/CodexACPAgent/token-usage-events.test.ts index 2025b2d2..dc49c1fc 100644 --- a/src/__tests__/CodexACPAgent/token-usage-events.test.ts +++ b/src/__tests__/CodexACPAgent/token-usage-events.test.ts @@ -60,6 +60,7 @@ describe('Token Usage Events', () => { totalTokens: 5000, inputTokens: 4000, cachedInputTokens: 1000, + cacheWriteInputTokens: 0, outputTokens: 900, reasoningOutputTokens: 100, }, @@ -67,6 +68,7 @@ describe('Token Usage Events', () => { totalTokens: 2500, inputTokens: 2000, cachedInputTokens: 500, + cacheWriteInputTokens: 0, outputTokens: 450, reasoningOutputTokens: 50, }, @@ -91,6 +93,7 @@ describe('Token Usage Events', () => { totalTokens: 3000, inputTokens: 2500, cachedInputTokens: 0, + cacheWriteInputTokens: 0, outputTokens: 500, reasoningOutputTokens: 0, }, @@ -98,6 +101,7 @@ describe('Token Usage Events', () => { totalTokens: 1500, inputTokens: 1200, cachedInputTokens: 0, + cacheWriteInputTokens: 0, outputTokens: 300, reasoningOutputTokens: 0, }, @@ -132,18 +136,18 @@ describe('Token Usage Events', () => { it('should use last token usage from multiple updates', async () => { const notifications: ServerNotification[] = [ createTokenUsageNotification(sessionId, { - total: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, - last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, + total: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, + last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, modelContextWindow: 128000, }), createTokenUsageNotification(sessionId, { - total: { totalTokens: 2000, inputTokens: 1600, cachedInputTokens: 0, outputTokens: 400, reasoningOutputTokens: 0 }, - last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, + total: { totalTokens: 2000, inputTokens: 1600, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 400, reasoningOutputTokens: 0 }, + last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, modelContextWindow: 128000, }), createTokenUsageNotification(sessionId, { - total: { totalTokens: 3500, inputTokens: 2800, cachedInputTokens: 500, outputTokens: 600, reasoningOutputTokens: 100 }, - last: { totalTokens: 1500, inputTokens: 1200, cachedInputTokens: 500, outputTokens: 200, reasoningOutputTokens: 100 }, + total: { totalTokens: 3500, inputTokens: 2800, cachedInputTokens: 500, cacheWriteInputTokens: 0, outputTokens: 600, reasoningOutputTokens: 100 }, + last: { totalTokens: 1500, inputTokens: 1200, cachedInputTokens: 500, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 100 }, modelContextWindow: 128000, }), ]; @@ -197,6 +201,7 @@ describe('Token Usage Events', () => { totalTokens: 5000, inputTokens: 4000, cachedInputTokens: 1000, + cacheWriteInputTokens: 0, outputTokens: 900, reasoningOutputTokens: 100, }, @@ -204,6 +209,7 @@ describe('Token Usage Events', () => { totalTokens: 2500, inputTokens: 2000, cachedInputTokens: 500, + cacheWriteInputTokens: 0, outputTokens: 450, reasoningOutputTokens: 50, }, @@ -217,18 +223,18 @@ describe('Token Usage Events', () => { it('should emit latest turn usage from multiple updates', async () => { const events = await setupPromptAndReturnEvents([ createTokenUsageNotification(sessionId, { - total: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, - last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, + total: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, + last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, modelContextWindow: 128000, }), createTokenUsageNotification(sessionId, { - total: { totalTokens: 2000, inputTokens: 1600, cachedInputTokens: 0, outputTokens: 400, reasoningOutputTokens: 0 }, - last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, + total: { totalTokens: 2000, inputTokens: 1600, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 400, reasoningOutputTokens: 0 }, + last: { totalTokens: 1000, inputTokens: 800, cachedInputTokens: 0, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 0 }, modelContextWindow: 128000, }), createTokenUsageNotification(sessionId, { - total: { totalTokens: 3500, inputTokens: 2800, cachedInputTokens: 500, outputTokens: 600, reasoningOutputTokens: 100 }, - last: { totalTokens: 1500, inputTokens: 1200, cachedInputTokens: 500, outputTokens: 200, reasoningOutputTokens: 100 }, + total: { totalTokens: 3500, inputTokens: 2800, cachedInputTokens: 500, cacheWriteInputTokens: 0, outputTokens: 600, reasoningOutputTokens: 100 }, + last: { totalTokens: 1500, inputTokens: 1200, cachedInputTokens: 500, cacheWriteInputTokens: 0, outputTokens: 200, reasoningOutputTokens: 100 }, modelContextWindow: 128000, }), ])(); @@ -239,8 +245,8 @@ describe('Token Usage Events', () => { it('should skip usage_update when model context window is unavailable', async () => { const events = await setupPromptAndReturnEvents([ createTokenUsageNotification(sessionId, { - total: { totalTokens: 5000, inputTokens: 4000, cachedInputTokens: 1000, outputTokens: 900, reasoningOutputTokens: 100 }, - last: { totalTokens: 2500, inputTokens: 2000, cachedInputTokens: 500, outputTokens: 450, reasoningOutputTokens: 50 }, + total: { totalTokens: 5000, inputTokens: 4000, cachedInputTokens: 1000, cacheWriteInputTokens: 0, outputTokens: 900, reasoningOutputTokens: 100 }, + last: { totalTokens: 2500, inputTokens: 2000, cachedInputTokens: 500, cacheWriteInputTokens: 0, outputTokens: 450, reasoningOutputTokens: 50 }, modelContextWindow: null, }), ])(); diff --git a/src/__tests__/CodexACPAgent/web-search-events.test.ts b/src/__tests__/CodexACPAgent/web-search-events.test.ts index da1074b1..809bb2b1 100644 --- a/src/__tests__/CodexACPAgent/web-search-events.test.ts +++ b/src/__tests__/CodexACPAgent/web-search-events.test.ts @@ -36,6 +36,7 @@ describe("CodexEventHandler - web search events", () => { type: "webSearch", id: "web-search-1", query: "agent client protocol", + results: null, action: { type: "search", query: "agent client protocol", @@ -54,6 +55,7 @@ describe("CodexEventHandler - web search events", () => { type: "webSearch", id: "web-search-1", query: "agent client protocol", + results: null, action: { type: "search", query: "agent client protocol", @@ -83,6 +85,7 @@ describe("CodexEventHandler - web search events", () => { type: "webSearch", id: "web-open-1", query: "https://agentclientprotocol.com", + results: null, action: { type: "openPage", url: "https://agentclientprotocol.com", @@ -100,6 +103,7 @@ describe("CodexEventHandler - web search events", () => { type: "webSearch", id: "web-find-1", query: "protocol", + results: null, action: { type: "findInPage", url: "https://agentclientprotocol.com/protocol",