From 60dba267ba09c0d26557e1275cbf1759586f94ba Mon Sep 17 00:00:00 2001 From: murashit Date: Thu, 2 Jul 2026 12:18:59 +0900 Subject: [PATCH] Update app-server types for Codex CLI 0.142.5 --- README.md | 2 +- src/app-server/services/threads.ts | 1 - .../app-server/LegacyAppPathString.ts | 8 +++---- src/generated/app-server/ResponseItem.ts | 2 +- ...ModelSafetyBufferingUpdatedNotification.ts | 2 +- .../app-server/v2/PluginInterface.ts | 8 +++++++ .../app-server/v2/ThreadForkResponse.ts | 2 +- .../app-server/v2/ThreadResumeResponse.ts | 2 +- src/generated/app-server/v2/ThreadSettings.ts | 2 +- .../v2/ThreadSettingsUpdateParams.ts | 2 +- .../app-server/v2/ThreadStartParams.ts | 4 +--- .../app-server/v2/ThreadStartResponse.ts | 2 +- .../app-server/v2/TurnStartParams.ts | 4 +--- tests/app-server/threads.test.ts | 24 ++++++++++++++++++- 14 files changed, 45 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d945da9b..4df3c5bd 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Threads can be archived as Markdown notes with a configurable folder, filename t | ------------------------ | --------- | --------------------------------------------------------------------------------------------------- | | `manifest.minAppVersion` | `1.12.0` | Minimum Obsidian desktop version declared for plugin loading. | | `obsidian` API types | `1.12.3` | TypeScript API package used for compile-time checks; kept in the same minor as `manifest` baseline. | -| `codex.testedCliVersion` | `0.142.0` | Track app-server compatibility by Codex CLI minor version. | +| `codex.testedCliVersion` | `0.142.5` | Track app-server compatibility by Codex CLI minor version. | Codex Panel depends on the experimental `codex app-server` API. diff --git a/src/app-server/services/threads.ts b/src/app-server/services/threads.ts index 6ef6decf..0943c586 100644 --- a/src/app-server/services/threads.ts +++ b/src/app-server/services/threads.ts @@ -86,7 +86,6 @@ export function startEphemeralThread( ephemeral: true, sandbox: "read-only", approvalPolicy: "never", - multiAgentMode: "none", environments: [], }); } diff --git a/src/generated/app-server/LegacyAppPathString.ts b/src/generated/app-server/LegacyAppPathString.ts index 04e465b8..e39784a8 100644 --- a/src/generated/app-server/LegacyAppPathString.ts +++ b/src/generated/app-server/LegacyAppPathString.ts @@ -11,10 +11,10 @@ * * When converting from [`PathUri`], "native" refers to the supplied * [`PathConvention`], which may be foreign to the operating system running - * this process. The inner string is private so path-producing code must convert - * from [`AbsolutePathBuf`] or use [`Self::from_path_uri`] instead of bypassing - * the intended conversion boundary. Non-UTF-8 paths are converted to UTF-8 - * lossily because this API value is serialized as a JSON string. + * this process. The inner string is private so path-producing code must use a + * path conversion method instead of bypassing the intended conversion + * boundary. Non-UTF-8 paths are converted to UTF-8 lossily because this API + * value is serialized as a JSON string. * * Deserialization accepts any UTF-8 string without interpreting or validating * it. That unrestricted construction path is intentionally available only to diff --git a/src/generated/app-server/ResponseItem.ts b/src/generated/app-server/ResponseItem.ts index 074e11a1..62547d3e 100644 --- a/src/generated/app-server/ResponseItem.ts +++ b/src/generated/app-server/ResponseItem.ts @@ -20,4 +20,4 @@ id?: string, /** * Set when using the Responses API. */ -call_id: string | null, status: LocalShellStatus, action: LocalShellAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call", id?: string, name: string, namespace?: string, arguments: string, call_id: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_call", id?: string, call_id: string | null, status?: string, execution: string, arguments: unknown, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call_output", id?: string, call_id: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call", id?: string, status?: string, call_id: string, name: string, input: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call_output", id?: string, call_id: string, name?: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_output", id?: string, call_id: string | null, status: string, execution: string, tools: unknown[], internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "web_search_call", id?: string, status?: string, action?: WebSearchAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "image_generation_call", id?: string, status: string, revised_prompt?: string, result: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction", id?: string, encrypted_content: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction_trigger", internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "context_compaction", id?: string, encrypted_content?: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "other" }; +call_id: string | null, status: LocalShellStatus, action: LocalShellAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call", id?: string, name: string, namespace?: string, arguments: string, call_id: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_call", id?: string, call_id: string | null, status?: string, execution: string, arguments: unknown, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "function_call_output", id?: string, call_id: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call", id?: string, status?: string, call_id: string, name: string, input: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "custom_tool_call_output", id?: string, call_id: string, name?: string, output: FunctionCallOutputBody, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "tool_search_output", id?: string, call_id: string | null, status: string, execution: string, tools: unknown[], internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "web_search_call", id?: string, status?: string, action?: WebSearchAction, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "image_generation_call", id?: string, status: string, revised_prompt?: string, result: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction", id?: string, encrypted_content: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "compaction_trigger", } | { "type": "context_compaction", id?: string, encrypted_content?: string, internal_chat_message_metadata_passthrough?: InternalChatMessageMetadataPassthrough, } | { "type": "other" }; diff --git a/src/generated/app-server/v2/ModelSafetyBufferingUpdatedNotification.ts b/src/generated/app-server/v2/ModelSafetyBufferingUpdatedNotification.ts index 484f8c61..5abc9f3b 100644 --- a/src/generated/app-server/v2/ModelSafetyBufferingUpdatedNotification.ts +++ b/src/generated/app-server/v2/ModelSafetyBufferingUpdatedNotification.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 ModelSafetyBufferingUpdatedNotification = { threadId: string, turnId: string, model: string, useCases: Array, reasons: Array, }; +export type ModelSafetyBufferingUpdatedNotification = { threadId: string, turnId: string, model: string, useCases: Array, reasons: Array, showBufferingUi: boolean, fasterModel: string | null, }; diff --git a/src/generated/app-server/v2/PluginInterface.ts b/src/generated/app-server/v2/PluginInterface.ts index 4e97ee66..1e57d497 100644 --- a/src/generated/app-server/v2/PluginInterface.ts +++ b/src/generated/app-server/v2/PluginInterface.ts @@ -21,10 +21,18 @@ composerIconUrl: string | null, * Local logo path, resolved from the installed plugin package. */ logo: AbsolutePathBuf | null, +/** + * Local dark-mode logo path, resolved from the installed plugin package. + */ +logoDark: AbsolutePathBuf | null, /** * Remote logo URL from the plugin catalog. */ logoUrl: string | null, +/** + * Remote dark-mode logo URL from the plugin catalog. + */ +logoUrlDark: string | null, /** * Local screenshot paths, resolved from the installed plugin package. */ diff --git a/src/generated/app-server/v2/ThreadForkResponse.ts b/src/generated/app-server/v2/ThreadForkResponse.ts index 925fa8e2..4b089a73 100644 --- a/src/generated/app-server/v2/ThreadForkResponse.ts +++ b/src/generated/app-server/v2/ThreadForkResponse.ts @@ -36,6 +36,6 @@ sandbox: SandboxPolicy, */ activePermissionProfile: ActivePermissionProfile | null, reasoningEffort: ReasoningEffort | null, /** - * Current multi-agent mode for this thread. + * @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior. */ multiAgentMode: MultiAgentMode, }; diff --git a/src/generated/app-server/v2/ThreadResumeResponse.ts b/src/generated/app-server/v2/ThreadResumeResponse.ts index bcdcda17..75b68479 100644 --- a/src/generated/app-server/v2/ThreadResumeResponse.ts +++ b/src/generated/app-server/v2/ThreadResumeResponse.ts @@ -37,7 +37,7 @@ sandbox: SandboxPolicy, */ activePermissionProfile: ActivePermissionProfile | null, reasoningEffort: ReasoningEffort | null, /** - * Current multi-agent mode for this thread. + * @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior. */ multiAgentMode: MultiAgentMode, /** diff --git a/src/generated/app-server/v2/ThreadSettings.ts b/src/generated/app-server/v2/ThreadSettings.ts index 970b438b..5f2f1040 100644 --- a/src/generated/app-server/v2/ThreadSettings.ts +++ b/src/generated/app-server/v2/ThreadSettings.ts @@ -14,6 +14,6 @@ import type { SandboxPolicy } from "./SandboxPolicy"; export type ThreadSettings = { cwd: AbsolutePathBuf, approvalPolicy: AskForApproval, approvalsReviewer: ApprovalsReviewer, sandboxPolicy: SandboxPolicy, activePermissionProfile: ActivePermissionProfile | null, model: string, modelProvider: string, serviceTier: string | null, effort: ReasoningEffort | null, summary: ReasoningSummary | null, collaborationMode: CollaborationMode, /** - * Current multi-agent mode for this thread. + * @deprecated Always `explicitRequestOnly`. Use `effort` for Ultra behavior. */ multiAgentMode: MultiAgentMode, personality: Personality | null, }; diff --git a/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts b/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts index 6225b2ce..33c17c83 100644 --- a/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts +++ b/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts @@ -58,7 +58,7 @@ summary?: ReasoningSummary | null, */ collaborationMode?: CollaborationMode | null, /** - * Select the multi-agent mode for subsequent turns. + * @deprecated Ignored. Use `effort: "ultra"` for proactive multi-agent behavior. */ multiAgentMode?: MultiAgentMode | null, /** diff --git a/src/generated/app-server/v2/ThreadStartParams.ts b/src/generated/app-server/v2/ThreadStartParams.ts index 579685d1..a1fc6eb5 100644 --- a/src/generated/app-server/v2/ThreadStartParams.ts +++ b/src/generated/app-server/v2/ThreadStartParams.ts @@ -30,9 +30,7 @@ approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, */ permissions?: string | null, config?: { [key in string]?: JsonValue } | null, serviceName?: string | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, /** - * Set the initial multi-agent mode for this thread. `none` leaves the - * multi-agent tools available without injecting mode instructions. - * Omitted defaults to `explicitRequestOnly`. + * @deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior. */ multiAgentMode?: MultiAgentMode | null, ephemeral?: boolean | null, sessionStartSource?: ThreadStartSource | null, /** diff --git a/src/generated/app-server/v2/ThreadStartResponse.ts b/src/generated/app-server/v2/ThreadStartResponse.ts index 84acf30a..13cf8f97 100644 --- a/src/generated/app-server/v2/ThreadStartResponse.ts +++ b/src/generated/app-server/v2/ThreadStartResponse.ts @@ -36,6 +36,6 @@ sandbox: SandboxPolicy, */ activePermissionProfile: ActivePermissionProfile | null, reasoningEffort: ReasoningEffort | null, /** - * Current multi-agent mode for this thread. + * @deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior. */ multiAgentMode: MultiAgentMode, }; diff --git a/src/generated/app-server/v2/TurnStartParams.ts b/src/generated/app-server/v2/TurnStartParams.ts index 7a5612e4..c1a4ec2d 100644 --- a/src/generated/app-server/v2/TurnStartParams.ts +++ b/src/generated/app-server/v2/TurnStartParams.ts @@ -100,8 +100,6 @@ outputSchema?: JsonValue | null, */ collaborationMode?: CollaborationMode | null, /** - * Controls multi-agent v2 delegation instructions. `none` leaves the - * multi-agent tools available without injecting mode instructions. Omitted - * keeps the loaded session's current mode. + * @deprecated Ignored. Use `effort: "ultra"` for proactive multi-agent behavior. */ multiAgentMode?: MultiAgentMode | null, }; diff --git a/tests/app-server/threads.test.ts b/tests/app-server/threads.test.ts index dafc2231..292f38f8 100644 --- a/tests/app-server/threads.test.ts +++ b/tests/app-server/threads.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest"; import type { AppServerRequestClient } from "../../src/app-server/services/request-client"; -import { listThreads, startThread } from "../../src/app-server/services/threads"; +import { listThreads, startEphemeralThread, startThread } from "../../src/app-server/services/threads"; describe("app-server thread response adapters", () => { it("starts panel-owned threads with the codex-panel service name", async () => { @@ -31,6 +31,28 @@ describe("app-server thread response adapters", () => { }); }); + it("starts ephemeral helper threads without deprecated multi-agent mode params", async () => { + const client = { + request: vi.fn().mockResolvedValue({ thread: { id: "thread-new" } }), + } as unknown as AppServerRequestClient; + + await startEphemeralThread(client, { + cwd: "/vault", + serviceName: "codex-panel-selection-rewrite", + developerInstructions: "Return structured output.", + }); + + expect(client.request).toHaveBeenCalledWith("thread/start", { + cwd: "/vault", + serviceName: "codex-panel-selection-rewrite", + developerInstructions: "Return structured output.", + ephemeral: true, + sandbox: "read-only", + approvalPolicy: "never", + environments: [], + }); + }); + it("maps listed threads to domain threads with archive state", async () => { const clientListThreads = vi.fn().mockResolvedValue({ data: [{ id: "thread-1", preview: "Preview", name: null, createdAt: 10, updatedAt: 20 }],