diff --git a/package-lock.json b/package-lock.json index 464c2f1a..0642c6f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@agentclientprotocol/sdk": "^1.4.0", - "@openai/codex": "^0.153.4", + "@openai/codex": "^0.154.0", "diff": "^9.0.0", "open": "^11.0.1", "vscode-jsonrpc": "^9.0.1", @@ -901,9 +901,9 @@ } }, "node_modules/@openai/codex": { - "version": "0.153.4", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4.tgz", - "integrity": "sha512-wbHDmit7S/YvBGVX1DQmk13xtWblZ2cApeJ/pB7xDZ10Cna+DZc5ij7f0F4OxdsXN4FW1oLT48OpogUI1+8Y2w==", + "version": "0.154.0", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0.tgz", + "integrity": "sha512-FV/x1OHXYv/ifjf3mXj9ThTTAWcUZN6cGIRQRhRxkKNOPuImu1WW0c8ev1vUkE9XGH90dEnYG1tBjIkxRikg0w==", "license": "Apache-2.0", "bin": { "codex": "bin/codex.js" @@ -912,19 +912,19 @@ "node": ">=16" }, "optionalDependencies": { - "@openai/codex-darwin-arm64": "npm:@openai/codex@0.153.4-darwin-arm64", - "@openai/codex-darwin-x64": "npm:@openai/codex@0.153.4-darwin-x64", - "@openai/codex-linux-arm64": "npm:@openai/codex@0.153.4-linux-arm64", - "@openai/codex-linux-x64": "npm:@openai/codex@0.153.4-linux-x64", - "@openai/codex-win32-arm64": "npm:@openai/codex@0.153.4-win32-arm64", - "@openai/codex-win32-x64": "npm:@openai/codex@0.153.4-win32-x64" + "@openai/codex-darwin-arm64": "npm:@openai/codex@0.154.0-darwin-arm64", + "@openai/codex-darwin-x64": "npm:@openai/codex@0.154.0-darwin-x64", + "@openai/codex-linux-arm64": "npm:@openai/codex@0.154.0-linux-arm64", + "@openai/codex-linux-x64": "npm:@openai/codex@0.154.0-linux-x64", + "@openai/codex-win32-arm64": "npm:@openai/codex@0.154.0-win32-arm64", + "@openai/codex-win32-x64": "npm:@openai/codex@0.154.0-win32-x64" } }, "node_modules/@openai/codex-darwin-arm64": { "name": "@openai/codex", - "version": "0.153.4-darwin-arm64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4-darwin-arm64.tgz", - "integrity": "sha512-B1qhN3fa1ay0R0wGziXqgwSkB5icpYChNKHhtBHff/0UtSTC7z+l8aTtvMlGjH3E8HEvY3+njIJelM9CAAoVWg==", + "version": "0.154.0-darwin-arm64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0-darwin-arm64.tgz", + "integrity": "sha512-HP/vJCH/t2hB9Kg6hotN9UglClJ6/z584fal5lEP14C9gNAgAQS4/kTQC7l5V+BA3TqwDPwINSjul28cX8AYXg==", "cpu": [ "arm64" ], @@ -939,9 +939,9 @@ }, "node_modules/@openai/codex-darwin-x64": { "name": "@openai/codex", - "version": "0.153.4-darwin-x64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4-darwin-x64.tgz", - "integrity": "sha512-vnSbbPzfoDZmmyzsxswsDDXQ06IVFBzkQU7/hroB3ji93Ok2utcsq8Psfk2tjF5r9mEx8RWFJhzuTGHG26/NDA==", + "version": "0.154.0-darwin-x64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0-darwin-x64.tgz", + "integrity": "sha512-2aqz+72Hop8PF2RYglQ4JnGjm3OlRIrTykJIT0hyLeUgM6NCFy09RgTmqRCoWliKQZjEn9jjZqUEp7QujAj77g==", "cpu": [ "x64" ], @@ -956,9 +956,9 @@ }, "node_modules/@openai/codex-linux-arm64": { "name": "@openai/codex", - "version": "0.153.4-linux-arm64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4-linux-arm64.tgz", - "integrity": "sha512-QKdjYLYV4hXIuUQDP3P6F4NXuWFoKo9WUoV4nAREIx55kiUyi8UsYdsVobkeXir5n/maEQgYMCKLHVma4rNPiw==", + "version": "0.154.0-linux-arm64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0-linux-arm64.tgz", + "integrity": "sha512-KmTCB6ST484zeYlPpKP/K5P/gRaYmt6TihVD+zotoe6O9q0JSBP+FYvCz4A/zZXR7xDOHURTSjHp0sD8wWS0YQ==", "cpu": [ "arm64" ], @@ -973,9 +973,9 @@ }, "node_modules/@openai/codex-linux-x64": { "name": "@openai/codex", - "version": "0.153.4-linux-x64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4-linux-x64.tgz", - "integrity": "sha512-x1EcwBlY3AObM1VTUHNM2AzAJQsyreGdagpF+qFiYi/Oa30VBktvvG0C6tLtCzqW6hjZNWkGZQWmeVk7MuJKWg==", + "version": "0.154.0-linux-x64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0-linux-x64.tgz", + "integrity": "sha512-a4FI3A8sGtwGrOqltrPbrS2hajrHQG591EwmRfiRoLMb10VxdBtUGW4gu6IJVYENiYGA7k3P4jlRHEoCZU/s9Q==", "cpu": [ "x64" ], @@ -990,9 +990,9 @@ }, "node_modules/@openai/codex-win32-arm64": { "name": "@openai/codex", - "version": "0.153.4-win32-arm64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4-win32-arm64.tgz", - "integrity": "sha512-/FBh42976ltF1kxDoPQBg1Q6+hwChRU5/sm5dfeC8kFVQMvOCGoGeY5d8rRZGVJE8XojlXo74VQb0sHowcfgBw==", + "version": "0.154.0-win32-arm64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0-win32-arm64.tgz", + "integrity": "sha512-CRUmZnE0Y/a8aLMrrA681EytOGaPaF659wJAiI4I3hsbQjaeYBSPV7PkCjy4Qn5LR/fmwIUORVH+6JaBNQL+tw==", "cpu": [ "arm64" ], @@ -1007,9 +1007,9 @@ }, "node_modules/@openai/codex-win32-x64": { "name": "@openai/codex", - "version": "0.153.4-win32-x64", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.153.4-win32-x64.tgz", - "integrity": "sha512-lMkB43kJZH0VFr+hoXc11qqR7QtQIbkr07ALgj4urKL1osNyUyuy1iXd3Vzz2iCYvBUCSw7I0l/W1cEPGx9euQ==", + "version": "0.154.0-win32-x64", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.154.0-win32-x64.tgz", + "integrity": "sha512-Stg2KEJPIKVqPPR1wCverGOR4ey3RR3cvakR07w7FNKQUMzmHaOZomRsP2bR1qOT/67yHsks9rB+MCMfIWXcRA==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index 877c3afe..9ba9c241 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ }, "dependencies": { "@agentclientprotocol/sdk": "^1.4.0", - "@openai/codex": "^0.153.4", + "@openai/codex": "^0.154.0", "diff": "^9.0.0", "open": "^11.0.1", "vscode-jsonrpc": "^9.0.1", diff --git a/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts b/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts index fe51f160..8a324235 100644 --- a/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts +++ b/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts @@ -3527,6 +3527,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { runtimeStatus: null, pluginId: null, serverInfo: null, + toolsError: null, tools: {listFiles: {name: "listFiles", inputSchema: {type: "object"}}}, resources: [{name: "workspace", uri: "file:///workspace"}], resourceTemplates: [], @@ -3537,6 +3538,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { runtimeStatus: null, pluginId: null, serverInfo: null, + toolsError: null, tools: {}, resources: [], resourceTemplates: [], @@ -3878,6 +3880,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { spendControlReached: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, } }); rateLimits.set("limit-2", { @@ -3893,6 +3896,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { spendControlReached: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, } }); @@ -3905,6 +3909,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { it ('should refresh the complete rate-limit snapshot for status', async () => { const {mockFixture, sessionState} = setupPromptFixture(); vi.spyOn(mockFixture.getCodexAcpClient(), "getRateLimits").mockResolvedValue({ + ordinaryUsageAllowed: null, rateLimits: { limitId: "codex", limitName: "Codex", @@ -3920,6 +3925,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { spendControlReached: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, }, rateLimitsByLimitId: null, rateLimitResetCredits: null, @@ -4058,6 +4064,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { individualLimit: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, } } }); @@ -4074,6 +4081,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { individualLimit: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, } } }); @@ -4093,6 +4101,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { individualLimit: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, } }); expect(sessionState.rateLimits!.get("fast-limit")).toEqual({ @@ -4107,6 +4116,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { individualLimit: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, } }); }); @@ -4127,6 +4137,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { spendControlReached: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, }, }], ["codex_other", { @@ -4142,6 +4153,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { spendControlReached: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, }, }], ]); @@ -4164,6 +4176,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { spendControlReached: null, planType: null, rateLimitReachedType: null, + normalModelSlug: null, }, }, }); diff --git a/src/__tests__/CodexACPAgent/list-sessions.test.ts b/src/__tests__/CodexACPAgent/list-sessions.test.ts index 6df6b39a..e96a9393 100644 --- a/src/__tests__/CodexACPAgent/list-sessions.test.ts +++ b/src/__tests__/CodexACPAgent/list-sessions.test.ts @@ -17,6 +17,7 @@ describe("CodexACPAgent - list sessions", () => { sessionId: "sess-1", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "First session", ephemeral: false, @@ -46,6 +47,7 @@ describe("CodexACPAgent - list sessions", () => { sessionId: "sess-2", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "Other session", ephemeral: false, @@ -114,6 +116,7 @@ describe("CodexACPAgent - list sessions", () => { sessionId: "sess-win", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "Windows session", ephemeral: false, @@ -184,6 +187,7 @@ describe("CodexACPAgent - list sessions", () => { sessionId: "sess-1", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "Preview text", ephemeral: false, @@ -267,6 +271,7 @@ describe("CodexACPAgent - list sessions", () => { sessionId: "sess-1", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "First session", ephemeral: false, diff --git a/src/__tests__/CodexACPAgent/load-session.test.ts b/src/__tests__/CodexACPAgent/load-session.test.ts index 05440d65..87503570 100644 --- a/src/__tests__/CodexACPAgent/load-session.test.ts +++ b/src/__tests__/CodexACPAgent/load-session.test.ts @@ -22,6 +22,7 @@ describe("CodexACPAgent - loadSession", () => { sessionId: id, parentThreadId: id === "root-history" ? null : "root-history", threadSource: null, + originator: null, forkedFromId: null, preview: id, ephemeral: false, @@ -236,6 +237,7 @@ describe("CodexACPAgent - loadSession", () => { sessionId: "session-1", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "Hi", ephemeral: false, @@ -465,6 +467,7 @@ describe("CodexACPAgent - loadSession", () => { sessionId: "session-1", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "", ephemeral: false, @@ -682,6 +685,7 @@ describe("CodexACPAgent - loadSession", () => { sessionId: "session-legacy", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "List the files", ephemeral: false, @@ -823,6 +827,7 @@ describe("CodexACPAgent - loadSession", () => { sessionId: "session-1", parentThreadId: null, threadSource: null, + originator: null, forkedFromId: null, preview: "", ephemeral: false, diff --git a/src/__tests__/RateLimitsMap.test.ts b/src/__tests__/RateLimitsMap.test.ts index e379fd38..cf1ed1ea 100644 --- a/src/__tests__/RateLimitsMap.test.ts +++ b/src/__tests__/RateLimitsMap.test.ts @@ -4,6 +4,7 @@ import {createRateLimitsMap, mergeRateLimitSnapshot} from "../RateLimitsMap"; function snapshot(overrides: Partial = {}): RateLimitSnapshot { return { + normalModelSlug: null, limitId: "codex", limitName: "Codex", primary: null, @@ -23,6 +24,7 @@ describe("RateLimitsMap", () => { const fast = snapshot({limitId: "fast", limitName: "Fast"}); const result = createRateLimitsMap({ + ordinaryUsageAllowed: null, rateLimits: codex, rateLimitsByLimitId: {codex, fast}, rateLimitResetCredits: null, diff --git a/src/app-server/ClientRequest.ts b/src/app-server/ClientRequest.ts index 6907bc38..0ccca6ce 100644 --- a/src/app-server/ClientRequest.ts +++ b/src/app-server/ClientRequest.ts @@ -35,6 +35,7 @@ import type { FsUnwatchParams } from "./v2/FsUnwatchParams"; import type { FsWatchParams } from "./v2/FsWatchParams"; import type { FsWriteFileParams } from "./v2/FsWriteFileParams"; import type { GetAccountParams } from "./v2/GetAccountParams"; +import type { GetAccountRateLimitsParams } from "./v2/GetAccountRateLimitsParams"; import type { GetAccountTokenUsageParams } from "./v2/GetAccountTokenUsageParams"; import type { HooksListParams } from "./v2/HooksListParams"; import type { ListMcpServerStatusParams } from "./v2/ListMcpServerStatusParams"; @@ -101,4 +102,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/section/move", id: RequestId, params: ThreadSectionMoveParams, } | { "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/revert", id: RequestId, params: ThreadRevertParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "threadSection/list", id: RequestId, params: ThreadSectionListParams, } | { "method": "threadSection/create", id: RequestId, params: ThreadSectionCreateParams, } | { "method": "threadSection/update", id: RequestId, params: ThreadSectionUpdateParams, } | { "method": "threadSection/delete", id: RequestId, params: ThreadSectionDeleteParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/turns/list", id: RequestId, params: ThreadTurnsListParams, } | { "method": "thread/items/list", id: RequestId, params: ThreadItemsListParams, } | { "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/reconcile", id: RequestId, params: PluginReconcileParams, } | { "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?: GetAccountTokenUsageParams | 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/recordHistory", id: RequestId, params: ExternalAgentConfigImportHistoryRecordParams, } | { "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/section/move", id: RequestId, params: ThreadSectionMoveParams, } | { "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/revert", id: RequestId, params: ThreadRevertParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "threadSection/list", id: RequestId, params: ThreadSectionListParams, } | { "method": "threadSection/create", id: RequestId, params: ThreadSectionCreateParams, } | { "method": "threadSection/update", id: RequestId, params: ThreadSectionUpdateParams, } | { "method": "threadSection/delete", id: RequestId, params: ThreadSectionDeleteParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/turns/list", id: RequestId, params: ThreadTurnsListParams, } | { "method": "thread/items/list", id: RequestId, params: ThreadItemsListParams, } | { "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/reconcile", id: RequestId, params: PluginReconcileParams, } | { "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?: GetAccountRateLimitsParams | undefined, } | { "method": "account/rateLimitResetCredit/consume", id: RequestId, params: ConsumeAccountRateLimitResetCreditParams, } | { "method": "account/usage/read", id: RequestId, params?: GetAccountTokenUsageParams | 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/recordHistory", id: RequestId, params: ExternalAgentConfigImportHistoryRecordParams, } | { "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/ConfigurationReasoning.ts b/src/app-server/ConfigurationReasoning.ts new file mode 100644 index 00000000..641d7cd4 --- /dev/null +++ b/src/app-server/ConfigurationReasoning.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 { ReasoningEffort } from "./ReasoningEffort"; + +/** + * Reasoning settings interpreted by the backend for the routed model. + */ +export type ConfigurationReasoning = { effort: ReasoningEffort, }; diff --git a/src/app-server/ResponseItem.ts b/src/app-server/ResponseItem.ts index 178cd65b..80e7095f 100644 --- a/src/app-server/ResponseItem.ts +++ b/src/app-server/ResponseItem.ts @@ -2,6 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AgentMessageInputContent } from "./AgentMessageInputContent"; +import type { ConfigurationReasoning } from "./ConfigurationReasoning"; import type { ContentItem } from "./ContentItem"; import type { FunctionCallOutputBody } from "./FunctionCallOutputBody"; import type { InternalChatMessageMetadataPassthrough } from "./InternalChatMessageMetadataPassthrough"; @@ -21,4 +22,4 @@ 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?: ResponseItemId, name: string, namespace?: string, arguments: string, encrypted_function_args?: Array, 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, name?: string, namespace?: 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" }; +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, encrypted_function_args?: Array, 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, name?: string, namespace?: 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": "configuration_update", reasoning: ConfigurationReasoning, } | { "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/index.ts b/src/app-server/index.ts index 893117f7..5f128f7d 100644 --- a/src/app-server/index.ts +++ b/src/app-server/index.ts @@ -12,6 +12,7 @@ export type { ClientNotification } from "./ClientNotification"; export type { ClientRequest } from "./ClientRequest"; export type { CodexResponseHandoffMode } from "./CodexResponseHandoffMode"; export type { CollaborationMode } from "./CollaborationMode"; +export type { ConfigurationReasoning } from "./ConfigurationReasoning"; export type { ContentItem } from "./ContentItem"; export type { ConversationGitInfo } from "./ConversationGitInfo"; export type { ConversationSummary } from "./ConversationSummary"; diff --git a/src/app-server/v2/ApplicationNetworkRequirements.ts b/src/app-server/v2/ApplicationNetworkRequirements.ts new file mode 100644 index 00000000..5a10cdae --- /dev/null +++ b/src/app-server/v2/ApplicationNetworkRequirements.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 { NetworkDomainPermission } from "./NetworkDomainPermission"; + +export type ApplicationNetworkRequirements = { +/** + * When enabled, only explicitly allowed exact domains may be contacted. + */ +enabled: boolean, domains: { [key in string]?: NetworkDomainPermission }, }; diff --git a/src/app-server/v2/ApplicationRequirements.ts b/src/app-server/v2/ApplicationRequirements.ts new file mode 100644 index 00000000..65a0626f --- /dev/null +++ b/src/app-server/v2/ApplicationRequirements.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 { ApplicationNetworkRequirements } from "./ApplicationNetworkRequirements"; + +export type ApplicationRequirements = { network: ApplicationNetworkRequirements | null, }; diff --git a/src/app-server/v2/BrowserUseRequirements.ts b/src/app-server/v2/BrowserUseRequirements.ts index 894caa95..1430f756 100644 --- a/src/app-server/v2/BrowserUseRequirements.ts +++ b/src/app-server/v2/BrowserUseRequirements.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 { BrowserUseOriginPolicy } from "./BrowserUseOriginPolicy"; -export type BrowserUseRequirements = { allowHistoryAccess: boolean | null, disableAutoReview: boolean | null, allowGlobalPersistentApproval: boolean | null, defaultOriginPolicy: BrowserUseOriginPolicy | null, origins: { [key in string]?: BrowserUseOriginPolicy } | null, }; +export type BrowserUseRequirements = { allowWebmcp: boolean | null, allowHistoryAccess: boolean | null, disableAutoReview: boolean | null, allowGlobalPersistentApproval: boolean | null, defaultOriginPolicy: BrowserUseOriginPolicy | null, origins: { [key in string]?: BrowserUseOriginPolicy } | null, }; diff --git a/src/app-server/v2/GetAccountRateLimitsParams.ts b/src/app-server/v2/GetAccountRateLimitsParams.ts new file mode 100644 index 00000000..25669dcd --- /dev/null +++ b/src/app-server/v2/GetAccountRateLimitsParams.ts @@ -0,0 +1,18 @@ +// 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. + +/** + * Usage-read capabilities of the requesting client, never inferred from its experiment arm. + */ +export type GetAccountRateLimitsParams = { +/** + * The client supports automatic Luna Reserve fallback. For eligible ChatGPT CLI users, + * allow the backend to record experiment exposure after ordinary usage is blocked. + */ +supportsLunaReserve?: boolean, +/** + * Skip the separate reset-credit detail lookup for background usage polls. The usage + * response still includes the available count; omitted/false preserves detailed reads. + */ +excludeResetCreditDetails?: boolean, }; diff --git a/src/app-server/v2/GetAccountRateLimitsResponse.ts b/src/app-server/v2/GetAccountRateLimitsResponse.ts index 548bd959..73762064 100644 --- a/src/app-server/v2/GetAccountRateLimitsResponse.ts +++ b/src/app-server/v2/GetAccountRateLimitsResponse.ts @@ -6,6 +6,11 @@ import type { RateLimitResetCreditsSummary } from "./RateLimitResetCreditsSummar import type { RateLimitSnapshot } from "./RateLimitSnapshot"; export type GetAccountRateLimitsResponse = { +/** + * Backend permission for ordinary included usage, validated against the active account. + * Null means unavailable; clients must not infer recovery from percentages or reset times. + */ +ordinaryUsageAllowed: boolean | null, /** * Backward-compatible single-bucket view; mirrors the historical payload. */ diff --git a/src/app-server/v2/GuardianApprovalReviewAction.ts b/src/app-server/v2/GuardianApprovalReviewAction.ts index 8c21a9e1..675aa124 100644 --- a/src/app-server/v2/GuardianApprovalReviewAction.ts +++ b/src/app-server/v2/GuardianApprovalReviewAction.ts @@ -7,4 +7,4 @@ import type { GuardianCommandSource } from "./GuardianCommandSource"; import type { NetworkApprovalProtocol } from "./NetworkApprovalProtocol"; import type { RequestPermissionProfile } from "./RequestPermissionProfile"; -export type GuardianApprovalReviewAction = { "type": "command", source: GuardianCommandSource, command: string, cwd: AbsolutePathBuf, } | { "type": "execve", source: GuardianCommandSource, program: string, argv: Array, cwd: AbsolutePathBuf, } | { "type": "writeStdin", approvalId: string, processId: string, stdin: string, cwd: LegacyAppPathString, } | { "type": "applyPatch", cwd: AbsolutePathBuf, files: Array, } | { "type": "networkAccess", target: string, host: string, protocol: NetworkApprovalProtocol, port: number, } | { "type": "mcpToolCall", server: string, toolName: string, connectorId: string | null, connectorName: string | null, toolTitle: string | null, } | { "type": "requestPermissions", reason: string | null, permissions: RequestPermissionProfile, }; +export type GuardianApprovalReviewAction = { "type": "command", source: GuardianCommandSource, command: string, cwd: LegacyAppPathString, } | { "type": "execve", source: GuardianCommandSource, program: string, argv: Array, cwd: AbsolutePathBuf, } | { "type": "writeStdin", approvalId: string, processId: string, stdin: string, cwd: LegacyAppPathString, } | { "type": "applyPatch", cwd: LegacyAppPathString, files: Array, } | { "type": "networkAccess", target: string, host: string, protocol: NetworkApprovalProtocol, port: number, } | { "type": "mcpToolCall", server: string, toolName: string, connectorId: string | null, connectorName: string | null, toolTitle: string | null, } | { "type": "requestPermissions", reason: string | null, permissions: RequestPermissionProfile, }; diff --git a/src/app-server/v2/McpServerStatus.ts b/src/app-server/v2/McpServerStatus.ts index 9a954144..e5dcd5dc 100644 --- a/src/app-server/v2/McpServerStatus.ts +++ b/src/app-server/v2/McpServerStatus.ts @@ -12,4 +12,9 @@ export type McpServerStatus = { name: string, /** * Current thread-runtime connection state; null when unavailable or the configuration changed. */ -runtimeStatus: McpServerConnectionStatus | null, pluginId: string | null, serverInfo: McpServerInfo | null, tools: { [key in string]?: Tool }, resources: Array, resourceTemplates: Array, authStatus: McpAuthStatus, }; +runtimeStatus: McpServerConnectionStatus | null, pluginId: string | null, serverInfo: McpServerInfo | null, tools: { [key in string]?: Tool }, +/** + * Tool discovery failed and no catalog was returned. + * Null when a catalog is returned, including cached or empty catalogs. + */ +toolsError: string | null, resources: Array, resourceTemplates: Array, authStatus: McpAuthStatus, }; diff --git a/src/app-server/v2/PermissionsRequestApprovalParams.ts b/src/app-server/v2/PermissionsRequestApprovalParams.ts index d0677f5f..71b39e2f 100644 --- a/src/app-server/v2/PermissionsRequestApprovalParams.ts +++ b/src/app-server/v2/PermissionsRequestApprovalParams.ts @@ -1,11 +1,11 @@ // 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 { AbsolutePathBuf } from "../AbsolutePathBuf"; +import type { LegacyAppPathString } from "../LegacyAppPathString"; import type { RequestPermissionProfile } from "./RequestPermissionProfile"; export type PermissionsRequestApprovalParams = { threadId: string, turnId: string, itemId: string, environmentId: string | null, /** * Unix timestamp (in milliseconds) when this approval request started. */ -startedAtMs: number, cwd: AbsolutePathBuf, reason: string | null, permissions: RequestPermissionProfile, }; +startedAtMs: number, cwd: LegacyAppPathString, reason: string | null, permissions: RequestPermissionProfile, }; diff --git a/src/app-server/v2/RateLimitSnapshot.ts b/src/app-server/v2/RateLimitSnapshot.ts index 13c1604b..4740f38d 100644 --- a/src/app-server/v2/RateLimitSnapshot.ts +++ b/src/app-server/v2/RateLimitSnapshot.ts @@ -7,7 +7,11 @@ 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, +export type RateLimitSnapshot = { limitId: string | null, limitName: string | null, +/** + * Normal model whose display name and reasoning options describe this quota alias. + */ +normalModelSlug: 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. */ diff --git a/src/app-server/v2/ReviewStartParams.ts b/src/app-server/v2/ReviewStartParams.ts index 9833e08a..839a3c74 100644 --- a/src/app-server/v2/ReviewStartParams.ts +++ b/src/app-server/v2/ReviewStartParams.ts @@ -8,5 +8,7 @@ export type ReviewStartParams = { threadId: string, target: ReviewTarget, /** * Where to run the review: inline (default) on the current thread or * detached on a new thread (returned in `reviewThreadId`). + * Detached delivery is deprecated and emits `deprecationNotice`. + * Use `thread/start` followed by an inline review for a separate review thread. */ delivery?: ReviewDelivery | null, }; diff --git a/src/app-server/v2/Thread.ts b/src/app-server/v2/Thread.ts index 61e91df7..42a83674 100644 --- a/src/app-server/v2/Thread.ts +++ b/src/app-server/v2/Thread.ts @@ -74,6 +74,10 @@ cwd: AbsolutePathBuf, /** * Version of the CLI that created the thread. */ cliVersion: string, /** + * Originator recorded when the thread was created, independent of its current client or executor. + * Null when the recorded originator is unavailable. + */ +originator: string | null, /** * Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.). */ source: SessionSource, /** diff --git a/src/app-server/v2/ThreadEnvironment.ts b/src/app-server/v2/ThreadEnvironment.ts new file mode 100644 index 00000000..8784eb16 --- /dev/null +++ b/src/app-server/v2/ThreadEnvironment.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 { LegacyAppPathString } from "../LegacyAppPathString"; + +/** + * An environment selected by a loaded thread, independent of connection status. + */ +export type ThreadEnvironment = { environmentId: string, cwd: LegacyAppPathString, runtimeWorkspaceRoots: Array, }; diff --git a/src/app-server/v2/ThreadListParams.ts b/src/app-server/v2/ThreadListParams.ts index 3bff76e2..854b6ef9 100644 --- a/src/app-server/v2/ThreadListParams.ts +++ b/src/app-server/v2/ThreadListParams.ts @@ -26,6 +26,11 @@ modelProviders?: Array | null, /** * are returned. When omitted or empty, defaults to interactive sources. */ sourceKinds?: Array | null, /** + * Optional originator allowlist, matching any supplied value exactly. + * Supported by hosted backends only; the local app-server rejects a nonempty list. + * Omitted or empty lists leave originators unrestricted. + */ +originators?: Array | null, /** * Optional archived filter; when set to true, only archived threads are returned. * If false or null, only non-archived threads are returned. */ diff --git a/src/app-server/v2/index.ts b/src/app-server/v2/index.ts index fefe7233..a3595e77 100644 --- a/src/app-server/v2/index.ts +++ b/src/app-server/v2/index.ts @@ -31,6 +31,8 @@ export type { AppTemplateUnavailableReason } from "./AppTemplateUnavailableReaso export type { AppToolApproval } from "./AppToolApproval"; export type { AppToolSummary } from "./AppToolSummary"; export type { AppToolsConfig } from "./AppToolsConfig"; +export type { ApplicationNetworkRequirements } from "./ApplicationNetworkRequirements"; +export type { ApplicationRequirements } from "./ApplicationRequirements"; export type { ApprovalsReviewer } from "./ApprovalsReviewer"; export type { AppsConfig } from "./AppsConfig"; export type { AppsDefaultConfig } from "./AppsDefaultConfig"; @@ -192,6 +194,7 @@ export type { FsWatchResponse } from "./FsWatchResponse"; export type { FsWriteFileParams } from "./FsWriteFileParams"; export type { FsWriteFileResponse } from "./FsWriteFileResponse"; export type { GetAccountParams } from "./GetAccountParams"; +export type { GetAccountRateLimitsParams } from "./GetAccountRateLimitsParams"; export type { GetAccountRateLimitsResponse } from "./GetAccountRateLimitsResponse"; export type { GetAccountResponse } from "./GetAccountResponse"; export type { GetAccountTokenUsageParams } from "./GetAccountTokenUsageParams"; @@ -472,6 +475,7 @@ export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse"; export type { ThreadDeleteParams } from "./ThreadDeleteParams"; export type { ThreadDeleteResponse } from "./ThreadDeleteResponse"; export type { ThreadDeletedNotification } from "./ThreadDeletedNotification"; +export type { ThreadEnvironment } from "./ThreadEnvironment"; export type { ThreadExtra } from "./ThreadExtra"; export type { ThreadForkParams } from "./ThreadForkParams"; export type { ThreadForkResponse } from "./ThreadForkResponse";