From f2b83f6a2afc177e4338e4d2f654ee1bb01618e7 Mon Sep 17 00:00:00 2001 From: murashit Date: Wed, 3 Jun 2026 08:45:45 +0900 Subject: [PATCH] Regenerate app-server bindings for Codex CLI 0.136.0 --- README.md | 2 +- src/generated/app-server/ClientRequest.ts | 3 ++- src/generated/app-server/McpServerInfo.ts | 9 +++++++++ src/generated/app-server/index.ts | 1 + .../app-server/v2/CollaborationModeMask.ts | 2 +- .../app-server/v2/ConfigRequirements.ts | 3 ++- .../app-server/v2/McpServerStatus.ts | 3 ++- .../v2/NetworkUnixSocketPermission.ts | 2 +- .../v2/SkillsExtraRootsSetParams.ts | 6 ++++++ .../v2/SkillsExtraRootsSetResponse.ts | 5 +++++ .../app-server/v2/ThreadForkParams.ts | 2 +- src/generated/app-server/v2/ThreadItem.ts | 2 +- .../v2/ThreadRealtimeStartParams.ts | 2 +- .../v2/ThreadResumeInitialTurnsPageParams.ts | 19 +++++++++++++++++++ .../app-server/v2/ThreadResumeParams.ts | 8 +++++++- .../app-server/v2/ThreadResumeResponse.ts | 7 ++++++- .../v2/ThreadSettingsUpdateParams.ts | 2 +- .../app-server/v2/ThreadStartParams.ts | 2 +- .../app-server/v2/TurnStartParams.ts | 4 ++-- .../app-server/v2/TurnSteerParams.ts | 2 +- src/generated/app-server/v2/TurnsPage.ts | 6 ++++++ src/generated/app-server/v2/index.ts | 4 ++++ tests/domain/threads/export.test.ts | 2 +- tests/domain/threads/reference.test.ts | 4 ++-- tests/domain/threads/transcript.test.ts | 2 +- .../chat/chat-app-server-controller.test.ts | 1 + tests/features/chat/chat-controller.test.ts | 6 +++--- .../chat/display/display-model.test.ts | 11 ++++++++++- tests/features/chat/mcp-status.test.ts | 1 + tests/features/chat/thread-naming.test.ts | 18 ++++++++++++++---- tests/features/chat/thread-rename.test.ts | 2 +- tests/features/chat/thread-resume.test.ts | 1 + tests/features/chat/view-connection.test.ts | 6 +++--- tests/features/threads-view/view.test.ts | 7 ++++++- 34 files changed, 124 insertions(+), 33 deletions(-) create mode 100644 src/generated/app-server/McpServerInfo.ts create mode 100644 src/generated/app-server/v2/SkillsExtraRootsSetParams.ts create mode 100644 src/generated/app-server/v2/SkillsExtraRootsSetResponse.ts create mode 100644 src/generated/app-server/v2/ThreadResumeInitialTurnsPageParams.ts create mode 100644 src/generated/app-server/v2/TurnsPage.ts diff --git a/README.md b/README.md index c3acfeb9..06c64f45 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Codex Panel acts as a local Obsidian client for Codex App Server: | Key | Version | Policy | | ------------------------ | --------- | ---------------------------------------------------------- | | `obsidian.minAppVersion` | `1.12.0` | Track the latest patch for this Obsidian minor. | -| `codex.testedCliVersion` | `0.135.0` | Track app-server compatibility by Codex CLI minor version. | +| `codex.testedCliVersion` | `0.136.0` | Track app-server compatibility by Codex CLI minor version. | Codex Panel depends on the experimental `codex app-server` API. diff --git a/src/generated/app-server/ClientRequest.ts b/src/generated/app-server/ClientRequest.ts index 426ceabb..f13a634f 100644 --- a/src/generated/app-server/ClientRequest.ts +++ b/src/generated/app-server/ClientRequest.ts @@ -67,6 +67,7 @@ import type { ProcessWriteStdinParams } from "./v2/ProcessWriteStdinParams"; import type { ReviewStartParams } from "./v2/ReviewStartParams"; import type { SendAddCreditsNudgeEmailParams } from "./v2/SendAddCreditsNudgeEmailParams"; import type { SkillsConfigWriteParams } from "./v2/SkillsConfigWriteParams"; +import type { SkillsExtraRootsSetParams } from "./v2/SkillsExtraRootsSetParams"; import type { SkillsListParams } from "./v2/SkillsListParams"; import type { ThreadApproveGuardianDeniedActionParams } from "./v2/ThreadApproveGuardianDeniedActionParams"; import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams"; @@ -108,4 +109,4 @@ import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupSta /** * Request from the client to the server. */ -export type ClientRequest = { "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/increment_elicitation", id: RequestId, params: ThreadIncrementElicitationParams, } | { "method": "thread/decrement_elicitation", id: RequestId, params: ThreadDecrementElicitationParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/goal/set", id: RequestId, params: ThreadGoalSetParams, } | { "method": "thread/goal/get", id: RequestId, params: ThreadGoalGetParams, } | { "method": "thread/goal/clear", id: RequestId, params: ThreadGoalClearParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/settings/update", id: RequestId, params: ThreadSettingsUpdateParams, } | { "method": "thread/memoryMode/set", id: RequestId, params: ThreadMemoryModeSetParams, } | { "method": "memory/reset", id: RequestId, params: undefined, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/approveGuardianDeniedAction", id: RequestId, params: ThreadApproveGuardianDeniedActionParams, } | { "method": "thread/backgroundTerminals/clean", id: RequestId, params: ThreadBackgroundTerminalsCleanParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/search", id: RequestId, params: ThreadSearchParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/turns/list", id: RequestId, params: ThreadTurnsListParams, } | { "method": "thread/turns/items/list", id: RequestId, params: ThreadTurnsItemsListParams, } | { "method": "thread/inject_items", id: RequestId, params: ThreadInjectItemsParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "hooks/list", id: RequestId, params: HooksListParams, } | { "method": "marketplace/add", id: RequestId, params: MarketplaceAddParams, } | { "method": "marketplace/remove", id: RequestId, params: MarketplaceRemoveParams, } | { "method": "marketplace/upgrade", id: RequestId, params: MarketplaceUpgradeParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/installed", id: RequestId, params: PluginInstalledParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "plugin/skill/read", id: RequestId, params: PluginSkillReadParams, } | { "method": "plugin/share/save", id: RequestId, params: PluginShareSaveParams, } | { "method": "plugin/share/updateTargets", id: RequestId, params: PluginShareUpdateTargetsParams, } | { "method": "plugin/share/list", id: RequestId, params: PluginShareListParams, } | { "method": "plugin/share/checkout", id: RequestId, params: PluginShareCheckoutParams, } | { "method": "plugin/share/delete", id: RequestId, params: PluginShareDeleteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "thread/realtime/start", id: RequestId, params: ThreadRealtimeStartParams, } | { "method": "thread/realtime/appendAudio", id: RequestId, params: ThreadRealtimeAppendAudioParams, } | { "method": "thread/realtime/appendText", id: RequestId, params: ThreadRealtimeAppendTextParams, } | { "method": "thread/realtime/stop", id: RequestId, params: ThreadRealtimeStopParams, } | { "method": "thread/realtime/listVoices", id: RequestId, params: ThreadRealtimeListVoicesParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "modelProvider/capabilities/read", id: RequestId, params: ModelProviderCapabilitiesReadParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "permissionProfile/list", id: RequestId, params: PermissionProfileListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "remoteControl/enable", id: RequestId, params: undefined, } | { "method": "remoteControl/disable", id: RequestId, params: undefined, } | { "method": "remoteControl/status/read", id: RequestId, params: undefined, } | { "method": "collaborationMode/list", id: RequestId, params: CollaborationModeListParams, } | { "method": "mock/experimentalMethod", id: RequestId, params: MockExperimentalMethodParams, } | { "method": "environment/add", id: RequestId, params: EnvironmentAddParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "windowsSandbox/readiness", id: RequestId, params: undefined, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "account/sendAddCreditsNudgeEmail", id: RequestId, params: SendAddCreditsNudgeEmailParams, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "process/spawn", id: RequestId, params: ProcessSpawnParams, } | { "method": "process/writeStdin", id: RequestId, params: ProcessWriteStdinParams, } | { "method": "process/kill", id: RequestId, params: ProcessKillParams, } | { "method": "process/resizePty", id: RequestId, params: ProcessResizePtyParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, } | { "method": "fuzzyFileSearch/sessionStart", id: RequestId, params: FuzzyFileSearchSessionStartParams, } | { "method": "fuzzyFileSearch/sessionUpdate", id: RequestId, params: FuzzyFileSearchSessionUpdateParams, } | { "method": "fuzzyFileSearch/sessionStop", id: RequestId, params: FuzzyFileSearchSessionStopParams, }; +export type ClientRequest = { "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/increment_elicitation", id: RequestId, params: ThreadIncrementElicitationParams, } | { "method": "thread/decrement_elicitation", id: RequestId, params: ThreadDecrementElicitationParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/goal/set", id: RequestId, params: ThreadGoalSetParams, } | { "method": "thread/goal/get", id: RequestId, params: ThreadGoalGetParams, } | { "method": "thread/goal/clear", id: RequestId, params: ThreadGoalClearParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/settings/update", id: RequestId, params: ThreadSettingsUpdateParams, } | { "method": "thread/memoryMode/set", id: RequestId, params: ThreadMemoryModeSetParams, } | { "method": "memory/reset", id: RequestId, params: undefined, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/approveGuardianDeniedAction", id: RequestId, params: ThreadApproveGuardianDeniedActionParams, } | { "method": "thread/backgroundTerminals/clean", id: RequestId, params: ThreadBackgroundTerminalsCleanParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/search", id: RequestId, params: ThreadSearchParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "thread/turns/list", id: RequestId, params: ThreadTurnsListParams, } | { "method": "thread/turns/items/list", id: RequestId, params: ThreadTurnsItemsListParams, } | { "method": "thread/inject_items", id: RequestId, params: ThreadInjectItemsParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "skills/extraRoots/set", id: RequestId, params: SkillsExtraRootsSetParams, } | { "method": "hooks/list", id: RequestId, params: HooksListParams, } | { "method": "marketplace/add", id: RequestId, params: MarketplaceAddParams, } | { "method": "marketplace/remove", id: RequestId, params: MarketplaceRemoveParams, } | { "method": "marketplace/upgrade", id: RequestId, params: MarketplaceUpgradeParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/installed", id: RequestId, params: PluginInstalledParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "plugin/skill/read", id: RequestId, params: PluginSkillReadParams, } | { "method": "plugin/share/save", id: RequestId, params: PluginShareSaveParams, } | { "method": "plugin/share/updateTargets", id: RequestId, params: PluginShareUpdateTargetsParams, } | { "method": "plugin/share/list", id: RequestId, params: PluginShareListParams, } | { "method": "plugin/share/checkout", id: RequestId, params: PluginShareCheckoutParams, } | { "method": "plugin/share/delete", id: RequestId, params: PluginShareDeleteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "thread/realtime/start", id: RequestId, params: ThreadRealtimeStartParams, } | { "method": "thread/realtime/appendAudio", id: RequestId, params: ThreadRealtimeAppendAudioParams, } | { "method": "thread/realtime/appendText", id: RequestId, params: ThreadRealtimeAppendTextParams, } | { "method": "thread/realtime/stop", id: RequestId, params: ThreadRealtimeStopParams, } | { "method": "thread/realtime/listVoices", id: RequestId, params: ThreadRealtimeListVoicesParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "modelProvider/capabilities/read", id: RequestId, params: ModelProviderCapabilitiesReadParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "permissionProfile/list", id: RequestId, params: PermissionProfileListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "remoteControl/enable", id: RequestId, params: undefined, } | { "method": "remoteControl/disable", id: RequestId, params: undefined, } | { "method": "remoteControl/status/read", id: RequestId, params: undefined, } | { "method": "collaborationMode/list", id: RequestId, params: CollaborationModeListParams, } | { "method": "mock/experimentalMethod", id: RequestId, params: MockExperimentalMethodParams, } | { "method": "environment/add", id: RequestId, params: EnvironmentAddParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "windowsSandbox/readiness", id: RequestId, params: undefined, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "account/sendAddCreditsNudgeEmail", id: RequestId, params: SendAddCreditsNudgeEmailParams, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "process/spawn", id: RequestId, params: ProcessSpawnParams, } | { "method": "process/writeStdin", id: RequestId, params: ProcessWriteStdinParams, } | { "method": "process/kill", id: RequestId, params: ProcessKillParams, } | { "method": "process/resizePty", id: RequestId, params: ProcessResizePtyParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, } | { "method": "fuzzyFileSearch/sessionStart", id: RequestId, params: FuzzyFileSearchSessionStartParams, } | { "method": "fuzzyFileSearch/sessionUpdate", id: RequestId, params: FuzzyFileSearchSessionUpdateParams, } | { "method": "fuzzyFileSearch/sessionStop", id: RequestId, params: FuzzyFileSearchSessionStopParams, }; diff --git a/src/generated/app-server/McpServerInfo.ts b/src/generated/app-server/McpServerInfo.ts new file mode 100644 index 00000000..a3f6b0e1 --- /dev/null +++ b/src/generated/app-server/McpServerInfo.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 { JsonValue } from "./serde_json/JsonValue"; + +/** + * Presentation metadata advertised by an initialized MCP server. + */ +export type McpServerInfo = { name: string, title: string | null, version: string, description: string | null, icons: Array | null, websiteUrl: string | null, }; diff --git a/src/generated/app-server/index.ts b/src/generated/app-server/index.ts index 0748d79e..73ab672c 100644 --- a/src/generated/app-server/index.ts +++ b/src/generated/app-server/index.ts @@ -48,6 +48,7 @@ export type { InternalSessionSource } from "./InternalSessionSource"; export type { LocalShellAction } from "./LocalShellAction"; export type { LocalShellExecAction } from "./LocalShellExecAction"; export type { LocalShellStatus } from "./LocalShellStatus"; +export type { McpServerInfo } from "./McpServerInfo"; export type { MessagePhase } from "./MessagePhase"; export type { ModeKind } from "./ModeKind"; export type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment"; diff --git a/src/generated/app-server/v2/CollaborationModeMask.ts b/src/generated/app-server/v2/CollaborationModeMask.ts index b5f869fb..fc67486f 100644 --- a/src/generated/app-server/v2/CollaborationModeMask.ts +++ b/src/generated/app-server/v2/CollaborationModeMask.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // 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"; diff --git a/src/generated/app-server/v2/ConfigRequirements.ts b/src/generated/app-server/v2/ConfigRequirements.ts index 57f7d066..3c25f21b 100644 --- a/src/generated/app-server/v2/ConfigRequirements.ts +++ b/src/generated/app-server/v2/ConfigRequirements.ts @@ -9,5 +9,6 @@ import type { ManagedHooksRequirements } from "./ManagedHooksRequirements"; import type { NetworkRequirements } from "./NetworkRequirements"; import type { ResidencyRequirement } from "./ResidencyRequirement"; import type { SandboxMode } from "./SandboxMode"; +import type { WindowsSandboxSetupMode } from "./WindowsSandboxSetupMode"; -export type ConfigRequirements = { allowedApprovalPolicies: Array | null, allowedApprovalsReviewers: Array | null, allowedSandboxModes: Array | null, allowedPermissions: Array | null, allowedWebSearchModes: Array | null, allowManagedHooksOnly: boolean | null, allowAppshots: boolean | null, computerUse: ComputerUseRequirements | null, featureRequirements: { [key in string]?: boolean } | null, hooks: ManagedHooksRequirements | null, enforceResidency: ResidencyRequirement | null, network: NetworkRequirements | null, }; +export type ConfigRequirements = { allowedApprovalPolicies: Array | null, allowedApprovalsReviewers: Array | null, allowedSandboxModes: Array | null, allowedWindowsSandboxImplementations: Array | null, allowedPermissions: Array | null, allowedWebSearchModes: Array | null, allowManagedHooksOnly: boolean | null, allowAppshots: boolean | null, computerUse: ComputerUseRequirements | null, featureRequirements: { [key in string]?: boolean } | null, hooks: ManagedHooksRequirements | null, enforceResidency: ResidencyRequirement | null, network: NetworkRequirements | null, }; diff --git a/src/generated/app-server/v2/McpServerStatus.ts b/src/generated/app-server/v2/McpServerStatus.ts index 430494e2..d2e99ce9 100644 --- a/src/generated/app-server/v2/McpServerStatus.ts +++ b/src/generated/app-server/v2/McpServerStatus.ts @@ -1,9 +1,10 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { McpServerInfo } from "../McpServerInfo"; import type { Resource } from "../Resource"; import type { ResourceTemplate } from "../ResourceTemplate"; import type { Tool } from "../Tool"; import type { McpAuthStatus } from "./McpAuthStatus"; -export type McpServerStatus = { name: string, tools: { [key in string]?: Tool }, resources: Array, resourceTemplates: Array, authStatus: McpAuthStatus, }; +export type McpServerStatus = { name: string, serverInfo: McpServerInfo | null, tools: { [key in string]?: Tool }, resources: Array, resourceTemplates: Array, authStatus: McpAuthStatus, }; diff --git a/src/generated/app-server/v2/NetworkUnixSocketPermission.ts b/src/generated/app-server/v2/NetworkUnixSocketPermission.ts index 466c6e5f..c5474cbb 100644 --- a/src/generated/app-server/v2/NetworkUnixSocketPermission.ts +++ b/src/generated/app-server/v2/NetworkUnixSocketPermission.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 NetworkUnixSocketPermission = "allow" | "none"; +export type NetworkUnixSocketPermission = "allow" | "deny"; diff --git a/src/generated/app-server/v2/SkillsExtraRootsSetParams.ts b/src/generated/app-server/v2/SkillsExtraRootsSetParams.ts new file mode 100644 index 00000000..bcddb9f6 --- /dev/null +++ b/src/generated/app-server/v2/SkillsExtraRootsSetParams.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 { AbsolutePathBuf } from "../AbsolutePathBuf"; + +export type SkillsExtraRootsSetParams = { extraRoots: Array, }; diff --git a/src/generated/app-server/v2/SkillsExtraRootsSetResponse.ts b/src/generated/app-server/v2/SkillsExtraRootsSetResponse.ts new file mode 100644 index 00000000..63be0818 --- /dev/null +++ b/src/generated/app-server/v2/SkillsExtraRootsSetResponse.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 SkillsExtraRootsSetResponse = Record; diff --git a/src/generated/app-server/v2/ThreadForkParams.ts b/src/generated/app-server/v2/ThreadForkParams.ts index 1f3f56b1..d7bef9d1 100644 --- a/src/generated/app-server/v2/ThreadForkParams.ts +++ b/src/generated/app-server/v2/ThreadForkParams.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { JsonValue } from "../serde_json/JsonValue"; diff --git a/src/generated/app-server/v2/ThreadItem.ts b/src/generated/app-server/v2/ThreadItem.ts index 1b655b46..78dff0d7 100644 --- a/src/generated/app-server/v2/ThreadItem.ts +++ b/src/generated/app-server/v2/ThreadItem.ts @@ -23,7 +23,7 @@ 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": "hookPrompt", id: string, fragments: Array, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, +export type ThreadItem = { "type": "userMessage", id: string, clientId: string | null, content: Array, } | { "type": "hookPrompt", id: string, fragments: Array, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, /** * The command to be executed. */ diff --git a/src/generated/app-server/v2/ThreadRealtimeStartParams.ts b/src/generated/app-server/v2/ThreadRealtimeStartParams.ts index 638e0a98..38f25579 100644 --- a/src/generated/app-server/v2/ThreadRealtimeStartParams.ts +++ b/src/generated/app-server/v2/ThreadRealtimeStartParams.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { RealtimeOutputModality } from "../RealtimeOutputModality"; diff --git a/src/generated/app-server/v2/ThreadResumeInitialTurnsPageParams.ts b/src/generated/app-server/v2/ThreadResumeInitialTurnsPageParams.ts new file mode 100644 index 00000000..2dbcd978 --- /dev/null +++ b/src/generated/app-server/v2/ThreadResumeInitialTurnsPageParams.ts @@ -0,0 +1,19 @@ +// 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 { SortDirection } from "./SortDirection"; +import type { TurnItemsView } from "./TurnItemsView"; + +export type ThreadResumeInitialTurnsPageParams = { +/** + * Optional turn page size. + */ +limit?: number | null, +/** + * Optional turn pagination direction; defaults to descending. + */ +sortDirection?: SortDirection | null, +/** + * How much item detail to include for each returned turn; defaults to summary. + */ +itemsView?: TurnItemsView | null, }; diff --git a/src/generated/app-server/v2/ThreadResumeParams.ts b/src/generated/app-server/v2/ThreadResumeParams.ts index d07f855a..12ee1427 100644 --- a/src/generated/app-server/v2/ThreadResumeParams.ts +++ b/src/generated/app-server/v2/ThreadResumeParams.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Personality } from "../Personality"; @@ -8,6 +8,7 @@ import type { JsonValue } from "../serde_json/JsonValue"; import type { ApprovalsReviewer } from "./ApprovalsReviewer"; import type { AskForApproval } from "./AskForApproval"; import type { SandboxMode } from "./SandboxMode"; +import type { ThreadResumeInitialTurnsPageParams } from "./ThreadResumeInitialTurnsPageParams"; /** * There are three ways to resume a thread: @@ -64,6 +65,11 @@ permissions?: string | null, config?: { [key in string]?: JsonValue } | null, ba * `thread/turns/list` immediately after resuming. */ excludeTurns?: boolean, +/** + * When present, include a `thread/turns/list` page in the resume response + * so clients can bootstrap recent turns without a second request. + */ +initialTurnsPage?: ThreadResumeInitialTurnsPageParams | null, /** * Deprecated and ignored by app-server. Kept only so older clients can * continue sending the field while rollout persistence always uses the diff --git a/src/generated/app-server/v2/ThreadResumeResponse.ts b/src/generated/app-server/v2/ThreadResumeResponse.ts index 9db53d8d..bcdc8987 100644 --- a/src/generated/app-server/v2/ThreadResumeResponse.ts +++ b/src/generated/app-server/v2/ThreadResumeResponse.ts @@ -8,6 +8,7 @@ import type { ApprovalsReviewer } from "./ApprovalsReviewer"; import type { AskForApproval } from "./AskForApproval"; import type { SandboxPolicy } from "./SandboxPolicy"; import type { Thread } from "./Thread"; +import type { TurnsPage } from "./TurnsPage"; export type ThreadResumeResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: string | null, cwd: AbsolutePathBuf, /** @@ -32,4 +33,8 @@ sandbox: SandboxPolicy, * Named or implicit built-in profile that produced the active * permissions, when known. */ -activePermissionProfile: ActivePermissionProfile | null, reasoningEffort: ReasoningEffort | null, }; +activePermissionProfile: ActivePermissionProfile | null, reasoningEffort: ReasoningEffort | null, +/** + * `thread/turns/list` page returned when requested by `initialTurnsPage`. + */ +initialTurnsPage: TurnsPage | null, }; diff --git a/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts b/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts index 40410483..ab5b01ba 100644 --- a/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts +++ b/src/generated/app-server/v2/ThreadSettingsUpdateParams.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { CollaborationMode } from "../CollaborationMode"; diff --git a/src/generated/app-server/v2/ThreadStartParams.ts b/src/generated/app-server/v2/ThreadStartParams.ts index c527d727..a3976ef2 100644 --- a/src/generated/app-server/v2/ThreadStartParams.ts +++ b/src/generated/app-server/v2/ThreadStartParams.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Personality } from "../Personality"; diff --git a/src/generated/app-server/v2/TurnStartParams.ts b/src/generated/app-server/v2/TurnStartParams.ts index 1955bd8c..05d66372 100644 --- a/src/generated/app-server/v2/TurnStartParams.ts +++ b/src/generated/app-server/v2/TurnStartParams.ts @@ -1,5 +1,5 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! -// This file was mechanically normalized after generation by scripts/normalize-generated-types.mjs. +// This file was mechanically normalized after generation by scripts/generate-app-server-types.mjs. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { CollaborationMode } from "../CollaborationMode"; @@ -14,7 +14,7 @@ import type { SandboxPolicy } from "./SandboxPolicy"; import type { TurnEnvironmentParams } from "./TurnEnvironmentParams"; import type { UserInput } from "./UserInput"; -export type TurnStartParams = { threadId: string, input: Array, +export type TurnStartParams = { threadId: string, clientUserMessageId?: string | null, input: Array, /** * Optional turn-scoped Responses API client metadata. */ diff --git a/src/generated/app-server/v2/TurnSteerParams.ts b/src/generated/app-server/v2/TurnSteerParams.ts index c5ffae74..9a77d47d 100644 --- a/src/generated/app-server/v2/TurnSteerParams.ts +++ b/src/generated/app-server/v2/TurnSteerParams.ts @@ -4,7 +4,7 @@ import type { AdditionalContextEntry } from "./AdditionalContextEntry"; import type { UserInput } from "./UserInput"; -export type TurnSteerParams = { threadId: string, input: Array, +export type TurnSteerParams = { threadId: string, clientUserMessageId?: string | null, input: Array, /** * Optional turn-scoped Responses API client metadata. */ diff --git a/src/generated/app-server/v2/TurnsPage.ts b/src/generated/app-server/v2/TurnsPage.ts new file mode 100644 index 00000000..e91865ae --- /dev/null +++ b/src/generated/app-server/v2/TurnsPage.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 { Turn } from "./Turn"; + +export type TurnsPage = { data: Array, nextCursor: string | null, backwardsCursor: string | null, }; diff --git a/src/generated/app-server/v2/index.ts b/src/generated/app-server/v2/index.ts index 68f4bf08..d477fabf 100644 --- a/src/generated/app-server/v2/index.ts +++ b/src/generated/app-server/v2/index.ts @@ -362,6 +362,8 @@ export type { SkillToolDependency } from "./SkillToolDependency"; export type { SkillsChangedNotification } from "./SkillsChangedNotification"; export type { SkillsConfigWriteParams } from "./SkillsConfigWriteParams"; export type { SkillsConfigWriteResponse } from "./SkillsConfigWriteResponse"; +export type { SkillsExtraRootsSetParams } from "./SkillsExtraRootsSetParams"; +export type { SkillsExtraRootsSetResponse } from "./SkillsExtraRootsSetResponse"; export type { SkillsListEntry } from "./SkillsListEntry"; export type { SkillsListParams } from "./SkillsListParams"; export type { SkillsListResponse } from "./SkillsListResponse"; @@ -434,6 +436,7 @@ export type { ThreadRealtimeStopParams } from "./ThreadRealtimeStopParams"; export type { ThreadRealtimeStopResponse } from "./ThreadRealtimeStopResponse"; export type { ThreadRealtimeTranscriptDeltaNotification } from "./ThreadRealtimeTranscriptDeltaNotification"; export type { ThreadRealtimeTranscriptDoneNotification } from "./ThreadRealtimeTranscriptDoneNotification"; +export type { ThreadResumeInitialTurnsPageParams } from "./ThreadResumeInitialTurnsPageParams"; export type { ThreadResumeParams } from "./ThreadResumeParams"; export type { ThreadResumeResponse } from "./ThreadResumeResponse"; export type { ThreadRollbackParams } from "./ThreadRollbackParams"; @@ -494,6 +497,7 @@ export type { TurnStartedNotification } from "./TurnStartedNotification"; export type { TurnStatus } from "./TurnStatus"; export type { TurnSteerParams } from "./TurnSteerParams"; export type { TurnSteerResponse } from "./TurnSteerResponse"; +export type { TurnsPage } from "./TurnsPage"; export type { UserInput } from "./UserInput"; export type { WarningNotification } from "./WarningNotification"; export type { WebSearchAction } from "./WebSearchAction"; diff --git a/tests/domain/threads/export.test.ts b/tests/domain/threads/export.test.ts index fc639a98..5aa9e83f 100644 --- a/tests/domain/threads/export.test.ts +++ b/tests/domain/threads/export.test.ts @@ -311,7 +311,7 @@ function timestamp(year: number, month: number, day: number, hour: number, minut } function userMessage(id: string, text: string): ThreadItem { - return { type: "userMessage", id, content: [{ type: "text", text, text_elements: [] }] }; + return { type: "userMessage", id, clientId: null, content: [{ type: "text", text, text_elements: [] }] }; } function assistantMessage(id: string, text: string): ThreadItem { diff --git a/tests/domain/threads/reference.test.ts b/tests/domain/threads/reference.test.ts index 89b1b1ae..3b771225 100644 --- a/tests/domain/threads/reference.test.ts +++ b/tests/domain/threads/reference.test.ts @@ -51,7 +51,7 @@ describe("thread reference context", () => { it("extracts user messages and final Codex responses in chronological order", () => { const turns = referencedThreadTurns([ turn("turn-2", 2, [ - { type: "userMessage", id: "u2", content: [{ type: "text", text: "次の依頼", text_elements: [] }] }, + { type: "userMessage", id: "u2", clientId: null, content: [{ type: "text", text: "次の依頼", text_elements: [] }] }, { type: "commandExecution", id: "cmd", @@ -68,7 +68,7 @@ describe("thread reference context", () => { { type: "agentMessage", id: "a2", text: "次の回答", phase: "final_answer", memoryCitation: null }, ]), turn("turn-1", 1, [ - { type: "userMessage", id: "u1", content: [{ type: "text", text: "最初の依頼", text_elements: [] }] }, + { type: "userMessage", id: "u1", clientId: null, content: [{ type: "text", text: "最初の依頼", text_elements: [] }] }, { type: "agentMessage", id: "draft", text: "途中経過", phase: null, memoryCitation: null }, { type: "agentMessage", id: "a1", text: "最終回答", phase: "final_answer", memoryCitation: null }, ]), diff --git a/tests/domain/threads/transcript.test.ts b/tests/domain/threads/transcript.test.ts index 7cbd6bf7..abf92766 100644 --- a/tests/domain/threads/transcript.test.ts +++ b/tests/domain/threads/transcript.test.ts @@ -69,7 +69,7 @@ function turn(items: ThreadItem[], overrides: Partial = {}): Turn { } function userMessage(id: string, text: string): ThreadItem { - return { type: "userMessage", id, content: [{ type: "text", text, text_elements: [] }] }; + return { type: "userMessage", id, clientId: null, content: [{ type: "text", text, text_elements: [] }] }; } function assistantMessage(id: string, text: string): ThreadItem { diff --git a/tests/features/chat/chat-app-server-controller.test.ts b/tests/features/chat/chat-app-server-controller.test.ts index 447c6980..bac24642 100644 --- a/tests/features/chat/chat-app-server-controller.test.ts +++ b/tests/features/chat/chat-app-server-controller.test.ts @@ -190,6 +190,7 @@ function threadFixture(id: string, overrides: Partial = {}): Thread { function mcpServerStatus(): McpServerStatus { return { name: "github", + serverInfo: null, tools: { search_issues: { name: "search_issues", inputSchema: {} }, }, diff --git a/tests/features/chat/chat-controller.test.ts b/tests/features/chat/chat-controller.test.ts index 28f42f34..a1a4b80f 100644 --- a/tests/features/chat/chat-controller.test.ts +++ b/tests/features/chat/chat-controller.test.ts @@ -536,7 +536,7 @@ describe("ChatController", () => { error: null, itemsView: "full", items: [ - { type: "userMessage", id: "u1", content: [{ type: "text", text: "hello", text_elements: [] }] }, + { type: "userMessage", id: "u1", clientId: null, content: [{ type: "text", text: "hello", text_elements: [] }] }, { type: "agentMessage", id: "a1", text: "done", phase: "final_answer", memoryCitation: null }, ], }, @@ -1030,7 +1030,7 @@ describe("ChatController", () => { durationMs: null, itemsView: "full", items: [ - { type: "userMessage", id: "u1", content: [{ type: "text", text: "hello", text_elements: [] }] }, + { type: "userMessage", id: "u1", clientId: null, content: [{ type: "text", text: "hello", text_elements: [] }] }, { type: "agentMessage", id: "a1", text: "done", phase: "final_answer", memoryCitation: null }, ], }, @@ -1059,7 +1059,7 @@ describe("ChatController", () => { durationMs: null, itemsView: "full", items: [ - { type: "userMessage", id: "u1", content: [{ type: "text", text: "hello", text_elements: [] }] }, + { type: "userMessage", id: "u1", clientId: null, content: [{ type: "text", text: "hello", text_elements: [] }] }, { type: "agentMessage", id: "a1", text: "done", phase: "final_answer", memoryCitation: null }, ], }; diff --git a/tests/features/chat/display/display-model.test.ts b/tests/features/chat/display/display-model.test.ts index 7cada185..ebce5662 100644 --- a/tests/features/chat/display/display-model.test.ts +++ b/tests/features/chat/display/display-model.test.ts @@ -55,7 +55,12 @@ function fileChangeItem(id: string, turnId: string, path = "src/main.ts"): Displ describe("thread item conversion preserves app-server semantics", () => { it("sorts app-server turns oldest first before converting messages", () => { - const userMessage: ThreadItem = { type: "userMessage", id: "u1", content: [{ type: "text", text: "hello", text_elements: [] }] }; + const userMessage: ThreadItem = { + type: "userMessage", + id: "u1", + clientId: null, + content: [{ type: "text", text: "hello", text_elements: [] }], + }; const assistantMessage: ThreadItem = { type: "agentMessage", id: "a1", text: "world", phase: null, memoryCitation: null }; const turns: Turn[] = [ { @@ -80,6 +85,7 @@ describe("thread item conversion preserves app-server semantics", () => { const userMessage: ThreadItem = { type: "userMessage", id: "u1", + clientId: null, content: [ { type: "text", text: "Read [[Alpha]] and [[Beta]].", text_elements: [] }, { type: "mention", name: "Alpha", path: "thoughts/Alpha.md" }, @@ -113,6 +119,7 @@ describe("thread item conversion preserves app-server semantics", () => { displayItemFromThreadItem({ type: "userMessage", id: "u1", + clientId: null, content: [{ type: "text", text, text_elements: [] }], }), ).toMatchObject({ @@ -132,6 +139,7 @@ describe("thread item conversion preserves app-server semantics", () => { const item: ThreadItem = { type: "userMessage", id: "u1", + clientId: null, content: [ { type: "text", text: "Use $obsidian-codex-panel-maintain and $missing.", text_elements: [] }, { type: "skill", name: "obsidian-codex-panel-maintain", path: "/skills/obsidian-codex-panel-maintain/SKILL.md" }, @@ -148,6 +156,7 @@ describe("thread item conversion preserves app-server semantics", () => { const item: ThreadItem = { type: "userMessage", id: "u1", + clientId: null, content: [ { type: "text", diff --git a/tests/features/chat/mcp-status.test.ts b/tests/features/chat/mcp-status.test.ts index 0a2d486c..7d5f4d56 100644 --- a/tests/features/chat/mcp-status.test.ts +++ b/tests/features/chat/mcp-status.test.ts @@ -6,6 +6,7 @@ import { mcpStatusLines } from "../../../src/features/chat/mcp-status"; function mcpServer(overrides: Partial = {}): McpServerStatus { return { name: "github", + serverInfo: null, tools: { search_issues: { name: "search_issues", description: null, inputSchema: {} }, fetch_pr: { name: "fetch_pr", description: null, inputSchema: {} }, diff --git a/tests/features/chat/thread-naming.test.ts b/tests/features/chat/thread-naming.test.ts index 5db8369f..3f1b0614 100644 --- a/tests/features/chat/thread-naming.test.ts +++ b/tests/features/chat/thread-naming.test.ts @@ -36,7 +36,12 @@ describe("thread naming", () => { expect( namingContextFromTurn( turn([ - { type: "userMessage", id: "u1", content: [{ type: "text", text: "Codex Panelに自動命名を付けたい", text_elements: [] }] }, + { + type: "userMessage", + id: "u1", + clientId: null, + content: [{ type: "text", text: "Codex Panelに自動命名を付けたい", text_elements: [] }], + }, { type: "agentMessage", id: "a1", text: "実装方針をまとめました。", phase: "final_answer", memoryCitation: null }, ]), ), @@ -49,7 +54,7 @@ describe("thread naming", () => { it("does not build naming context for failed or incomplete turns", () => { expect( namingContextFromTurn( - turn([{ type: "userMessage", id: "u1", content: [{ type: "text", text: "hello", text_elements: [] }] }], { + turn([{ type: "userMessage", id: "u1", clientId: null, content: [{ type: "text", text: "hello", text_elements: [] }] }], { status: "failed", }), ), @@ -94,7 +99,7 @@ describe("thread naming", () => { if (cursor === null) { return { data: [ - turn([{ type: "userMessage", id: "u1", content: [{ type: "text", text: "本文だけ", text_elements: [] }] }], { + turn([{ type: "userMessage", id: "u1", clientId: null, content: [{ type: "text", text: "本文だけ", text_elements: [] }] }], { id: "turn-1", }), ], @@ -105,7 +110,12 @@ describe("thread naming", () => { data: [ turn( [ - { type: "userMessage", id: "u2", content: [{ type: "text", text: "古い履歴から命名したい", text_elements: [] }] }, + { + type: "userMessage", + id: "u2", + clientId: null, + content: [{ type: "text", text: "古い履歴から命名したい", text_elements: [] }], + }, { type: "agentMessage", id: "a2", text: "古いturnを使って候補を作ります。", phase: "final_answer", memoryCitation: null }, ], { id: "turn-2" }, diff --git a/tests/features/chat/thread-rename.test.ts b/tests/features/chat/thread-rename.test.ts index ce2364e2..c4fdfb8c 100644 --- a/tests/features/chat/thread-rename.test.ts +++ b/tests/features/chat/thread-rename.test.ts @@ -158,7 +158,7 @@ function turnFixture(items: ThreadItem[]): Turn { } function userMessage(id: string, text: string): ThreadItem { - return { type: "userMessage", id, content: [{ type: "text", text, text_elements: [] }] }; + return { type: "userMessage", id, clientId: null, content: [{ type: "text", text, text_elements: [] }] }; } function assistantMessage(id: string, text: string): ThreadItem { diff --git a/tests/features/chat/thread-resume.test.ts b/tests/features/chat/thread-resume.test.ts index c0ca13cd..a631d437 100644 --- a/tests/features/chat/thread-resume.test.ts +++ b/tests/features/chat/thread-resume.test.ts @@ -62,6 +62,7 @@ function responseFixture(thread: Thread): ThreadResumeResponse { sandbox: { type: "readOnly", networkAccess: false }, activePermissionProfile: null, reasoningEffort: "high", + initialTurnsPage: null, }; } diff --git a/tests/features/chat/view-connection.test.ts b/tests/features/chat/view-connection.test.ts index bd804b1e..3b190734 100644 --- a/tests/features/chat/view-connection.test.ts +++ b/tests/features/chat/view-connection.test.ts @@ -895,7 +895,7 @@ function turnWithUserMessage(text: string) { id: "turn-1", startedAt: 1, completedAt: 2, - items: [{ type: "userMessage", id: "user-1", content: [{ type: "text", text, text_elements: [] }] }], + items: [{ type: "userMessage", id: "user-1", clientId: null, content: [{ type: "text", text, text_elements: [] }] }], }; } @@ -909,7 +909,7 @@ function completedTurn(turnId: string) { durationMs: 1, itemsView: "full", items: [ - { type: "userMessage", id: "user-1", content: [{ type: "text", text: "hello", text_elements: [] }] }, + { type: "userMessage", id: "user-1", clientId: null, content: [{ type: "text", text: "hello", text_elements: [] }] }, { type: "agentMessage", id: "agent-1", text: "done", phase: "final_answer", memoryCitation: null }, ], }; @@ -948,7 +948,7 @@ function turnCompletedNotification(threadId: string, turnId: string): Extract { const threadTurnsList = vi.fn().mockResolvedValue({ data: [ turnFixture([ - { type: "userMessage", id: "u1", content: [{ type: "text", text: "threads viewのrenameを直したい", text_elements: [] }] }, + { + type: "userMessage", + id: "u1", + clientId: null, + content: [{ type: "text", text: "threads viewのrenameを直したい", text_elements: [] }], + }, { type: "agentMessage", id: "a1", text: "rename UIを調整しました。", phase: "final_answer", memoryCitation: null }, ]), ],