diff --git a/package-lock.json b/package-lock.json index 88d337b7..e98b3e4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "vscode-jsonrpc": "^8.2.1" }, "devDependencies": { - "@openai/codex": "^0.92.0", + "@openai/codex": "^0.97.0", "@types/node": "^24.10.1", "mcp-hello-world": "^1.1.2", "tsx": "^4.20.6", @@ -813,9 +813,9 @@ } }, "node_modules/@openai/codex": { - "version": "0.92.0", - "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.92.0.tgz", - "integrity": "sha512-DR9A2QlJDtEpMwqUGMIztTCzzCYTVrM7rqG3XuMVURnQ4b7XrScmY5RnSUuUZ/ga7wDTqw0BTmVzPurm4NX3Tw==", + "version": "0.97.0", + "resolved": "https://registry.npmjs.org/@openai/codex/-/codex-0.97.0.tgz", + "integrity": "sha512-3bG0SFuC5nEQd5CZuIj4qV/6QyAb9mpQPKJKYNAo7NptFNifCI+hcP4a+/zjy+hNndvnvuylkCoj+BWDXq+cIA==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 466f0178..d8ca2f64 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "license": "ISC", "type": "module", "devDependencies": { - "@openai/codex": "^0.92.0", + "@openai/codex": "^0.97.0", "@types/node": "^24.10.1", "mcp-hello-world": "^1.1.2", "tsx": "^4.20.6", diff --git a/src/CodexAcpClient.ts b/src/CodexAcpClient.ts index da60b867..ed572dfd 100644 --- a/src/CodexAcpClient.ts +++ b/src/CodexAcpClient.ts @@ -51,6 +51,7 @@ export class CodexAcpClient { async initialize(request: acp.InitializeRequest): Promise { await this.codexClient.initialize({ + capabilities: null, clientInfo: { name: request.clientInfo?.name ?? this.defaultClientInfo.name, version: request.clientInfo?.version ?? this.defaultClientInfo.version, @@ -170,7 +171,6 @@ export class CodexAcpClient { developerInstructions: null, personality: null, ephemeral: null, - dynamicTools: null, experimentalRawEvents: false }); diff --git a/src/CodexApprovalHandler.ts b/src/CodexApprovalHandler.ts index a0e6803a..3b0643c0 100644 --- a/src/CodexApprovalHandler.ts +++ b/src/CodexApprovalHandler.ts @@ -61,7 +61,7 @@ export class CodexApprovalHandler implements ApprovalHandler { sessionId: string, params: CommandExecutionRequestApprovalParams ): acp.RequestPermissionRequest { - const reasonContent = this.createContentFromReason(params.reason); + const reasonContent = this.createContentFromReason(params.reason ?? null); return { sessionId, toolCall: { @@ -92,7 +92,7 @@ export class CodexApprovalHandler implements ApprovalHandler { sessionId: string, params: FileChangeRequestApprovalParams ): acp.RequestPermissionRequest { - const reasonContent = this.createContentFromReason(params.reason); + const reasonContent = this.createContentFromReason(params.reason ?? null); return { sessionId, toolCall: { diff --git a/src/CodexEventHandler.ts b/src/CodexEventHandler.ts index fead35b8..2096baec 100644 --- a/src/CodexEventHandler.ts +++ b/src/CodexEventHandler.ts @@ -129,6 +129,8 @@ export class CodexEventHandler { case "mcpServer/oauthLogin/completed": case "rawResponseItem/completed": case "thread/started": + case "thread/name/updated": + case "item/plan/delta": return null; } } @@ -170,6 +172,8 @@ export class CodexEventHandler { case "imageView": case "enteredReviewMode": case "exitedReviewMode": + case "contextCompaction": + case "plan": return null; } } @@ -202,6 +206,8 @@ export class CodexEventHandler { case "imageView": case "enteredReviewMode": case "exitedReviewMode": + case "contextCompaction": + case "plan": return null; } } diff --git a/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts b/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts index 3dfd920e..ec490b7a 100644 --- a/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts +++ b/src/__tests__/CodexACPAgent/CodexAcpClient.test.ts @@ -60,7 +60,7 @@ describe('ACP server test', { timeout: 40_000 }, () => { const newSessionResponse = await codexAcpAgent.newSession({cwd: "", mcpServers: []}); expect(newSessionResponse.sessionId).toBeDefined() - const transportDump = fixture.getCodexConnectionDump(ignoredFields); + const transportDump = fixture.getCodexConnectionDump([...ignoredFields, "upgrade"]); await expect(transportDump).toMatchFileSnapshot("data/auth-with-key.json"); }); @@ -433,6 +433,8 @@ describe('ACP server test', { timeout: 40_000 }, () => { defaultReasoningEffort: 'medium', supportsPersonality: false, isDefault: false, + upgrade: null, + inputModalities: [] }, { id: '5.1', @@ -445,6 +447,8 @@ describe('ACP server test', { timeout: 40_000 }, () => { defaultReasoningEffort: 'low', supportsPersonality: false, isDefault: true, + upgrade: null, + inputModalities: [] } ]; diff --git a/src/__tests__/CodexACPAgent/data/auth-with-key.json b/src/__tests__/CodexACPAgent/data/auth-with-key.json index 67e46277..2dfb0fe4 100644 --- a/src/__tests__/CodexACPAgent/data/auth-with-key.json +++ b/src/__tests__/CodexACPAgent/data/auth-with-key.json @@ -44,7 +44,6 @@ "developerInstructions": null, "personality": null, "ephemeral": null, - "dynamicTools": null, "experimentalRawEvents": false } } @@ -80,40 +79,60 @@ { "id": "id", "model": "model", + "upgrade": "upgrade", "displayName": "gpt-5.2-codex", "description": "Latest frontier agentic coding model.", "supportedReasoningEfforts": "supportedReasoningEfforts", "defaultReasoningEffort": "medium", + "inputModalities": [ + "text", + "image" + ], "supportsPersonality": false, "isDefault": true }, { "id": "id", "model": "model", + "upgrade": "upgrade", "displayName": "gpt-5.2", "description": "Latest frontier model with improvements across knowledge, reasoning and coding", "supportedReasoningEfforts": "supportedReasoningEfforts", "defaultReasoningEffort": "medium", + "inputModalities": [ + "text", + "image" + ], "supportsPersonality": false, "isDefault": false }, { "id": "id", "model": "model", + "upgrade": "upgrade", "displayName": "gpt-5.1-codex-max", "description": "Codex-optimized flagship for deep and fast reasoning.", "supportedReasoningEfforts": "supportedReasoningEfforts", "defaultReasoningEffort": "medium", + "inputModalities": [ + "text", + "image" + ], "supportsPersonality": false, "isDefault": false }, { "id": "id", "model": "model", + "upgrade": "upgrade", "displayName": "gpt-5.1-codex-mini", "description": "Optimized for codex. Cheaper, faster, but less capable.", "supportedReasoningEfforts": "supportedReasoningEfforts", "defaultReasoningEffort": "medium", + "inputModalities": [ + "text", + "image" + ], "supportsPersonality": false, "isDefault": false } diff --git a/src/__tests__/CodexACPAgent/model-filtering.test.ts b/src/__tests__/CodexACPAgent/model-filtering.test.ts index 1351e700..e22ba394 100644 --- a/src/__tests__/CodexACPAgent/model-filtering.test.ts +++ b/src/__tests__/CodexACPAgent/model-filtering.test.ts @@ -22,6 +22,8 @@ describe("Model filtering", () => { defaultReasoningEffort: "medium", supportsPersonality: false, isDefault: false, + upgrade: null, + inputModalities: [] }, { id: "other-id", @@ -32,6 +34,8 @@ describe("Model filtering", () => { defaultReasoningEffort: "medium", supportsPersonality: false, isDefault: false, + upgrade: null, + inputModalities: [] }, { id: "gpt-5.1-codex-mini", @@ -42,6 +46,8 @@ describe("Model filtering", () => { defaultReasoningEffort: "medium", supportsPersonality: false, isDefault: false, + upgrade: null, + inputModalities: [] }, { id: "gpt-4o", @@ -52,6 +58,8 @@ describe("Model filtering", () => { defaultReasoningEffort: "medium", supportsPersonality: false, isDefault: false, + upgrade: null, + inputModalities: [] }, ]; diff --git a/src/app-server/AuthMode.ts b/src/app-server/AuthMode.ts index 4f4d1539..5e0cad88 100644 --- a/src/app-server/AuthMode.ts +++ b/src/app-server/AuthMode.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type AuthMode = "apikey" | "chatgpt"; +/** + * Authentication mode for OpenAI-backed providers. + */ +export type AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; diff --git a/src/app-server/CallToolResult.ts b/src/app-server/CallToolResult.ts index 6c6b590d..e7a471d4 100644 --- a/src/app-server/CallToolResult.ts +++ b/src/app-server/CallToolResult.ts @@ -1,10 +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 { ContentBlock } from "./ContentBlock"; import type { JsonValue } from "./serde_json/JsonValue"; /** * The server's response to a tool call. */ -export type CallToolResult = { content: Array, isError?: boolean, structuredContent?: JsonValue, }; +export type CallToolResult = { content: Array, structuredContent?: JsonValue, isError?: boolean, _meta?: JsonValue, }; diff --git a/src/app-server/ClientRequest.ts b/src/app-server/ClientRequest.ts index 6b769040..176f86be 100644 --- a/src/app-server/ClientRequest.ts +++ b/src/app-server/ClientRequest.ts @@ -23,7 +23,6 @@ import type { SendUserTurnParams } from "./SendUserTurnParams"; import type { SetDefaultModelParams } from "./SetDefaultModelParams"; import type { AppsListParams } from "./v2/AppsListParams"; import type { CancelLoginAccountParams } from "./v2/CancelLoginAccountParams"; -import type { CollaborationModeListParams } from "./v2/CollaborationModeListParams"; import type { CommandExecParams } from "./v2/CommandExecParams"; import type { ConfigBatchWriteParams } from "./v2/ConfigBatchWriteParams"; import type { ConfigReadParams } from "./v2/ConfigReadParams"; @@ -37,13 +36,17 @@ import type { ModelListParams } from "./v2/ModelListParams"; import type { ReviewStartParams } from "./v2/ReviewStartParams"; import type { SkillsConfigWriteParams } from "./v2/SkillsConfigWriteParams"; import type { SkillsListParams } from "./v2/SkillsListParams"; +import type { SkillsRemoteReadParams } from "./v2/SkillsRemoteReadParams"; +import type { SkillsRemoteWriteParams } from "./v2/SkillsRemoteWriteParams"; import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams"; +import type { ThreadCompactStartParams } from "./v2/ThreadCompactStartParams"; import type { ThreadForkParams } from "./v2/ThreadForkParams"; import type { ThreadListParams } from "./v2/ThreadListParams"; import type { ThreadLoadedListParams } from "./v2/ThreadLoadedListParams"; import type { ThreadReadParams } from "./v2/ThreadReadParams"; import type { ThreadResumeParams } from "./v2/ThreadResumeParams"; import type { ThreadRollbackParams } from "./v2/ThreadRollbackParams"; +import type { ThreadSetNameParams } from "./v2/ThreadSetNameParams"; import type { ThreadStartParams } from "./v2/ThreadStartParams"; import type { ThreadUnarchiveParams } from "./v2/ThreadUnarchiveParams"; import type { TurnInterruptParams } from "./v2/TurnInterruptParams"; @@ -52,4 +55,4 @@ import type { TurnStartParams } from "./v2/TurnStartParams"; /** * 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/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "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": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "collaborationMode/list", id: RequestId, params: CollaborationModeListParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "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": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "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": "newConversation", id: RequestId, params: NewConversationParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "listConversations", id: RequestId, params: ListConversationsParams, } | { "method": "resumeConversation", id: RequestId, params: ResumeConversationParams, } | { "method": "forkConversation", id: RequestId, params: ForkConversationParams, } | { "method": "archiveConversation", id: RequestId, params: ArchiveConversationParams, } | { "method": "sendUserMessage", id: RequestId, params: SendUserMessageParams, } | { "method": "sendUserTurn", id: RequestId, params: SendUserTurnParams, } | { "method": "interruptConversation", id: RequestId, params: InterruptConversationParams, } | { "method": "addConversationListener", id: RequestId, params: AddConversationListenerParams, } | { "method": "removeConversationListener", id: RequestId, params: RemoveConversationListenerParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "loginApiKey", id: RequestId, params: LoginApiKeyParams, } | { "method": "loginChatGpt", id: RequestId, params: undefined, } | { "method": "cancelLoginChatGpt", id: RequestId, params: CancelLoginChatGptParams, } | { "method": "logoutChatGpt", id: RequestId, params: undefined, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "getUserSavedConfig", id: RequestId, params: undefined, } | { "method": "setDefaultModel", id: RequestId, params: SetDefaultModelParams, } | { "method": "getUserAgent", id: RequestId, params: undefined, } | { "method": "userInfo", id: RequestId, params: undefined, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, } | { "method": "execOneOffCommand", id: RequestId, params: ExecOneOffCommandParams, }; +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/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "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": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "skills/remote/read", id: RequestId, params: SkillsRemoteReadParams, } | { "method": "skills/remote/write", id: RequestId, params: SkillsRemoteWriteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "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": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "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": "newConversation", id: RequestId, params: NewConversationParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "listConversations", id: RequestId, params: ListConversationsParams, } | { "method": "resumeConversation", id: RequestId, params: ResumeConversationParams, } | { "method": "forkConversation", id: RequestId, params: ForkConversationParams, } | { "method": "archiveConversation", id: RequestId, params: ArchiveConversationParams, } | { "method": "sendUserMessage", id: RequestId, params: SendUserMessageParams, } | { "method": "sendUserTurn", id: RequestId, params: SendUserTurnParams, } | { "method": "interruptConversation", id: RequestId, params: InterruptConversationParams, } | { "method": "addConversationListener", id: RequestId, params: AddConversationListenerParams, } | { "method": "removeConversationListener", id: RequestId, params: RemoveConversationListenerParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "loginApiKey", id: RequestId, params: LoginApiKeyParams, } | { "method": "loginChatGpt", id: RequestId, params: undefined, } | { "method": "cancelLoginChatGpt", id: RequestId, params: CancelLoginChatGptParams, } | { "method": "logoutChatGpt", id: RequestId, params: undefined, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "getUserSavedConfig", id: RequestId, params: undefined, } | { "method": "setDefaultModel", id: RequestId, params: SetDefaultModelParams, } | { "method": "getUserAgent", id: RequestId, params: undefined, } | { "method": "userInfo", id: RequestId, params: undefined, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, } | { "method": "execOneOffCommand", id: RequestId, params: ExecOneOffCommandParams, }; diff --git a/src/app-server/CodexErrorInfo.ts b/src/app-server/CodexErrorInfo.ts index 6afb4946..20dd2414 100644 --- a/src/app-server/CodexErrorInfo.ts +++ b/src/app-server/CodexErrorInfo.ts @@ -5,4 +5,4 @@ /** * Codex errors that we expose to clients. */ -export type CodexErrorInfo = "context_window_exceeded" | "usage_limit_exceeded" | { "http_connection_failed": { http_status_code: number | null, } } | { "response_stream_connection_failed": { http_status_code: number | null, } } | "internal_server_error" | "unauthorized" | "bad_request" | "sandbox_error" | { "response_stream_disconnected": { http_status_code: number | null, } } | { "response_too_many_failed_attempts": { http_status_code: number | null, } } | "thread_rollback_failed" | "other"; +export type CodexErrorInfo = "context_window_exceeded" | "usage_limit_exceeded" | { "model_cap": { model: string, reset_after_seconds: bigint | null, } } | { "http_connection_failed": { http_status_code: number | null, } } | { "response_stream_connection_failed": { http_status_code: number | null, } } | "internal_server_error" | "unauthorized" | "bad_request" | "sandbox_error" | { "response_stream_disconnected": { http_status_code: number | null, } } | { "response_too_many_failed_attempts": { http_status_code: number | null, } } | "thread_rollback_failed" | "other"; diff --git a/src/app-server/ContextCompactionItem.ts b/src/app-server/ContextCompactionItem.ts new file mode 100644 index 00000000..dc3ab638 --- /dev/null +++ b/src/app-server/ContextCompactionItem.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 ContextCompactionItem = { id: string, }; diff --git a/src/app-server/ElicitationRequestEvent.ts b/src/app-server/ElicitationRequestEvent.ts index a4d641fd..045e304b 100644 --- a/src/app-server/ElicitationRequestEvent.ts +++ b/src/app-server/ElicitationRequestEvent.ts @@ -1,6 +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. -import type { RequestId } from "./RequestId"; -export type ElicitationRequestEvent = { server_name: string, id: RequestId, message: string, }; +export type ElicitationRequestEvent = { server_name: string, id: string | number, message: string, }; diff --git a/src/app-server/EventMsg.ts b/src/app-server/EventMsg.ts index 0f143145..c18088ea 100644 --- a/src/app-server/EventMsg.ts +++ b/src/app-server/EventMsg.ts @@ -33,6 +33,7 @@ import type { GetHistoryEntryResponseEvent } from "./GetHistoryEntryResponseEven import type { ItemCompletedEvent } from "./ItemCompletedEvent"; import type { ItemStartedEvent } from "./ItemStartedEvent"; import type { ListCustomPromptsResponseEvent } from "./ListCustomPromptsResponseEvent"; +import type { ListRemoteSkillsResponseEvent } from "./ListRemoteSkillsResponseEvent"; import type { ListSkillsResponseEvent } from "./ListSkillsResponseEvent"; import type { McpListToolsResponseEvent } from "./McpListToolsResponseEvent"; import type { McpStartupCompleteEvent } from "./McpStartupCompleteEvent"; @@ -41,14 +42,17 @@ import type { McpToolCallBeginEvent } from "./McpToolCallBeginEvent"; import type { McpToolCallEndEvent } from "./McpToolCallEndEvent"; import type { PatchApplyBeginEvent } from "./PatchApplyBeginEvent"; import type { PatchApplyEndEvent } from "./PatchApplyEndEvent"; +import type { PlanDeltaEvent } from "./PlanDeltaEvent"; import type { RawResponseItemEvent } from "./RawResponseItemEvent"; import type { ReasoningContentDeltaEvent } from "./ReasoningContentDeltaEvent"; import type { ReasoningRawContentDeltaEvent } from "./ReasoningRawContentDeltaEvent"; +import type { RemoteSkillDownloadedEvent } from "./RemoteSkillDownloadedEvent"; import type { RequestUserInputEvent } from "./RequestUserInputEvent"; import type { ReviewRequest } from "./ReviewRequest"; import type { SessionConfiguredEvent } from "./SessionConfiguredEvent"; import type { StreamErrorEvent } from "./StreamErrorEvent"; import type { TerminalInteractionEvent } from "./TerminalInteractionEvent"; +import type { ThreadNameUpdatedEvent } from "./ThreadNameUpdatedEvent"; import type { ThreadRolledBackEvent } from "./ThreadRolledBackEvent"; import type { TokenCountEvent } from "./TokenCountEvent"; import type { TurnAbortedEvent } from "./TurnAbortedEvent"; @@ -68,4 +72,4 @@ import type { WebSearchEndEvent } from "./WebSearchEndEvent"; * Response event from the agent * NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen. */ -export type EventMsg = { "type": "error" } & ErrorEvent | { "type": "warning" } & WarningEvent | { "type": "context_compacted" } & ContextCompactedEvent | { "type": "thread_rolled_back" } & ThreadRolledBackEvent | { "type": "task_started" } & TurnStartedEvent | { "type": "task_complete" } & TurnCompleteEvent | { "type": "token_count" } & TokenCountEvent | { "type": "agent_message" } & AgentMessageEvent | { "type": "user_message" } & UserMessageEvent | { "type": "agent_message_delta" } & AgentMessageDeltaEvent | { "type": "agent_reasoning" } & AgentReasoningEvent | { "type": "agent_reasoning_delta" } & AgentReasoningDeltaEvent | { "type": "agent_reasoning_raw_content" } & AgentReasoningRawContentEvent | { "type": "agent_reasoning_raw_content_delta" } & AgentReasoningRawContentDeltaEvent | { "type": "agent_reasoning_section_break" } & AgentReasoningSectionBreakEvent | { "type": "session_configured" } & SessionConfiguredEvent | { "type": "mcp_startup_update" } & McpStartupUpdateEvent | { "type": "mcp_startup_complete" } & McpStartupCompleteEvent | { "type": "mcp_tool_call_begin" } & McpToolCallBeginEvent | { "type": "mcp_tool_call_end" } & McpToolCallEndEvent | { "type": "web_search_begin" } & WebSearchBeginEvent | { "type": "web_search_end" } & WebSearchEndEvent | { "type": "exec_command_begin" } & ExecCommandBeginEvent | { "type": "exec_command_output_delta" } & ExecCommandOutputDeltaEvent | { "type": "terminal_interaction" } & TerminalInteractionEvent | { "type": "exec_command_end" } & ExecCommandEndEvent | { "type": "view_image_tool_call" } & ViewImageToolCallEvent | { "type": "exec_approval_request" } & ExecApprovalRequestEvent | { "type": "request_user_input" } & RequestUserInputEvent | { "type": "dynamic_tool_call_request" } & DynamicToolCallRequest | { "type": "elicitation_request" } & ElicitationRequestEvent | { "type": "apply_patch_approval_request" } & ApplyPatchApprovalRequestEvent | { "type": "deprecation_notice" } & DeprecationNoticeEvent | { "type": "background_event" } & BackgroundEventEvent | { "type": "undo_started" } & UndoStartedEvent | { "type": "undo_completed" } & UndoCompletedEvent | { "type": "stream_error" } & StreamErrorEvent | { "type": "patch_apply_begin" } & PatchApplyBeginEvent | { "type": "patch_apply_end" } & PatchApplyEndEvent | { "type": "turn_diff" } & TurnDiffEvent | { "type": "get_history_entry_response" } & GetHistoryEntryResponseEvent | { "type": "mcp_list_tools_response" } & McpListToolsResponseEvent | { "type": "list_custom_prompts_response" } & ListCustomPromptsResponseEvent | { "type": "list_skills_response" } & ListSkillsResponseEvent | { "type": "skills_update_available" } | { "type": "plan_update" } & UpdatePlanArgs | { "type": "turn_aborted" } & TurnAbortedEvent | { "type": "shutdown_complete" } | { "type": "entered_review_mode" } & ReviewRequest | { "type": "exited_review_mode" } & ExitedReviewModeEvent | { "type": "raw_response_item" } & RawResponseItemEvent | { "type": "item_started" } & ItemStartedEvent | { "type": "item_completed" } & ItemCompletedEvent | { "type": "agent_message_content_delta" } & AgentMessageContentDeltaEvent | { "type": "reasoning_content_delta" } & ReasoningContentDeltaEvent | { "type": "reasoning_raw_content_delta" } & ReasoningRawContentDeltaEvent | { "type": "collab_agent_spawn_begin" } & CollabAgentSpawnBeginEvent | { "type": "collab_agent_spawn_end" } & CollabAgentSpawnEndEvent | { "type": "collab_agent_interaction_begin" } & CollabAgentInteractionBeginEvent | { "type": "collab_agent_interaction_end" } & CollabAgentInteractionEndEvent | { "type": "collab_waiting_begin" } & CollabWaitingBeginEvent | { "type": "collab_waiting_end" } & CollabWaitingEndEvent | { "type": "collab_close_begin" } & CollabCloseBeginEvent | { "type": "collab_close_end" } & CollabCloseEndEvent; +export type EventMsg = { "type": "error" } & ErrorEvent | { "type": "warning" } & WarningEvent | { "type": "context_compacted" } & ContextCompactedEvent | { "type": "thread_rolled_back" } & ThreadRolledBackEvent | { "type": "task_started" } & TurnStartedEvent | { "type": "task_complete" } & TurnCompleteEvent | { "type": "token_count" } & TokenCountEvent | { "type": "agent_message" } & AgentMessageEvent | { "type": "user_message" } & UserMessageEvent | { "type": "agent_message_delta" } & AgentMessageDeltaEvent | { "type": "agent_reasoning" } & AgentReasoningEvent | { "type": "agent_reasoning_delta" } & AgentReasoningDeltaEvent | { "type": "agent_reasoning_raw_content" } & AgentReasoningRawContentEvent | { "type": "agent_reasoning_raw_content_delta" } & AgentReasoningRawContentDeltaEvent | { "type": "agent_reasoning_section_break" } & AgentReasoningSectionBreakEvent | { "type": "session_configured" } & SessionConfiguredEvent | { "type": "thread_name_updated" } & ThreadNameUpdatedEvent | { "type": "mcp_startup_update" } & McpStartupUpdateEvent | { "type": "mcp_startup_complete" } & McpStartupCompleteEvent | { "type": "mcp_tool_call_begin" } & McpToolCallBeginEvent | { "type": "mcp_tool_call_end" } & McpToolCallEndEvent | { "type": "web_search_begin" } & WebSearchBeginEvent | { "type": "web_search_end" } & WebSearchEndEvent | { "type": "exec_command_begin" } & ExecCommandBeginEvent | { "type": "exec_command_output_delta" } & ExecCommandOutputDeltaEvent | { "type": "terminal_interaction" } & TerminalInteractionEvent | { "type": "exec_command_end" } & ExecCommandEndEvent | { "type": "view_image_tool_call" } & ViewImageToolCallEvent | { "type": "exec_approval_request" } & ExecApprovalRequestEvent | { "type": "request_user_input" } & RequestUserInputEvent | { "type": "dynamic_tool_call_request" } & DynamicToolCallRequest | { "type": "elicitation_request" } & ElicitationRequestEvent | { "type": "apply_patch_approval_request" } & ApplyPatchApprovalRequestEvent | { "type": "deprecation_notice" } & DeprecationNoticeEvent | { "type": "background_event" } & BackgroundEventEvent | { "type": "undo_started" } & UndoStartedEvent | { "type": "undo_completed" } & UndoCompletedEvent | { "type": "stream_error" } & StreamErrorEvent | { "type": "patch_apply_begin" } & PatchApplyBeginEvent | { "type": "patch_apply_end" } & PatchApplyEndEvent | { "type": "turn_diff" } & TurnDiffEvent | { "type": "get_history_entry_response" } & GetHistoryEntryResponseEvent | { "type": "mcp_list_tools_response" } & McpListToolsResponseEvent | { "type": "list_custom_prompts_response" } & ListCustomPromptsResponseEvent | { "type": "list_skills_response" } & ListSkillsResponseEvent | { "type": "list_remote_skills_response" } & ListRemoteSkillsResponseEvent | { "type": "remote_skill_downloaded" } & RemoteSkillDownloadedEvent | { "type": "skills_update_available" } | { "type": "plan_update" } & UpdatePlanArgs | { "type": "turn_aborted" } & TurnAbortedEvent | { "type": "shutdown_complete" } | { "type": "entered_review_mode" } & ReviewRequest | { "type": "exited_review_mode" } & ExitedReviewModeEvent | { "type": "raw_response_item" } & RawResponseItemEvent | { "type": "item_started" } & ItemStartedEvent | { "type": "item_completed" } & ItemCompletedEvent | { "type": "agent_message_content_delta" } & AgentMessageContentDeltaEvent | { "type": "plan_delta" } & PlanDeltaEvent | { "type": "reasoning_content_delta" } & ReasoningContentDeltaEvent | { "type": "reasoning_raw_content_delta" } & ReasoningRawContentDeltaEvent | { "type": "collab_agent_spawn_begin" } & CollabAgentSpawnBeginEvent | { "type": "collab_agent_spawn_end" } & CollabAgentSpawnEndEvent | { "type": "collab_agent_interaction_begin" } & CollabAgentInteractionBeginEvent | { "type": "collab_agent_interaction_end" } & CollabAgentInteractionEndEvent | { "type": "collab_waiting_begin" } & CollabWaitingBeginEvent | { "type": "collab_waiting_end" } & CollabWaitingEndEvent | { "type": "collab_close_begin" } & CollabCloseBeginEvent | { "type": "collab_close_end" } & CollabCloseEndEvent; diff --git a/src/app-server/FunctionCallOutputBody.ts b/src/app-server/FunctionCallOutputBody.ts new file mode 100644 index 00000000..6bcb7e25 --- /dev/null +++ b/src/app-server/FunctionCallOutputBody.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 { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem"; + +export type FunctionCallOutputBody = string | Array; diff --git a/src/app-server/FunctionCallOutputPayload.ts b/src/app-server/FunctionCallOutputPayload.ts index 776369b1..6376c5b8 100644 --- a/src/app-server/FunctionCallOutputPayload.ts +++ b/src/app-server/FunctionCallOutputPayload.ts @@ -1,15 +1,12 @@ // 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 { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem"; +import type { FunctionCallOutputBody } from "./FunctionCallOutputBody"; /** * The payload we send back to OpenAI when reporting a tool call result. * - * `content` preserves the historical plain-string payload so downstream - * integrations (tests, logging, etc.) can keep treating tool output as - * `String`. When an MCP server returns richer data we additionally populate - * `content_items` with the structured form that the Responses/Chat - * Completions APIs understand. + * `body` serializes directly as the wire value for `function_call_output.output`. + * `success` remains internal metadata for downstream handling. */ -export type FunctionCallOutputPayload = { content: string, content_items: Array | null, success: boolean | null, }; +export type FunctionCallOutputPayload = { body: FunctionCallOutputBody, success: boolean | null, }; diff --git a/src/app-server/InitializeCapabilities.ts b/src/app-server/InitializeCapabilities.ts new file mode 100644 index 00000000..24f53026 --- /dev/null +++ b/src/app-server/InitializeCapabilities.ts @@ -0,0 +1,12 @@ +// 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. + +/** + * Client-declared capabilities negotiated during initialize. + */ +export type InitializeCapabilities = { +/** + * Opt into receiving experimental API methods and fields. + */ +experimentalApi: boolean, }; diff --git a/src/app-server/InitializeParams.ts b/src/app-server/InitializeParams.ts index 76c2bc10..e48c5ee7 100644 --- a/src/app-server/InitializeParams.ts +++ b/src/app-server/InitializeParams.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 { ClientInfo } from "./ClientInfo"; +import type { InitializeCapabilities } from "./InitializeCapabilities"; -export type InitializeParams = { clientInfo: ClientInfo, }; +export type InitializeParams = { clientInfo: ClientInfo, capabilities: InitializeCapabilities | null, }; diff --git a/src/app-server/v2/CollaborationModeListParams.ts b/src/app-server/InputModality.ts similarity index 58% rename from src/app-server/v2/CollaborationModeListParams.ts rename to src/app-server/InputModality.ts index 37e8f792..73661938 100644 --- a/src/app-server/v2/CollaborationModeListParams.ts +++ b/src/app-server/InputModality.ts @@ -3,6 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** - * EXPERIMENTAL - list collaboration mode presets. + * Canonical user-input modality tags advertised by a model. */ -export type CollaborationModeListParams = Record; +export type InputModality = "text" | "image"; diff --git a/src/app-server/ListRemoteSkillsResponseEvent.ts b/src/app-server/ListRemoteSkillsResponseEvent.ts new file mode 100644 index 00000000..e3b277f4 --- /dev/null +++ b/src/app-server/ListRemoteSkillsResponseEvent.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 { RemoteSkillSummary } from "./RemoteSkillSummary"; + +/** + * Response payload for `Op::ListRemoteSkills`. + */ +export type ListRemoteSkillsResponseEvent = { skills: Array, }; diff --git a/src/app-server/MessagePhase.ts b/src/app-server/MessagePhase.ts new file mode 100644 index 00000000..d339c0fa --- /dev/null +++ b/src/app-server/MessagePhase.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 MessagePhase = "commentary" | "final_answer"; diff --git a/src/app-server/ModeKind.ts b/src/app-server/ModeKind.ts index 246d440c..7d2324ad 100644 --- a/src/app-server/ModeKind.ts +++ b/src/app-server/ModeKind.ts @@ -5,4 +5,4 @@ /** * Initial collaboration mode to use when the TUI starts. */ -export type ModeKind = "plan" | "code" | "pair_programming" | "execute" | "custom"; +export type ModeKind = "plan" | "default"; diff --git a/src/app-server/Personality.ts b/src/app-server/Personality.ts index b9ccad4d..45165f4e 100644 --- a/src/app-server/Personality.ts +++ b/src/app-server/Personality.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 Personality = "friendly" | "pragmatic"; +export type Personality = "none" | "friendly" | "pragmatic"; diff --git a/src/app-server/PlanDeltaEvent.ts b/src/app-server/PlanDeltaEvent.ts new file mode 100644 index 00000000..f2ff5884 --- /dev/null +++ b/src/app-server/PlanDeltaEvent.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 PlanDeltaEvent = { thread_id: string, turn_id: string, item_id: string, delta: string, }; diff --git a/src/app-server/PlanItem.ts b/src/app-server/PlanItem.ts new file mode 100644 index 00000000..909ab40e --- /dev/null +++ b/src/app-server/PlanItem.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 PlanItem = { id: string, text: string, }; diff --git a/src/app-server/PlanType.ts b/src/app-server/PlanType.ts index 9e1ae74a..9f622d0f 100644 --- a/src/app-server/PlanType.ts +++ b/src/app-server/PlanType.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 PlanType = "free" | "plus" | "pro" | "team" | "business" | "enterprise" | "edu" | "unknown"; +export type PlanType = "free" | "go" | "plus" | "pro" | "team" | "business" | "enterprise" | "edu" | "unknown"; diff --git a/src/app-server/RemoteSkillDownloadedEvent.ts b/src/app-server/RemoteSkillDownloadedEvent.ts new file mode 100644 index 00000000..83082f2a --- /dev/null +++ b/src/app-server/RemoteSkillDownloadedEvent.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. + +/** + * Response payload for `Op::DownloadRemoteSkill`. + */ +export type RemoteSkillDownloadedEvent = { id: string, name: string, path: string, }; diff --git a/src/app-server/RemoteSkillSummary.ts b/src/app-server/RemoteSkillSummary.ts new file mode 100644 index 00000000..7bf57b3b --- /dev/null +++ b/src/app-server/RemoteSkillSummary.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 RemoteSkillSummary = { id: string, name: string, description: string, }; diff --git a/src/app-server/RequestUserInputQuestion.ts b/src/app-server/RequestUserInputQuestion.ts index 3e076a45..2a68f7b4 100644 --- a/src/app-server/RequestUserInputQuestion.ts +++ b/src/app-server/RequestUserInputQuestion.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 { RequestUserInputQuestionOption } from "./RequestUserInputQuestionOption"; -export type RequestUserInputQuestion = { id: string, header: string, question: string, isOther: boolean, options: Array | null, }; +export type RequestUserInputQuestion = { id: string, header: string, question: string, isOther: boolean, isSecret: boolean, options: Array | null, }; diff --git a/src/app-server/Resource.ts b/src/app-server/Resource.ts index 238cd900..6eca7941 100644 --- a/src/app-server/Resource.ts +++ b/src/app-server/Resource.ts @@ -1,9 +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 { Annotations } from "./Annotations"; +import type { JsonValue } from "./serde_json/JsonValue"; /** * A known resource that the server is capable of reading. */ -export type Resource = { annotations?: Annotations, description?: string, mimeType?: string, name: string, size?: bigint, title?: string, uri: string, }; +export type Resource = { annotations?: JsonValue, description?: string, mimeType?: string, name: string, size?: number, title?: string, uri: string, icons?: Array, _meta?: JsonValue, }; diff --git a/src/app-server/ResourceTemplate.ts b/src/app-server/ResourceTemplate.ts index 03c9a116..6dc39512 100644 --- a/src/app-server/ResourceTemplate.ts +++ b/src/app-server/ResourceTemplate.ts @@ -1,9 +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 { Annotations } from "./Annotations"; +import type { JsonValue } from "./serde_json/JsonValue"; /** * A template description for resources available on the server. */ -export type ResourceTemplate = { annotations?: Annotations, description?: string, mimeType?: string, name: string, title?: string, uriTemplate: string, }; +export type ResourceTemplate = { annotations?: JsonValue, uriTemplate: string, name: string, title?: string, description?: string, mimeType?: string, }; diff --git a/src/app-server/ResponseItem.ts b/src/app-server/ResponseItem.ts index d7200216..611c7fb2 100644 --- a/src/app-server/ResponseItem.ts +++ b/src/app-server/ResponseItem.ts @@ -6,11 +6,12 @@ import type { FunctionCallOutputPayload } from "./FunctionCallOutputPayload"; import type { GhostCommit } from "./GhostCommit"; import type { LocalShellAction } from "./LocalShellAction"; import type { LocalShellStatus } from "./LocalShellStatus"; +import type { MessagePhase } from "./MessagePhase"; import type { ReasoningItemContent } from "./ReasoningItemContent"; import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary"; import type { WebSearchAction } from "./WebSearchAction"; -export type ResponseItem = { "type": "message", role: string, content: Array, end_turn?: boolean, } | { "type": "reasoning", summary: Array, content?: Array, encrypted_content: string | null, } | { "type": "local_shell_call", +export type ResponseItem = { "type": "message", role: string, content: Array, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array, content?: Array, encrypted_content: string | null, } | { "type": "local_shell_call", /** * Set when using the Responses API. */ diff --git a/src/app-server/ServerNotification.ts b/src/app-server/ServerNotification.ts index 545ef966..403617fc 100644 --- a/src/app-server/ServerNotification.ts +++ b/src/app-server/ServerNotification.ts @@ -18,11 +18,13 @@ import type { ItemCompletedNotification } from "./v2/ItemCompletedNotification"; import type { ItemStartedNotification } from "./v2/ItemStartedNotification"; import type { McpServerOauthLoginCompletedNotification } from "./v2/McpServerOauthLoginCompletedNotification"; import type { McpToolCallProgressNotification } from "./v2/McpToolCallProgressNotification"; +import type { PlanDeltaNotification } from "./v2/PlanDeltaNotification"; 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 { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification"; +import type { ThreadNameUpdatedNotification } from "./v2/ThreadNameUpdatedNotification"; import type { ThreadStartedNotification } from "./v2/ThreadStartedNotification"; import type { ThreadTokenUsageUpdatedNotification } from "./v2/ThreadTokenUsageUpdatedNotification"; import type { TurnCompletedNotification } from "./v2/TurnCompletedNotification"; @@ -34,4 +36,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/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification } | { "method": "authStatusChange", "params": AuthStatusChangeNotification } | { "method": "loginChatGptComplete", "params": LoginChatGptCompleteNotification } | { "method": "sessionConfigured", "params": SessionConfiguredNotification }; +export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification } | { "method": "authStatusChange", "params": AuthStatusChangeNotification } | { "method": "loginChatGptComplete", "params": LoginChatGptCompleteNotification } | { "method": "sessionConfigured", "params": SessionConfiguredNotification }; diff --git a/src/app-server/ServerRequest.ts b/src/app-server/ServerRequest.ts index c3e346c7..17c66959 100644 --- a/src/app-server/ServerRequest.ts +++ b/src/app-server/ServerRequest.ts @@ -4,6 +4,7 @@ import type { ApplyPatchApprovalParams } from "./ApplyPatchApprovalParams"; import type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams"; import type { RequestId } from "./RequestId"; +import type { ChatgptAuthTokensRefreshParams } from "./v2/ChatgptAuthTokensRefreshParams"; import type { CommandExecutionRequestApprovalParams } from "./v2/CommandExecutionRequestApprovalParams"; import type { DynamicToolCallParams } from "./v2/DynamicToolCallParams"; import type { FileChangeRequestApprovalParams } from "./v2/FileChangeRequestApprovalParams"; @@ -12,4 +13,4 @@ import type { ToolRequestUserInputParams } from "./v2/ToolRequestUserInputParams /** * Request initiated from the server and sent to the client. */ -export type ServerRequest = { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, }; +export type ServerRequest = { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } | { "method": "account/chatgptAuthTokens/refresh", id: RequestId, params: ChatgptAuthTokensRefreshParams, } | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, }; diff --git a/src/app-server/SessionConfiguredEvent.ts b/src/app-server/SessionConfiguredEvent.ts index 8a83c1a7..2e1896a3 100644 --- a/src/app-server/SessionConfiguredEvent.ts +++ b/src/app-server/SessionConfiguredEvent.ts @@ -7,11 +7,11 @@ import type { ReasoningEffort } from "./ReasoningEffort"; import type { SandboxPolicy } from "./SandboxPolicy"; import type { ThreadId } from "./ThreadId"; -export type SessionConfiguredEvent = { +export type SessionConfiguredEvent = { session_id: ThreadId, forked_from_id: ThreadId | null, /** - * Name left as session_id instead of thread_id for backwards compatibility. + * Optional user-facing thread name (may be unset). */ -session_id: ThreadId, forked_from_id: ThreadId | null, +thread_name?: string, /** * Tell the client what model is being queried. */ diff --git a/src/app-server/SkillDependencies.ts b/src/app-server/SkillDependencies.ts new file mode 100644 index 00000000..e2dd4f42 --- /dev/null +++ b/src/app-server/SkillDependencies.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 { SkillToolDependency } from "./SkillToolDependency"; + +export type SkillDependencies = { tools: Array, }; diff --git a/src/app-server/SkillMetadata.ts b/src/app-server/SkillMetadata.ts index 9645b968..088abc40 100644 --- a/src/app-server/SkillMetadata.ts +++ b/src/app-server/SkillMetadata.ts @@ -1,11 +1,12 @@ // 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 { SkillDependencies } from "./SkillDependencies"; import type { SkillInterface } from "./SkillInterface"; import type { SkillScope } from "./SkillScope"; export type SkillMetadata = { name: string, description: string, /** - * Legacy short_description from SKILL.md. Prefer SKILL.toml interface.short_description. + * Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description. */ -short_description?: string, interface?: SkillInterface, path: string, scope: SkillScope, enabled: boolean, }; +short_description?: string, interface?: SkillInterface, dependencies?: SkillDependencies, path: string, scope: SkillScope, enabled: boolean, }; diff --git a/src/app-server/SkillToolDependency.ts b/src/app-server/SkillToolDependency.ts new file mode 100644 index 00000000..a5da45e1 --- /dev/null +++ b/src/app-server/SkillToolDependency.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 SkillToolDependency = { type: string, value: string, description?: string, transport?: string, command?: string, url?: string, }; diff --git a/src/app-server/ThreadNameUpdatedEvent.ts b/src/app-server/ThreadNameUpdatedEvent.ts new file mode 100644 index 00000000..639e29f9 --- /dev/null +++ b/src/app-server/ThreadNameUpdatedEvent.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 { ThreadId } from "./ThreadId"; + +export type ThreadNameUpdatedEvent = { thread_id: ThreadId, thread_name?: string, }; diff --git a/src/app-server/Tool.ts b/src/app-server/Tool.ts index 8255eecf..b7959161 100644 --- a/src/app-server/Tool.ts +++ b/src/app-server/Tool.ts @@ -1,11 +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 { ToolAnnotations } from "./ToolAnnotations"; -import type { ToolInputSchema } from "./ToolInputSchema"; -import type { ToolOutputSchema } from "./ToolOutputSchema"; +import type { JsonValue } from "./serde_json/JsonValue"; /** * Definition for a tool the client can call. */ -export type Tool = { annotations?: ToolAnnotations, description?: string, inputSchema: ToolInputSchema, name: string, outputSchema?: ToolOutputSchema, title?: string, }; +export type Tool = { name: string, title?: string, description?: string, inputSchema: JsonValue, outputSchema?: JsonValue, annotations?: JsonValue, icons?: Array, _meta?: JsonValue, }; diff --git a/src/app-server/TurnItem.ts b/src/app-server/TurnItem.ts index f1ba78c2..0f2ea12a 100644 --- a/src/app-server/TurnItem.ts +++ b/src/app-server/TurnItem.ts @@ -2,8 +2,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AgentMessageItem } from "./AgentMessageItem"; +import type { ContextCompactionItem } from "./ContextCompactionItem"; +import type { PlanItem } from "./PlanItem"; import type { ReasoningItem } from "./ReasoningItem"; import type { UserMessageItem } from "./UserMessageItem"; import type { WebSearchItem } from "./WebSearchItem"; -export type TurnItem = { "type": "UserMessage" } & UserMessageItem | { "type": "AgentMessage" } & AgentMessageItem | { "type": "Reasoning" } & ReasoningItem | { "type": "WebSearch" } & WebSearchItem; +export type TurnItem = { "type": "UserMessage" } & UserMessageItem | { "type": "AgentMessage" } & AgentMessageItem | { "type": "Plan" } & PlanItem | { "type": "Reasoning" } & ReasoningItem | { "type": "WebSearch" } & WebSearchItem | { "type": "ContextCompaction" } & ContextCompactionItem; diff --git a/src/app-server/TurnStartedEvent.ts b/src/app-server/TurnStartedEvent.ts index ae8ab73a..91598aa7 100644 --- a/src/app-server/TurnStartedEvent.ts +++ b/src/app-server/TurnStartedEvent.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 { ModeKind } from "./ModeKind"; -export type TurnStartedEvent = { model_context_window: bigint | null, }; +export type TurnStartedEvent = { model_context_window: bigint | null, collaboration_mode_kind: ModeKind, }; diff --git a/src/app-server/UpdatePlanArgs.ts b/src/app-server/UpdatePlanArgs.ts index e74e527a..61613fcb 100644 --- a/src/app-server/UpdatePlanArgs.ts +++ b/src/app-server/UpdatePlanArgs.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 { PlanItemArg } from "./PlanItemArg"; -export type UpdatePlanArgs = { explanation: string | null, plan: Array, }; +export type UpdatePlanArgs = { +/** + * Arguments for the `update_plan` todo/checklist tool (not plan mode). + */ +explanation: string | null, plan: Array, }; diff --git a/src/app-server/UserInput.ts b/src/app-server/UserInput.ts index 3e4d7d83..e6a9c3a5 100644 --- a/src/app-server/UserInput.ts +++ b/src/app-server/UserInput.ts @@ -13,4 +13,4 @@ export type UserInput = { "type": "text", text: string, * or persist rich input markers (e.g., image placeholders) across history * and resume without mutating the literal text. */ -text_elements: Array, } | { "type": "image", image_url: string, } | { "type": "local_image", path: string, } | { "type": "skill", name: string, path: string, }; +text_elements: Array, } | { "type": "image", image_url: string, } | { "type": "local_image", path: string, } | { "type": "skill", name: string, path: string, } | { "type": "mention", name: string, path: string, }; diff --git a/src/app-server/WebSearchAction.ts b/src/app-server/WebSearchAction.ts index 80d24bd0..91cb99e9 100644 --- a/src/app-server/WebSearchAction.ts +++ b/src/app-server/WebSearchAction.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 WebSearchAction = { "type": "search", query?: string, } | { "type": "open_page", url?: string, } | { "type": "find_in_page", url?: string, pattern?: string, } | { "type": "other" }; +export type WebSearchAction = { "type": "search", query?: string, queries?: Array, } | { "type": "open_page", url?: string, } | { "type": "find_in_page", url?: string, pattern?: string, } | { "type": "other" }; diff --git a/src/app-server/index.ts b/src/app-server/index.ts index 43c7c7b1..9362fda6 100644 --- a/src/app-server/index.ts +++ b/src/app-server/index.ts @@ -47,6 +47,7 @@ export type { CollaborationModeMask } from "./CollaborationModeMask"; export type { ContentBlock } from "./ContentBlock"; export type { ContentItem } from "./ContentItem"; export type { ContextCompactedEvent } from "./ContextCompactedEvent"; +export type { ContextCompactionItem } from "./ContextCompactionItem"; export type { ConversationGitInfo } from "./ConversationGitInfo"; export type { ConversationId } from "./ConversationId"; export type { ConversationSummary } from "./ConversationSummary"; @@ -75,6 +76,7 @@ export type { FileChange } from "./FileChange"; export type { ForcedLoginMethod } from "./ForcedLoginMethod"; export type { ForkConversationParams } from "./ForkConversationParams"; export type { ForkConversationResponse } from "./ForkConversationResponse"; +export type { FunctionCallOutputBody } from "./FunctionCallOutputBody"; export type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem"; export type { FunctionCallOutputPayload } from "./FunctionCallOutputPayload"; export type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams"; @@ -93,9 +95,11 @@ export type { GitDiffToRemoteResponse } from "./GitDiffToRemoteResponse"; export type { GitSha } from "./GitSha"; export type { HistoryEntry } from "./HistoryEntry"; export type { ImageContent } from "./ImageContent"; +export type { InitializeCapabilities } from "./InitializeCapabilities"; export type { InitializeParams } from "./InitializeParams"; export type { InitializeResponse } from "./InitializeResponse"; export type { InputItem } from "./InputItem"; +export type { InputModality } from "./InputModality"; export type { InterruptConversationParams } from "./InterruptConversationParams"; export type { InterruptConversationResponse } from "./InterruptConversationResponse"; export type { ItemCompletedEvent } from "./ItemCompletedEvent"; @@ -103,6 +107,7 @@ export type { ItemStartedEvent } from "./ItemStartedEvent"; export type { ListConversationsParams } from "./ListConversationsParams"; export type { ListConversationsResponse } from "./ListConversationsResponse"; export type { ListCustomPromptsResponseEvent } from "./ListCustomPromptsResponseEvent"; +export type { ListRemoteSkillsResponseEvent } from "./ListRemoteSkillsResponseEvent"; export type { ListSkillsResponseEvent } from "./ListSkillsResponseEvent"; export type { LocalShellAction } from "./LocalShellAction"; export type { LocalShellExecAction } from "./LocalShellExecAction"; @@ -121,6 +126,7 @@ export type { McpStartupStatus } from "./McpStartupStatus"; export type { McpStartupUpdateEvent } from "./McpStartupUpdateEvent"; export type { McpToolCallBeginEvent } from "./McpToolCallBeginEvent"; export type { McpToolCallEndEvent } from "./McpToolCallEndEvent"; +export type { MessagePhase } from "./MessagePhase"; export type { ModeKind } from "./ModeKind"; export type { NetworkAccess } from "./NetworkAccess"; export type { NewConversationParams } from "./NewConversationParams"; @@ -129,6 +135,8 @@ export type { ParsedCommand } from "./ParsedCommand"; export type { PatchApplyBeginEvent } from "./PatchApplyBeginEvent"; export type { PatchApplyEndEvent } from "./PatchApplyEndEvent"; export type { Personality } from "./Personality"; +export type { PlanDeltaEvent } from "./PlanDeltaEvent"; +export type { PlanItem } from "./PlanItem"; export type { PlanItemArg } from "./PlanItemArg"; export type { PlanType } from "./PlanType"; export type { Profile } from "./Profile"; @@ -142,6 +150,8 @@ export type { ReasoningItemContent } from "./ReasoningItemContent"; export type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary"; export type { ReasoningRawContentDeltaEvent } from "./ReasoningRawContentDeltaEvent"; export type { ReasoningSummary } from "./ReasoningSummary"; +export type { RemoteSkillDownloadedEvent } from "./RemoteSkillDownloadedEvent"; +export type { RemoteSkillSummary } from "./RemoteSkillSummary"; export type { RemoveConversationListenerParams } from "./RemoveConversationListenerParams"; export type { RemoveConversationSubscriptionResponse } from "./RemoveConversationSubscriptionResponse"; export type { RequestId } from "./RequestId"; @@ -179,10 +189,12 @@ export type { SessionSource } from "./SessionSource"; export type { SetDefaultModelParams } from "./SetDefaultModelParams"; export type { SetDefaultModelResponse } from "./SetDefaultModelResponse"; export type { Settings } from "./Settings"; +export type { SkillDependencies } from "./SkillDependencies"; export type { SkillErrorInfo } from "./SkillErrorInfo"; export type { SkillInterface } from "./SkillInterface"; export type { SkillMetadata } from "./SkillMetadata"; export type { SkillScope } from "./SkillScope"; +export type { SkillToolDependency } from "./SkillToolDependency"; export type { SkillsListEntry } from "./SkillsListEntry"; export type { StepStatus } from "./StepStatus"; export type { StreamErrorEvent } from "./StreamErrorEvent"; @@ -194,6 +206,7 @@ export type { TextContent } from "./TextContent"; export type { TextElement } from "./TextElement"; export type { TextResourceContents } from "./TextResourceContents"; export type { ThreadId } from "./ThreadId"; +export type { ThreadNameUpdatedEvent } from "./ThreadNameUpdatedEvent"; export type { ThreadRolledBackEvent } from "./ThreadRolledBackEvent"; export type { TokenCountEvent } from "./TokenCountEvent"; export type { TokenUsage } from "./TokenUsage"; diff --git a/src/app-server/v2/AppInfo.ts b/src/app-server/v2/AppInfo.ts index 552ddfc6..6e959cc2 100644 --- a/src/app-server/v2/AppInfo.ts +++ b/src/app-server/v2/AppInfo.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 AppInfo = { id: string, name: string, description: string | null, logoUrl: string | null, installUrl: string | null, isAccessible: boolean, }; +export type AppInfo = { id: string, name: string, description: string | null, logoUrl: string | null, logoUrlDark: string | null, distributionChannel: string | null, installUrl: string | null, isAccessible: boolean, }; diff --git a/src/app-server/v2/AppsListParams.ts b/src/app-server/v2/AppsListParams.ts index fe925998..a3e6fbf6 100644 --- a/src/app-server/v2/AppsListParams.ts +++ b/src/app-server/v2/AppsListParams.ts @@ -6,8 +6,8 @@ export type AppsListParams = { /** * Opaque pagination cursor returned by a previous call. */ -cursor: string | null, +cursor?: string | null, /** * Optional page size; defaults to a reasonable server-side value. */ -limit: number | null, }; +limit?: number | null, }; diff --git a/src/app-server/v2/ChatgptAuthTokensRefreshParams.ts b/src/app-server/v2/ChatgptAuthTokensRefreshParams.ts new file mode 100644 index 00000000..4393c7f7 --- /dev/null +++ b/src/app-server/v2/ChatgptAuthTokensRefreshParams.ts @@ -0,0 +1,16 @@ +// 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 { ChatgptAuthTokensRefreshReason } from "./ChatgptAuthTokensRefreshReason"; + +export type ChatgptAuthTokensRefreshParams = { reason: ChatgptAuthTokensRefreshReason, +/** + * Workspace/account identifier that Codex was previously using. + * + * Clients that manage multiple accounts/workspaces can use this as a hint + * to refresh the token for the correct workspace. + * + * This may be `null` when the prior ID token did not include a workspace + * identifier (`chatgpt_account_id`) or when the token could not be parsed. + */ +previousAccountId?: string | null, }; diff --git a/src/app-server/v2/ChatgptAuthTokensRefreshReason.ts b/src/app-server/v2/ChatgptAuthTokensRefreshReason.ts new file mode 100644 index 00000000..ac4006ba --- /dev/null +++ b/src/app-server/v2/ChatgptAuthTokensRefreshReason.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 ChatgptAuthTokensRefreshReason = "unauthorized"; diff --git a/src/app-server/v2/ChatgptAuthTokensRefreshResponse.ts b/src/app-server/v2/ChatgptAuthTokensRefreshResponse.ts new file mode 100644 index 00000000..f7f7ecba --- /dev/null +++ b/src/app-server/v2/ChatgptAuthTokensRefreshResponse.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 ChatgptAuthTokensRefreshResponse = { idToken: string, accessToken: string, }; diff --git a/src/app-server/v2/CodexErrorInfo.ts b/src/app-server/v2/CodexErrorInfo.ts index 0bbb250e..a1e65c30 100644 --- a/src/app-server/v2/CodexErrorInfo.ts +++ b/src/app-server/v2/CodexErrorInfo.ts @@ -8,4 +8,4 @@ * When an upstream HTTP status is available (for example, from the Responses API or a provider), * it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant. */ -export type CodexErrorInfo = "contextWindowExceeded" | "usageLimitExceeded" | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | "other"; +export type CodexErrorInfo = "contextWindowExceeded" | "usageLimitExceeded" | { "modelCap": { model: string, reset_after_seconds: bigint | null, } } | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | "other"; diff --git a/src/app-server/v2/CollaborationModeListResponse.ts b/src/app-server/v2/CollaborationModeListResponse.ts deleted file mode 100644 index 6b741a36..00000000 --- a/src/app-server/v2/CollaborationModeListResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CollaborationModeMask } from "../CollaborationModeMask"; - -/** - * EXPERIMENTAL - collaboration mode presets response. - */ -export type CollaborationModeListResponse = { data: Array, }; diff --git a/src/app-server/v2/CommandExecParams.ts b/src/app-server/v2/CommandExecParams.ts index fc9c6a39..847e19d6 100644 --- a/src/app-server/v2/CommandExecParams.ts +++ b/src/app-server/v2/CommandExecParams.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 { SandboxPolicy } from "./SandboxPolicy"; -export type CommandExecParams = { command: Array, timeoutMs: number | null, cwd: string | null, sandboxPolicy: SandboxPolicy | null, }; +export type CommandExecParams = { command: Array, timeoutMs?: number | null, cwd?: string | null, sandboxPolicy?: SandboxPolicy | null, }; diff --git a/src/app-server/v2/CommandExecutionRequestApprovalParams.ts b/src/app-server/v2/CommandExecutionRequestApprovalParams.ts index 3bad1b46..12b25214 100644 --- a/src/app-server/v2/CommandExecutionRequestApprovalParams.ts +++ b/src/app-server/v2/CommandExecutionRequestApprovalParams.ts @@ -8,20 +8,20 @@ export type CommandExecutionRequestApprovalParams = { threadId: string, turnId: /** * Optional explanatory reason (e.g. request for network access). */ -reason: string | null, +reason?: string | null, /** * The command to be executed. */ -command?: string, +command?: string | null, /** * The command's working directory. */ -cwd?: string, +cwd?: string | null, /** * Best-effort parsed command actions for friendly display. */ -commandActions?: Array, +commandActions?: Array | null, /** * Optional proposed execpolicy amendment to allow similar commands without prompting. */ -proposedExecpolicyAmendment: ExecPolicyAmendment | null, }; +proposedExecpolicyAmendment?: ExecPolicyAmendment | null, }; diff --git a/src/app-server/v2/ConfigBatchWriteParams.ts b/src/app-server/v2/ConfigBatchWriteParams.ts index c4012fc3..77df84e3 100644 --- a/src/app-server/v2/ConfigBatchWriteParams.ts +++ b/src/app-server/v2/ConfigBatchWriteParams.ts @@ -7,4 +7,4 @@ export type ConfigBatchWriteParams = { edits: Array, /** * Path to the config file to write; defaults to the user's `config.toml` when omitted. */ -filePath: string | null, expectedVersion: string | null, }; +filePath?: string | null, expectedVersion?: string | null, }; diff --git a/src/app-server/v2/ConfigReadParams.ts b/src/app-server/v2/ConfigReadParams.ts index 3cb2394b..c5d5bc87 100644 --- a/src/app-server/v2/ConfigReadParams.ts +++ b/src/app-server/v2/ConfigReadParams.ts @@ -8,4 +8,4 @@ export type ConfigReadParams = { includeLayers: boolean, * return the effective config as seen from that directory (i.e., including any * project layers between `cwd` and the project/repo root). */ -cwd: string | null, }; +cwd?: string | null, }; diff --git a/src/app-server/v2/ConfigRequirements.ts b/src/app-server/v2/ConfigRequirements.ts index 58530f3e..765d0b86 100644 --- a/src/app-server/v2/ConfigRequirements.ts +++ b/src/app-server/v2/ConfigRequirements.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 { AskForApproval } from "./AskForApproval"; +import type { ResidencyRequirement } from "./ResidencyRequirement"; import type { SandboxMode } from "./SandboxMode"; -export type ConfigRequirements = { allowedApprovalPolicies: Array | null, allowedSandboxModes: Array | null, }; +export type ConfigRequirements = { allowedApprovalPolicies: Array | null, allowedSandboxModes: Array | null, enforceResidency: ResidencyRequirement | null, }; diff --git a/src/app-server/v2/ConfigValueWriteParams.ts b/src/app-server/v2/ConfigValueWriteParams.ts index 2dedfe8d..9204760f 100644 --- a/src/app-server/v2/ConfigValueWriteParams.ts +++ b/src/app-server/v2/ConfigValueWriteParams.ts @@ -8,4 +8,4 @@ export type ConfigValueWriteParams = { keyPath: string, value: JsonValue, mergeS /** * Path to the config file to write; defaults to the user's `config.toml` when omitted. */ -filePath: string | null, expectedVersion: string | null, }; +filePath?: string | null, expectedVersion?: string | null, }; diff --git a/src/app-server/v2/ContextCompactedNotification.ts b/src/app-server/v2/ContextCompactedNotification.ts index 96ea4c76..6927609d 100644 --- a/src/app-server/v2/ContextCompactedNotification.ts +++ b/src/app-server/v2/ContextCompactedNotification.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +/** + * Deprecated: Use `ContextCompaction` item type instead. + */ export type ContextCompactedNotification = { threadId: string, turnId: string, }; diff --git a/src/app-server/v2/DynamicToolCallOutputContentItem.ts b/src/app-server/v2/DynamicToolCallOutputContentItem.ts new file mode 100644 index 00000000..8f432109 --- /dev/null +++ b/src/app-server/v2/DynamicToolCallOutputContentItem.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 DynamicToolCallOutputContentItem = { "type": "inputText", text: string, } | { "type": "inputImage", imageUrl: string, }; diff --git a/src/app-server/v2/DynamicToolCallResponse.ts b/src/app-server/v2/DynamicToolCallResponse.ts index a35b9b39..788e6242 100644 --- a/src/app-server/v2/DynamicToolCallResponse.ts +++ b/src/app-server/v2/DynamicToolCallResponse.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 { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem"; -export type DynamicToolCallResponse = { output: string, success: boolean, }; +export type DynamicToolCallResponse = { contentItems: Array, success: boolean, }; diff --git a/src/app-server/v2/FeedbackUploadParams.ts b/src/app-server/v2/FeedbackUploadParams.ts index aeccc457..3066e654 100644 --- a/src/app-server/v2/FeedbackUploadParams.ts +++ b/src/app-server/v2/FeedbackUploadParams.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 FeedbackUploadParams = { classification: string, reason: string | null, threadId: string | null, includeLogs: boolean, }; +export type FeedbackUploadParams = { classification: string, reason?: string | null, threadId?: string | null, includeLogs: boolean, }; diff --git a/src/app-server/v2/FileChangeRequestApprovalParams.ts b/src/app-server/v2/FileChangeRequestApprovalParams.ts index a7dbfbb7..a7951b68 100644 --- a/src/app-server/v2/FileChangeRequestApprovalParams.ts +++ b/src/app-server/v2/FileChangeRequestApprovalParams.ts @@ -6,9 +6,9 @@ export type FileChangeRequestApprovalParams = { threadId: string, turnId: string /** * Optional explanatory reason (e.g. request for extra write access). */ -reason: string | null, +reason?: string | null, /** * [UNSTABLE] When set, the agent is asking the user to allow writes under this root * for the remainder of the session (unclear if this is honored today). */ -grantRoot: string | null, }; +grantRoot?: string | null, }; diff --git a/src/app-server/v2/GetAccountParams.ts b/src/app-server/v2/GetAccountParams.ts index 77d28e88..efc646d1 100644 --- a/src/app-server/v2/GetAccountParams.ts +++ b/src/app-server/v2/GetAccountParams.ts @@ -2,4 +2,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type GetAccountParams = { refreshToken: boolean, }; +export type GetAccountParams = { +/** + * When `true`, requests a proactive token refresh before returning. + * + * In managed auth mode this triggers the normal refresh-token flow. In + * external auth mode this flag is ignored. Clients should refresh tokens + * themselves and call `account/login/start` with `chatgptAuthTokens`. + */ +refreshToken: boolean, }; diff --git a/src/app-server/v2/ListMcpServerStatusParams.ts b/src/app-server/v2/ListMcpServerStatusParams.ts index 8027087f..05c02c19 100644 --- a/src/app-server/v2/ListMcpServerStatusParams.ts +++ b/src/app-server/v2/ListMcpServerStatusParams.ts @@ -6,8 +6,8 @@ export type ListMcpServerStatusParams = { /** * Opaque pagination cursor returned by a previous call. */ -cursor: string | null, +cursor?: string | null, /** * Optional page size; defaults to a server-defined value. */ -limit: number | null, }; +limit?: number | null, }; diff --git a/src/app-server/v2/LoginAccountParams.ts b/src/app-server/v2/LoginAccountParams.ts index cf84337e..5c1f4c02 100644 --- a/src/app-server/v2/LoginAccountParams.ts +++ b/src/app-server/v2/LoginAccountParams.ts @@ -2,4 +2,16 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type LoginAccountParams = { "type": "apiKey", apiKey: string, } | { "type": "chatgpt" }; +export type LoginAccountParams = { "type": "apiKey", apiKey: string, } | { "type": "chatgpt" } | { "type": "chatgptAuthTokens", +/** + * ID token (JWT) supplied by the client. + * + * This token is used for identity and account metadata (email, plan type, + * workspace id). + */ +idToken: string, +/** + * Access token (JWT) supplied by the client. + * This token is used for backend API requests. + */ +accessToken: string, }; diff --git a/src/app-server/v2/LoginAccountResponse.ts b/src/app-server/v2/LoginAccountResponse.ts index cc90d9bf..cd79f6c8 100644 --- a/src/app-server/v2/LoginAccountResponse.ts +++ b/src/app-server/v2/LoginAccountResponse.ts @@ -6,4 +6,4 @@ export type LoginAccountResponse = { "type": "apiKey", } | { "type": "chatgpt", /** * URL the client should open in a browser to initiate the OAuth flow. */ -authUrl: string, }; +authUrl: string, } | { "type": "chatgptAuthTokens", }; diff --git a/src/app-server/v2/McpServerOauthLoginParams.ts b/src/app-server/v2/McpServerOauthLoginParams.ts index 0ad8f394..a61c3046 100644 --- a/src/app-server/v2/McpServerOauthLoginParams.ts +++ b/src/app-server/v2/McpServerOauthLoginParams.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 McpServerOauthLoginParams = { name: string, scopes?: Array, timeoutSecs?: bigint, }; +export type McpServerOauthLoginParams = { name: string, scopes?: Array | null, timeoutSecs?: bigint | null, }; diff --git a/src/app-server/v2/McpToolCallResult.ts b/src/app-server/v2/McpToolCallResult.ts index 93f942a7..f493a860 100644 --- a/src/app-server/v2/McpToolCallResult.ts +++ b/src/app-server/v2/McpToolCallResult.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 { ContentBlock } from "../ContentBlock"; import type { JsonValue } from "../serde_json/JsonValue"; -export type McpToolCallResult = { content: Array, structuredContent: JsonValue | null, }; +export type McpToolCallResult = { content: Array, structuredContent: JsonValue | null, }; diff --git a/src/app-server/v2/Model.ts b/src/app-server/v2/Model.ts index b664024d..7528a8fa 100644 --- a/src/app-server/v2/Model.ts +++ b/src/app-server/v2/Model.ts @@ -1,7 +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. +import type { InputModality } from "../InputModality"; import type { ReasoningEffort } from "../ReasoningEffort"; import type { ReasoningEffortOption } from "./ReasoningEffortOption"; -export type Model = { id: string, model: string, displayName: string, description: string, supportedReasoningEfforts: Array, defaultReasoningEffort: ReasoningEffort, supportsPersonality: boolean, isDefault: boolean, }; +export type Model = { id: string, model: string, upgrade: string | null, displayName: string, description: string, supportedReasoningEfforts: Array, defaultReasoningEffort: ReasoningEffort, inputModalities: Array, supportsPersonality: boolean, isDefault: boolean, }; diff --git a/src/app-server/v2/ModelListParams.ts b/src/app-server/v2/ModelListParams.ts index a2b7214b..b0bc5326 100644 --- a/src/app-server/v2/ModelListParams.ts +++ b/src/app-server/v2/ModelListParams.ts @@ -6,8 +6,8 @@ export type ModelListParams = { /** * Opaque pagination cursor returned by a previous call. */ -cursor: string | null, +cursor?: string | null, /** * Optional page size; defaults to a reasonable server-side value. */ -limit: number | null, }; +limit?: number | null, }; diff --git a/src/app-server/v2/PlanDeltaNotification.ts b/src/app-server/v2/PlanDeltaNotification.ts new file mode 100644 index 00000000..5ab35966 --- /dev/null +++ b/src/app-server/v2/PlanDeltaNotification.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. + +/** + * EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should + * not assume concatenated deltas match the completed plan item content. + */ +export type PlanDeltaNotification = { threadId: string, turnId: string, itemId: string, delta: string, }; diff --git a/src/app-server/v2/RemoteSkillSummary.ts b/src/app-server/v2/RemoteSkillSummary.ts new file mode 100644 index 00000000..7bf57b3b --- /dev/null +++ b/src/app-server/v2/RemoteSkillSummary.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 RemoteSkillSummary = { id: string, name: string, description: string, }; diff --git a/src/app-server/v2/ResidencyRequirement.ts b/src/app-server/v2/ResidencyRequirement.ts new file mode 100644 index 00000000..1699c84e --- /dev/null +++ b/src/app-server/v2/ResidencyRequirement.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 ResidencyRequirement = "us"; diff --git a/src/app-server/v2/ReviewStartParams.ts b/src/app-server/v2/ReviewStartParams.ts index c36533f2..363e6dda 100644 --- a/src/app-server/v2/ReviewStartParams.ts +++ b/src/app-server/v2/ReviewStartParams.ts @@ -9,4 +9,4 @@ 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`). */ -delivery: ReviewDelivery | null, }; +delivery?: ReviewDelivery | null, }; diff --git a/src/app-server/v2/SkillDependencies.ts b/src/app-server/v2/SkillDependencies.ts new file mode 100644 index 00000000..e2dd4f42 --- /dev/null +++ b/src/app-server/v2/SkillDependencies.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 { SkillToolDependency } from "./SkillToolDependency"; + +export type SkillDependencies = { tools: Array, }; diff --git a/src/app-server/v2/SkillMetadata.ts b/src/app-server/v2/SkillMetadata.ts index 513acda9..52c0cd49 100644 --- a/src/app-server/v2/SkillMetadata.ts +++ b/src/app-server/v2/SkillMetadata.ts @@ -1,11 +1,12 @@ // 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 { SkillDependencies } from "./SkillDependencies"; import type { SkillInterface } from "./SkillInterface"; import type { SkillScope } from "./SkillScope"; export type SkillMetadata = { name: string, description: string, /** - * Legacy short_description from SKILL.md. Prefer SKILL.toml interface.short_description. + * Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description. */ -shortDescription?: string, interface?: SkillInterface, path: string, scope: SkillScope, enabled: boolean, }; +shortDescription?: string, interface?: SkillInterface, dependencies?: SkillDependencies, path: string, scope: SkillScope, enabled: boolean, }; diff --git a/src/app-server/v2/SkillToolDependency.ts b/src/app-server/v2/SkillToolDependency.ts new file mode 100644 index 00000000..a5da45e1 --- /dev/null +++ b/src/app-server/v2/SkillToolDependency.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 SkillToolDependency = { type: string, value: string, description?: string, transport?: string, command?: string, url?: string, }; diff --git a/src/app-server/v2/SkillsRemoteReadParams.ts b/src/app-server/v2/SkillsRemoteReadParams.ts new file mode 100644 index 00000000..9f917876 --- /dev/null +++ b/src/app-server/v2/SkillsRemoteReadParams.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 SkillsRemoteReadParams = Record; diff --git a/src/app-server/v2/SkillsRemoteReadResponse.ts b/src/app-server/v2/SkillsRemoteReadResponse.ts new file mode 100644 index 00000000..c1c7b1cc --- /dev/null +++ b/src/app-server/v2/SkillsRemoteReadResponse.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 { RemoteSkillSummary } from "./RemoteSkillSummary"; + +export type SkillsRemoteReadResponse = { data: Array, }; diff --git a/src/app-server/v2/SkillsRemoteWriteParams.ts b/src/app-server/v2/SkillsRemoteWriteParams.ts new file mode 100644 index 00000000..857b609e --- /dev/null +++ b/src/app-server/v2/SkillsRemoteWriteParams.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 SkillsRemoteWriteParams = { hazelnutId: string, isPreload: boolean, }; diff --git a/src/app-server/v2/SkillsRemoteWriteResponse.ts b/src/app-server/v2/SkillsRemoteWriteResponse.ts new file mode 100644 index 00000000..cf1665ab --- /dev/null +++ b/src/app-server/v2/SkillsRemoteWriteResponse.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 SkillsRemoteWriteResponse = { id: string, name: string, path: string, }; diff --git a/src/app-server/v2/ThreadCompactStartParams.ts b/src/app-server/v2/ThreadCompactStartParams.ts new file mode 100644 index 00000000..a60b2c28 --- /dev/null +++ b/src/app-server/v2/ThreadCompactStartParams.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 ThreadCompactStartParams = { threadId: string, }; diff --git a/src/app-server/v2/ThreadCompactStartResponse.ts b/src/app-server/v2/ThreadCompactStartResponse.ts new file mode 100644 index 00000000..3794feb2 --- /dev/null +++ b/src/app-server/v2/ThreadCompactStartResponse.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 ThreadCompactStartResponse = Record; diff --git a/src/app-server/v2/ThreadForkParams.ts b/src/app-server/v2/ThreadForkParams.ts index 4ecb1b39..eae506c2 100644 --- a/src/app-server/v2/ThreadForkParams.ts +++ b/src/app-server/v2/ThreadForkParams.ts @@ -19,8 +19,8 @@ export type ThreadForkParams = { threadId: string, * [UNSTABLE] Specify the rollout path to fork from. * If specified, the thread_id param will be ignored. */ -path: string | null, +path?: string | null, /** * Configuration overrides for the forked thread, if any. */ -model: string | null, modelProvider: string | null, cwd: string | null, approvalPolicy: AskForApproval | null, sandbox: SandboxMode | null, config: { [key in string]?: JsonValue } | null, baseInstructions: string | null, developerInstructions: string | null, }; +model?: string | null, modelProvider?: string | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, }; diff --git a/src/app-server/v2/ThreadItem.ts b/src/app-server/v2/ThreadItem.ts index 475b2a60..fa098ed3 100644 --- a/src/app-server/v2/ThreadItem.ts +++ b/src/app-server/v2/ThreadItem.ts @@ -13,8 +13,9 @@ import type { McpToolCallResult } from "./McpToolCallResult"; import type { McpToolCallStatus } from "./McpToolCallStatus"; import type { PatchApplyStatus } from "./PatchApplyStatus"; import type { UserInput } from "./UserInput"; +import type { WebSearchAction } from "./WebSearchAction"; -export type ThreadItem = { "type": "userMessage", id: string, content: Array, } | { "type": "agentMessage", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, +export type ThreadItem = { "type": "userMessage", id: string, content: Array, } | { "type": "agentMessage", id: string, text: string, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, /** * The command to be executed. */ @@ -77,4 +78,4 @@ prompt: string | null, /** * Last known status of the target agents, when available. */ -agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, } | { "type": "imageView", id: string, path: string, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, }; +agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: string, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, }; diff --git a/src/app-server/v2/ThreadListParams.ts b/src/app-server/v2/ThreadListParams.ts index 357fdd21..c54f323f 100644 --- a/src/app-server/v2/ThreadListParams.ts +++ b/src/app-server/v2/ThreadListParams.ts @@ -8,27 +8,27 @@ export type ThreadListParams = { /** * Opaque pagination cursor returned by a previous call. */ -cursor: string | null, +cursor?: string | null, /** * Optional page size; defaults to a reasonable server-side value. */ -limit: number | null, +limit?: number | null, /** * Optional sort key; defaults to created_at. */ -sortKey: ThreadSortKey | null, +sortKey?: ThreadSortKey | null, /** * Optional provider filter; when set, only sessions recorded under these * providers are returned. When present but empty, includes all providers. */ -modelProviders: Array | null, +modelProviders?: Array | null, /** * Optional source filter; when set, only sessions from these source kinds * are returned. When omitted or empty, defaults to interactive sources. */ -sourceKinds: Array | null, +sourceKinds?: Array | null, /** * Optional archived filter; when set to true, only archived threads are returned. * If false or null, only non-archived threads are returned. */ -archived: boolean | null, }; +archived?: boolean | null, }; diff --git a/src/app-server/v2/ThreadLoadedListParams.ts b/src/app-server/v2/ThreadLoadedListParams.ts index 5419b00b..ef1e0ac0 100644 --- a/src/app-server/v2/ThreadLoadedListParams.ts +++ b/src/app-server/v2/ThreadLoadedListParams.ts @@ -6,8 +6,8 @@ export type ThreadLoadedListParams = { /** * Opaque pagination cursor returned by a previous call. */ -cursor: string | null, +cursor?: string | null, /** * Optional page size; defaults to no limit. */ -limit: number | null, }; +limit?: number | null, }; diff --git a/src/app-server/v2/ThreadNameUpdatedNotification.ts b/src/app-server/v2/ThreadNameUpdatedNotification.ts new file mode 100644 index 00000000..c944b5aa --- /dev/null +++ b/src/app-server/v2/ThreadNameUpdatedNotification.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 ThreadNameUpdatedNotification = { threadId: string, threadName?: string, }; diff --git a/src/app-server/v2/ThreadResumeParams.ts b/src/app-server/v2/ThreadResumeParams.ts index dca685aa..64d1f77d 100644 --- a/src/app-server/v2/ThreadResumeParams.ts +++ b/src/app-server/v2/ThreadResumeParams.ts @@ -24,13 +24,13 @@ export type ThreadResumeParams = { threadId: string, * If specified, the thread will be resumed with the provided history * instead of loaded from disk. */ -history: Array | null, +history?: Array | null, /** * [UNSTABLE] Specify the rollout path to resume from. * If specified, the thread_id param will be ignored. */ -path: string | null, +path?: string | null, /** * Configuration overrides for the resumed thread, if any. */ -model: string | null, modelProvider: string | null, cwd: string | null, approvalPolicy: AskForApproval | null, sandbox: SandboxMode | null, config: { [key in string]?: JsonValue } | null, baseInstructions: string | null, developerInstructions: string | null, personality: Personality | null, }; +model?: string | null, modelProvider?: string | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, }; diff --git a/src/app-server/v2/ThreadSetNameParams.ts b/src/app-server/v2/ThreadSetNameParams.ts new file mode 100644 index 00000000..82b9b3a1 --- /dev/null +++ b/src/app-server/v2/ThreadSetNameParams.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 ThreadSetNameParams = { threadId: string, name: string, }; diff --git a/src/app-server/v2/ThreadSetNameResponse.ts b/src/app-server/v2/ThreadSetNameResponse.ts new file mode 100644 index 00000000..09143d25 --- /dev/null +++ b/src/app-server/v2/ThreadSetNameResponse.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 ThreadSetNameResponse = Record; diff --git a/src/app-server/v2/ThreadStartParams.ts b/src/app-server/v2/ThreadStartParams.ts index bb731670..b0f1d1e2 100644 --- a/src/app-server/v2/ThreadStartParams.ts +++ b/src/app-server/v2/ThreadStartParams.ts @@ -4,14 +4,12 @@ import type { Personality } from "../Personality"; import type { JsonValue } from "../serde_json/JsonValue"; import type { AskForApproval } from "./AskForApproval"; -import type { DynamicToolSpec } from "./DynamicToolSpec"; import type { SandboxMode } from "./SandboxMode"; -export type ThreadStartParams = { model: string | null, modelProvider: string | null, cwd: string | null, approvalPolicy: AskForApproval | null, sandbox: SandboxMode | null, config: { [key in string]?: JsonValue } | null, baseInstructions: string | null, developerInstructions: string | null, personality: Personality | null, ephemeral: boolean | null, dynamicTools: Array | null, -/** +export type ThreadStartParams = {model?: string | null, modelProvider?: string | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, ephemeral?: boolean | null, /** * If true, opt into emitting raw response items on the event stream. * * This is for internal use only (e.g. Codex Cloud). * (TODO): Figure out a better way to categorize internal / experimental events & protocols. */ -experimentalRawEvents: boolean, }; +experimentalRawEvents: boolean}; diff --git a/src/app-server/v2/ToolRequestUserInputQuestion.ts b/src/app-server/v2/ToolRequestUserInputQuestion.ts index fa80f23d..1afc4e47 100644 --- a/src/app-server/v2/ToolRequestUserInputQuestion.ts +++ b/src/app-server/v2/ToolRequestUserInputQuestion.ts @@ -4,6 +4,6 @@ import type { ToolRequestUserInputOption } from "./ToolRequestUserInputOption"; /** - * EXPERIMENTAL. Represents one request_user_input question and its optional options. + * EXPERIMENTAL. Represents one request_user_input question and its required options. */ -export type ToolRequestUserInputQuestion = { id: string, header: string, question: string, isOther: boolean, options: Array | null, }; +export type ToolRequestUserInputQuestion = { id: string, header: string, question: string, isOther: boolean, isSecret: boolean, options: Array | null, }; diff --git a/src/app-server/v2/TurnStartParams.ts b/src/app-server/v2/TurnStartParams.ts index 4987c9e5..8cf1aaf2 100644 --- a/src/app-server/v2/TurnStartParams.ts +++ b/src/app-server/v2/TurnStartParams.ts @@ -14,37 +14,37 @@ export type TurnStartParams = { threadId: string, input: Array, /** * Override the working directory for this turn and subsequent turns. */ -cwd: string | null, +cwd?: string | null, /** * Override the approval policy for this turn and subsequent turns. */ -approvalPolicy: AskForApproval | null, +approvalPolicy?: AskForApproval | null, /** * Override the sandbox policy for this turn and subsequent turns. */ -sandboxPolicy: SandboxPolicy | null, +sandboxPolicy?: SandboxPolicy | null, /** * Override the model for this turn and subsequent turns. */ -model: string | null, +model?: string | null, /** * Override the reasoning effort for this turn and subsequent turns. */ -effort: ReasoningEffort | null, +effort?: ReasoningEffort | null, /** * Override the reasoning summary for this turn and subsequent turns. */ -summary: ReasoningSummary | null, +summary?: ReasoningSummary | null, /** * Override the personality for this turn and subsequent turns. */ -personality: Personality | null, +personality?: Personality | null, /** * Optional JSON Schema used to constrain the final assistant message for this turn. */ -outputSchema: JsonValue | null, +outputSchema?: JsonValue | null, /** * EXPERIMENTAL - set a pre-set collaboration mode. * Takes precedence over model, reasoning_effort, and developer instructions if set. */ -collaborationMode: CollaborationMode | null, }; +collaborationMode?: CollaborationMode | null, }; diff --git a/src/app-server/v2/UserInput.ts b/src/app-server/v2/UserInput.ts index e983fce1..65196fe5 100644 --- a/src/app-server/v2/UserInput.ts +++ b/src/app-server/v2/UserInput.ts @@ -7,4 +7,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", url: string, } | { "type": "localImage", path: string, } | { "type": "skill", name: string, path: string, }; +text_elements: Array, } | { "type": "image", url: string, } | { "type": "localImage", path: string, } | { "type": "skill", name: string, path: string, } | { "type": "mention", name: string, path: string, }; diff --git a/src/app-server/v2/WebSearchAction.ts b/src/app-server/v2/WebSearchAction.ts new file mode 100644 index 00000000..309bff45 --- /dev/null +++ b/src/app-server/v2/WebSearchAction.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 WebSearchAction = { "type": "search", query: string | null, queries: Array | null, } | { "type": "openPage", url: string | null, } | { "type": "findInPage", url: string | null, pattern: string | null, } | { "type": "other" }; diff --git a/src/app-server/v2/index.ts b/src/app-server/v2/index.ts index e425491b..e78023e8 100644 --- a/src/app-server/v2/index.ts +++ b/src/app-server/v2/index.ts @@ -15,13 +15,14 @@ export type { ByteRange } from "./ByteRange"; export type { CancelLoginAccountParams } from "./CancelLoginAccountParams"; export type { CancelLoginAccountResponse } from "./CancelLoginAccountResponse"; export type { CancelLoginAccountStatus } from "./CancelLoginAccountStatus"; +export type { ChatgptAuthTokensRefreshParams } from "./ChatgptAuthTokensRefreshParams"; +export type { ChatgptAuthTokensRefreshReason } from "./ChatgptAuthTokensRefreshReason"; +export type { ChatgptAuthTokensRefreshResponse } from "./ChatgptAuthTokensRefreshResponse"; export type { CodexErrorInfo } from "./CodexErrorInfo"; export type { CollabAgentState } from "./CollabAgentState"; export type { CollabAgentStatus } from "./CollabAgentStatus"; export type { CollabAgentTool } from "./CollabAgentTool"; export type { CollabAgentToolCallStatus } from "./CollabAgentToolCallStatus"; -export type { CollaborationModeListParams } from "./CollaborationModeListParams"; -export type { CollaborationModeListResponse } from "./CollaborationModeListResponse"; export type { CommandAction } from "./CommandAction"; export type { CommandExecParams } from "./CommandExecParams"; export type { CommandExecResponse } from "./CommandExecResponse"; @@ -49,6 +50,7 @@ export type { ConfigWriteResponse } from "./ConfigWriteResponse"; export type { ContextCompactedNotification } from "./ContextCompactedNotification"; export type { CreditsSnapshot } from "./CreditsSnapshot"; export type { DeprecationNoticeNotification } from "./DeprecationNoticeNotification"; +export type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem"; export type { DynamicToolCallParams } from "./DynamicToolCallParams"; export type { DynamicToolCallResponse } from "./DynamicToolCallResponse"; export type { DynamicToolSpec } from "./DynamicToolSpec"; @@ -93,6 +95,7 @@ export type { NetworkAccess } from "./NetworkAccess"; export type { OverriddenMetadata } from "./OverriddenMetadata"; export type { PatchApplyStatus } from "./PatchApplyStatus"; export type { PatchChangeKind } from "./PatchChangeKind"; +export type { PlanDeltaNotification } from "./PlanDeltaNotification"; export type { ProfileV2 } from "./ProfileV2"; export type { RateLimitSnapshot } from "./RateLimitSnapshot"; export type { RateLimitWindow } from "./RateLimitWindow"; @@ -101,6 +104,8 @@ export type { ReasoningEffortOption } from "./ReasoningEffortOption"; export type { ReasoningSummaryPartAddedNotification } from "./ReasoningSummaryPartAddedNotification"; export type { ReasoningSummaryTextDeltaNotification } from "./ReasoningSummaryTextDeltaNotification"; export type { ReasoningTextDeltaNotification } from "./ReasoningTextDeltaNotification"; +export type { RemoteSkillSummary } from "./RemoteSkillSummary"; +export type { ResidencyRequirement } from "./ResidencyRequirement"; export type { ReviewDelivery } from "./ReviewDelivery"; export type { ReviewStartParams } from "./ReviewStartParams"; export type { ReviewStartResponse } from "./ReviewStartResponse"; @@ -110,15 +115,21 @@ export type { SandboxMode } from "./SandboxMode"; export type { SandboxPolicy } from "./SandboxPolicy"; export type { SandboxWorkspaceWrite } from "./SandboxWorkspaceWrite"; export type { SessionSource } from "./SessionSource"; +export type { SkillDependencies } from "./SkillDependencies"; export type { SkillErrorInfo } from "./SkillErrorInfo"; export type { SkillInterface } from "./SkillInterface"; export type { SkillMetadata } from "./SkillMetadata"; export type { SkillScope } from "./SkillScope"; +export type { SkillToolDependency } from "./SkillToolDependency"; export type { SkillsConfigWriteParams } from "./SkillsConfigWriteParams"; export type { SkillsConfigWriteResponse } from "./SkillsConfigWriteResponse"; export type { SkillsListEntry } from "./SkillsListEntry"; export type { SkillsListParams } from "./SkillsListParams"; export type { SkillsListResponse } from "./SkillsListResponse"; +export type { SkillsRemoteReadParams } from "./SkillsRemoteReadParams"; +export type { SkillsRemoteReadResponse } from "./SkillsRemoteReadResponse"; +export type { SkillsRemoteWriteParams } from "./SkillsRemoteWriteParams"; +export type { SkillsRemoteWriteResponse } from "./SkillsRemoteWriteResponse"; export type { TerminalInteractionNotification } from "./TerminalInteractionNotification"; export type { TextElement } from "./TextElement"; export type { TextPosition } from "./TextPosition"; @@ -128,6 +139,8 @@ export type { ThreadArchiveParams } from "./ThreadArchiveParams"; export type { ThreadArchiveResponse } from "./ThreadArchiveResponse"; export type { ThreadCompactParams } from "./ThreadCompactParams"; export type { ThreadCompactResponse } from "./ThreadCompactResponse"; +export type { ThreadCompactStartParams } from "./ThreadCompactStartParams"; +export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse"; export type { ThreadForkParams } from "./ThreadForkParams"; export type { ThreadForkResponse } from "./ThreadForkResponse"; export type { ThreadItem } from "./ThreadItem"; @@ -135,12 +148,15 @@ export type { ThreadListParams } from "./ThreadListParams"; export type { ThreadListResponse } from "./ThreadListResponse"; export type { ThreadLoadedListParams } from "./ThreadLoadedListParams"; export type { ThreadLoadedListResponse } from "./ThreadLoadedListResponse"; +export type { ThreadNameUpdatedNotification } from "./ThreadNameUpdatedNotification"; export type { ThreadReadParams } from "./ThreadReadParams"; export type { ThreadReadResponse } from "./ThreadReadResponse"; export type { ThreadResumeParams } from "./ThreadResumeParams"; export type { ThreadResumeResponse } from "./ThreadResumeResponse"; export type { ThreadRollbackParams } from "./ThreadRollbackParams"; export type { ThreadRollbackResponse } from "./ThreadRollbackResponse"; +export type { ThreadSetNameParams } from "./ThreadSetNameParams"; +export type { ThreadSetNameResponse } from "./ThreadSetNameResponse"; export type { ThreadSortKey } from "./ThreadSortKey"; export type { ThreadSourceKind } from "./ThreadSourceKind"; export type { ThreadStartParams } from "./ThreadStartParams"; @@ -171,5 +187,6 @@ export type { TurnStartResponse } from "./TurnStartResponse"; export type { TurnStartedNotification } from "./TurnStartedNotification"; export type { TurnStatus } from "./TurnStatus"; export type { UserInput } from "./UserInput"; +export type { WebSearchAction } from "./WebSearchAction"; export type { WindowsWorldWritableWarningNotification } from "./WindowsWorldWritableWarningNotification"; export type { WriteStatus } from "./WriteStatus"; diff --git a/src/login.ts b/src/login.ts index 1e9a026d..7de446d3 100644 --- a/src/login.ts +++ b/src/login.ts @@ -78,7 +78,7 @@ async function login(options: LoginOptions): Promise { }; logger.log("Initializing with client", {name: clientInfo.name, version: clientInfo.version}); - await appServerClient.initialize({clientInfo}); + await appServerClient.initialize({clientInfo: clientInfo, capabilities: null}); const accountStatus = await appServerClient.accountRead({refreshToken: false}); if (accountStatus.account) {