From 90d0f40790c356c8ea2de687eb82bf3efa741cb0 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 17 Apr 2026 17:29:33 -0700 Subject: [PATCH] Integrate Codex app-server support Co-authored-by: codex --- .../orchestrationEngine.integration.test.ts | 775 +- apps/server/package.json | 4 +- apps/server/scripts/acp-mock-agent.ts | 54 +- .../cursor-acp-model-mismatch-probe.ts | 8 +- apps/server/src/git/GitManager.test.ts | 818 +- .../src/git/Layers/CodexTextGeneration.ts | 417 + .../git/Layers/CursorTextGeneration.test.ts | 253 + apps/server/src/git/Layers/GitCore.test.ts | 2326 ++ .../src/git/Layers/RoutingTextGeneration.ts | 112 + .../server/src/git/Services/TextGeneration.ts | 123 + .../Layers/CheckpointReactor.test.ts | 41 +- .../Layers/ProviderCommandReactor.test.ts | 369 +- .../Layers/ProviderCommandReactor.ts | 52 +- .../src/provider/Layers/ClaudeProvider.ts | 162 +- .../src/provider/Layers/CodexAdapter.test.ts | 311 +- .../src/provider/Layers/CodexAdapter.ts | 301 +- .../src/provider/Layers/CodexProvider.ts | 549 +- .../src/provider/Layers/CursorAdapter.test.ts | 392 +- .../src/provider/Layers/CursorAdapter.ts | 973 +- .../provider/Layers/CursorProvider.test.ts | 350 +- .../src/provider/Layers/OpenCodeAdapter.ts | 23 +- .../Layers/ProviderAdapterRegistry.test.ts | 154 +- .../Layers/ProviderAdapterRegistry.ts | 24 +- .../provider/Layers/ProviderRegistry.test.ts | 29 +- .../provider/acp/AcpJsonRpcConnection.test.ts | 58 +- .../src/provider/acp/AcpRuntimeModel.test.ts | 18 - .../src/provider/acp/AcpRuntimeModel.ts | 12 +- .../src/provider/acp/AcpSessionRuntime.ts | 293 +- .../provider/acp/CursorAcpCliProbe.test.ts | 13 +- .../src/provider/acp/CursorAcpSupport.ts | 21 +- .../codex/CodexDeveloperInstructions.ts | 134 + .../codex/CodexSessionRuntime.test.ts | 118 + .../src/provider/codex/CodexSessionRuntime.ts | 1299 ++ apps/server/src/provider/codexAccount.ts | 111 + .../src/provider/codexAppServer.test.ts | 91 + apps/server/src/provider/codexAppServer.ts | 155 + apps/server/src/provider/codexModels.ts | 127 + .../src/provider/makeManagedServerProvider.ts | 94 +- apps/server/src/serverSettings.ts | 8 + .../CompactComposerControlsMenu.browser.tsx | 307 + .../components/chat/ProviderModelPicker.tsx | 263 +- .../components/chat/TraitsPicker.browser.tsx | 696 + .../chat/composerProviderRegistry.test.tsx | 731 + apps/web/src/components/ui/input.tsx | 10 +- apps/web/src/composerDraftStore.test.ts | 24 - apps/web/src/session-logic.test.ts | 64 +- apps/web/src/store.ts | 1963 ++ bun.lock | 2300 ++ packages/contracts/src/model.ts | 58 +- packages/contracts/src/orchestration.ts | 6 + packages/contracts/src/providerRuntime.ts | 1 - packages/contracts/src/settings.ts | 39 +- packages/effect-codex-app-server/package.json | 17 +- .../scripts/generate.ts | 123 +- .../src/_generated/meta.gen.ts | 601 +- .../src/_generated/namespaces.gen.ts | 81 +- .../src/_generated/schema.gen.ts | 17634 +++------------- .../src/_internal/shared.ts | 36 +- .../src/_internal/stdio.ts | 19 +- .../src/client.test.ts | 49 +- .../effect-codex-app-server/src/client.ts | 139 +- .../effect-codex-app-server/src/errors.ts | 310 +- .../src/protocol.test.ts | 262 +- .../effect-codex-app-server/src/protocol.ts | 137 +- .../test/examples/codex-app-server-probe.ts | 19 +- .../fixtures/codex-app-server-mock-peer.ts | 20 +- .../effect-codex-app-server/tsconfig.json | 13 +- packages/shared/src/model.ts | 25 +- 68 files changed, 17389 insertions(+), 19730 deletions(-) create mode 100644 apps/server/src/git/Layers/CodexTextGeneration.ts create mode 100644 apps/server/src/git/Layers/CursorTextGeneration.test.ts create mode 100644 apps/server/src/git/Layers/GitCore.test.ts create mode 100644 apps/server/src/git/Layers/RoutingTextGeneration.ts create mode 100644 apps/server/src/git/Services/TextGeneration.ts create mode 100644 apps/server/src/provider/codex/CodexDeveloperInstructions.ts create mode 100644 apps/server/src/provider/codex/CodexSessionRuntime.test.ts create mode 100644 apps/server/src/provider/codex/CodexSessionRuntime.ts create mode 100644 apps/server/src/provider/codexAccount.ts create mode 100644 apps/server/src/provider/codexAppServer.test.ts create mode 100644 apps/server/src/provider/codexAppServer.ts create mode 100644 apps/server/src/provider/codexModels.ts create mode 100644 apps/web/src/components/chat/CompactComposerControlsMenu.browser.tsx create mode 100644 apps/web/src/components/chat/TraitsPicker.browser.tsx create mode 100644 apps/web/src/components/chat/composerProviderRegistry.test.tsx create mode 100644 apps/web/src/store.ts create mode 100644 bun.lock diff --git a/apps/server/integration/orchestrationEngine.integration.test.ts b/apps/server/integration/orchestrationEngine.integration.test.ts index ccfb9c4674..4d8b3b5b24 100644 --- a/apps/server/integration/orchestrationEngine.integration.test.ts +++ b/apps/server/integration/orchestrationEngine.integration.test.ts @@ -46,9 +46,13 @@ const PROJECT_ID = asProjectId("project-1"); const THREAD_ID = ThreadId.make("thread-1"); const FIXTURE_TURN_ID = "fixture-turn"; const APPROVAL_REQUEST_ID = asApprovalRequestId("req-approval-1"); -type IntegrationProvider = ProviderDriverKind; -const CODEX_PROVIDER = ProviderDriverKind.make("codex"); -const CLAUDE_AGENT_PROVIDER = ProviderDriverKind.make("claudeAgent"); +const LONG_LIVE_TEST_TIMEOUT_MS = 60_000; +const live = ( + name: string, + test: Parameters[1], + timeout = LONG_LIVE_TEST_TIMEOUT_MS, +) => it.live(name, test, timeout); +type IntegrationProvider = ProviderKind; function nowIso() { return "2026-05-01T00:00:00.000Z"; @@ -182,7 +186,7 @@ const startTurn = (input: { createdAt: input.createdAt ?? nowIso(), }); -it.live("runs a single turn end-to-end and persists checkpoint state in sqlite + git", () => +live("runs a single turn end-to-end and persists checkpoint state in sqlite + git", () => withHarness((harness) => Effect.gen(function* () { yield* seedProjectAndThread(harness); @@ -361,7 +365,7 @@ it.live.skipIf(!process.env.CODEX_BINARY_PATH)( ), ); -it.live("runs multi-turn file edits and persists checkpoint diffs", () => +live("runs multi-turn file edits and persists checkpoint diffs", () => withHarness((harness) => Effect.gen(function* () { yield* seedProjectAndThread(harness); @@ -544,7 +548,7 @@ it.live("runs multi-turn file edits and persists checkpoint diffs", () => ), ); -it.live("tracks approval requests and resolves pending approvals on user response", () => +live("tracks approval requests and resolves pending approvals on user response", () => withHarness((harness) => Effect.gen(function* () { yield* seedProjectAndThread(harness); @@ -625,269 +629,273 @@ it.live("tracks approval requests and resolves pending approvals on user respons ), ); -it.live("records failed turn runtime state and checkpoint status as error", () => - withHarness((harness) => - Effect.gen(function* () { - yield* seedProjectAndThread(harness); +live( + "records failed turn runtime state and checkpoint status as error", + () => + withHarness((harness) => + Effect.gen(function* () { + yield* seedProjectAndThread(harness); - yield* harness.adapterHarness!.queueTurnResponseForNextSession({ - events: [ - { - type: "turn.started", - ...runtimeBase("evt-failure-1", "2026-02-24T10:04:00.000Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - }, - { - type: "content.delta", - ...runtimeBase("evt-failure-2", "2026-02-24T10:04:00.100Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - payload: { - streamKind: "assistant_text", - delta: "Partial output before failure.\n", + yield* harness.adapterHarness!.queueTurnResponseForNextSession({ + events: [ + { + type: "turn.started", + ...runtimeBase("evt-failure-1", "2026-02-24T10:04:00.000Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, }, - }, - { - type: "runtime.error", - ...runtimeBase("evt-failure-3", "2026-02-24T10:04:00.200Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - payload: { - message: "Sandbox command failed.", + { + type: "content.delta", + ...runtimeBase("evt-failure-2", "2026-02-24T10:04:00.100Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + payload: { + streamKind: "assistant_text", + delta: "Partial output before failure.\n", + }, }, - }, - { - type: "turn.completed", - ...runtimeBase("evt-failure-4", "2026-02-24T10:04:00.300Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - payload: { - state: "failed", - errorMessage: "Sandbox command failed.", + { + type: "runtime.error", + ...runtimeBase("evt-failure-3", "2026-02-24T10:04:00.200Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + payload: { + message: "Sandbox command failed.", + }, }, - }, - ], - }); + { + type: "turn.completed", + ...runtimeBase("evt-failure-4", "2026-02-24T10:04:00.300Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + payload: { + state: "failed", + errorMessage: "Sandbox command failed.", + }, + }, + ], + }); - yield* startTurn({ - harness, - commandId: "cmd-turn-start-failure", - messageId: "msg-user-failure", - text: "Run risky command", - }); + yield* startTurn({ + harness, + commandId: "cmd-turn-start-failure", + messageId: "msg-user-failure", + text: "Run risky command", + }); - const thread = yield* harness.waitForThread( - THREAD_ID, - (entry) => - entry.session?.status === "error" && - entry.session?.lastError === "Sandbox command failed." && - entry.activities.some((activity) => activity.kind === "runtime.error") && - entry.checkpoints.length === 1, - ); - assert.equal(thread.session?.status, "error"); - assert.equal(thread.checkpoints[0]?.status, "error"); + const thread = yield* harness.waitForThread( + THREAD_ID, + (entry) => + entry.session?.status === "error" && + entry.session?.lastError === "Sandbox command failed." && + entry.activities.some((activity) => activity.kind === "runtime.error") && + entry.checkpoints.length === 1, + 30_000, + ); + assert.equal(thread.session?.status, "error"); + assert.equal(thread.checkpoints[0]?.status, "error"); - const checkpointRow = yield* harness.checkpointRepository.getByThreadAndTurnCount({ - threadId: THREAD_ID, - checkpointTurnCount: 1, - }); - assert.equal(Option.isSome(checkpointRow), true); - if (Option.isSome(checkpointRow)) { - assert.equal(checkpointRow.value.status, "error"); - } - assert.equal( - gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 1)), - true, - ); - }), - ), + const checkpointRow = yield* harness.checkpointRepository.getByThreadAndTurnCount({ + threadId: THREAD_ID, + checkpointTurnCount: 1, + }); + assert.equal(Option.isSome(checkpointRow), true); + if (Option.isSome(checkpointRow)) { + assert.equal(checkpointRow.value.status, "error"); + } + assert.equal( + gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 1)), + true, + ); + }), + ), + LONG_LIVE_TEST_TIMEOUT_MS, ); -it.live("reverts to an earlier checkpoint and trims checkpoint projections + git refs", () => - withHarness((harness) => - Effect.gen(function* () { - yield* seedProjectAndThread(harness); +live( + "reverts to an earlier checkpoint and trims checkpoint projections + git refs", + () => + withHarness((harness) => + Effect.gen(function* () { + yield* seedProjectAndThread(harness); - yield* harness.adapterHarness!.queueTurnResponseForNextSession({ - events: [ - { - type: "turn.started", - ...runtimeBase("evt-revert-1", "2026-02-24T10:05:00.000Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - }, - { - type: "tool.started", - ...runtimeBase("evt-revert-1-tool-started", "2026-02-24T10:05:00.025Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - toolKind: "command", - title: "Edit file", - detail: "README.md", - }, - { - type: "tool.completed", - ...runtimeBase("evt-revert-1-tool-completed", "2026-02-24T10:05:00.035Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - toolKind: "command", - title: "Edit file", - detail: "README.md", - }, - { - type: "message.delta", - ...runtimeBase("evt-revert-1a", "2026-02-24T10:05:00.050Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - delta: "Updated README to v2.\n", - }, - { - type: "turn.completed", - ...runtimeBase("evt-revert-2", "2026-02-24T10:05:00.100Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - status: "completed", - }, - ], - mutateWorkspace: ({ cwd }) => - Effect.sync(() => { - NodeFS.writeFileSync(NodePath.join(cwd, "README.md"), "v2\n", "utf8"); - }), - }); - yield* startTurn({ - harness, - commandId: "cmd-turn-start-revert-1", - messageId: "msg-user-revert-1", - text: "First edit", - createdAt: "2026-02-24T10:04:59.900Z", - }); + yield* harness.adapterHarness!.queueTurnResponseForNextSession({ + events: [ + { + type: "turn.started", + ...runtimeBase("evt-revert-1", "2026-02-24T10:05:00.000Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + }, + { + type: "tool.started", + ...runtimeBase("evt-revert-1-tool-started", "2026-02-24T10:05:00.025Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + toolKind: "command", + title: "Edit file", + detail: "README.md", + }, + { + type: "tool.completed", + ...runtimeBase("evt-revert-1-tool-completed", "2026-02-24T10:05:00.035Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + toolKind: "command", + title: "Edit file", + detail: "README.md", + }, + { + type: "message.delta", + ...runtimeBase("evt-revert-1a", "2026-02-24T10:05:00.050Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + delta: "Updated README to v2.\n", + }, + { + type: "turn.completed", + ...runtimeBase("evt-revert-2", "2026-02-24T10:05:00.100Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + status: "completed", + }, + ], + mutateWorkspace: ({ cwd }) => + Effect.sync(() => { + fs.writeFileSync(path.join(cwd, "README.md"), "v2\n", "utf8"); + }), + }); + yield* startTurn({ + harness, + commandId: "cmd-turn-start-revert-1", + messageId: "msg-user-revert-1", + text: "First edit", + }); - yield* harness.waitForThread( - THREAD_ID, - (entry) => entry.session?.threadId === "thread-1" && entry.checkpoints.length === 1, - ); + yield* harness.waitForThread( + THREAD_ID, + (entry) => entry.session?.threadId === "thread-1" && entry.checkpoints.length === 1, + 30_000, + ); - yield* harness.adapterHarness!.queueTurnResponse(THREAD_ID, { - events: [ - { - type: "turn.started", - ...runtimeBase("evt-revert-3", "2026-02-24T10:05:01.000Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - }, - { - type: "tool.started", - ...runtimeBase("evt-revert-3-tool-started", "2026-02-24T10:05:01.025Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - toolKind: "command", - title: "Edit file", - detail: "README.md", - }, - { - type: "tool.completed", - ...runtimeBase("evt-revert-3-tool-completed", "2026-02-24T10:05:01.035Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - toolKind: "command", - title: "Edit file", - detail: "README.md", - }, - { - type: "message.delta", - ...runtimeBase("evt-revert-3a", "2026-02-24T10:05:01.050Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - delta: "Updated README to v3.\n", - }, - { - type: "turn.completed", - ...runtimeBase("evt-revert-4", "2026-02-24T10:05:01.100Z"), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - status: "completed", - }, - ], - mutateWorkspace: ({ cwd }) => - Effect.sync(() => { - NodeFS.writeFileSync(NodePath.join(cwd, "README.md"), "v3\n", "utf8"); - }), - }); - yield* startTurn({ - harness, - commandId: "cmd-turn-start-revert-2", - messageId: "msg-user-revert-2", - text: "Second edit", - createdAt: "2026-02-24T10:05:00.900Z", - }); + yield* harness.adapterHarness!.queueTurnResponse(THREAD_ID, { + events: [ + { + type: "turn.started", + ...runtimeBase("evt-revert-3", "2026-02-24T10:05:01.000Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + }, + { + type: "tool.started", + ...runtimeBase("evt-revert-3-tool-started", "2026-02-24T10:05:01.025Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + toolKind: "command", + title: "Edit file", + detail: "README.md", + }, + { + type: "tool.completed", + ...runtimeBase("evt-revert-3-tool-completed", "2026-02-24T10:05:01.035Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + toolKind: "command", + title: "Edit file", + detail: "README.md", + }, + { + type: "message.delta", + ...runtimeBase("evt-revert-3a", "2026-02-24T10:05:01.050Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + delta: "Updated README to v3.\n", + }, + { + type: "turn.completed", + ...runtimeBase("evt-revert-4", "2026-02-24T10:05:01.100Z"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + status: "completed", + }, + ], + mutateWorkspace: ({ cwd }) => + Effect.sync(() => { + fs.writeFileSync(path.join(cwd, "README.md"), "v3\n", "utf8"); + }), + }); + yield* startTurn({ + harness, + commandId: "cmd-turn-start-revert-2", + messageId: "msg-user-revert-2", + text: "Second edit", + }); - yield* harness.waitForThread( - THREAD_ID, - (entry) => - entry.latestTurn?.turnId === "turn-2" && - entry.checkpoints.length === 2 && - entry.activities.some((activity) => activity.turnId === "turn-2"), - 8000, - ); + yield* harness.waitForThread( + THREAD_ID, + (entry) => + entry.latestTurn?.turnId === "turn-2" && + entry.checkpoints.length === 2 && + entry.activities.some((activity) => activity.turnId === "turn-2"), + 8000, + ); - yield* harness.engine.dispatch({ - type: "thread.checkpoint.revert", - commandId: CommandId.make("cmd-checkpoint-revert"), - threadId: THREAD_ID, - turnCount: 1, - createdAt: nowIso(), - }); + yield* harness.engine.dispatch({ + type: "thread.checkpoint.revert", + commandId: CommandId.make("cmd-checkpoint-revert"), + threadId: THREAD_ID, + turnCount: 1, + createdAt: nowIso(), + }); - yield* harness.waitForDomainEvent((event) => event.type === "thread.reverted"); - const revertedThread = yield* harness.waitForThread( - THREAD_ID, - (entry) => - entry.checkpoints.length === 1 && entry.checkpoints[0]?.checkpointTurnCount === 1, - ); - assert.equal(revertedThread.checkpoints[0]?.checkpointTurnCount, 1); - assert.deepEqual( - revertedThread.messages.map((message) => ({ role: message.role, text: message.text })), - [ - { role: "user", text: "First edit" }, - { role: "assistant", text: "Updated README to v2.\n" }, - ], - ); - assert.equal( - revertedThread.activities.some((activity) => activity.turnId === "turn-2"), - false, - ); - assert.equal( - revertedThread.activities.some( - (activity) => activity.turnId === "turn-1" && activity.kind === "tool.started", - ), - true, - ); - assert.equal( - revertedThread.activities.some( - (activity) => activity.turnId === "turn-1" && activity.kind === "tool.completed", - ), - true, - ); - assert.equal( - NodeFS.readFileSync(NodePath.join(harness.workspaceDir, "README.md"), "utf8"), - "v2\n", - ); - assert.equal( - gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 2)), - false, - ); - assert.deepEqual(harness.adapterHarness!.getRollbackCalls(THREAD_ID), [1]); + yield* harness.waitForDomainEvent((event) => event.type === "thread.reverted"); + const revertedThread = yield* harness.waitForThread( + THREAD_ID, + (entry) => + entry.checkpoints.length === 1 && entry.checkpoints[0]?.checkpointTurnCount === 1, + 30_000, + ); + assert.equal(revertedThread.checkpoints[0]?.checkpointTurnCount, 1); + assert.deepEqual( + revertedThread.messages.map((message) => ({ role: message.role, text: message.text })), + [ + { role: "user", text: "First edit" }, + { role: "assistant", text: "Updated README to v2.\n" }, + ], + ); + assert.equal( + revertedThread.activities.some((activity) => activity.turnId === "turn-2"), + false, + ); + assert.equal( + revertedThread.activities.some( + (activity) => activity.turnId === "turn-1" && activity.kind === "tool.started", + ), + true, + ); + assert.equal( + revertedThread.activities.some( + (activity) => activity.turnId === "turn-1" && activity.kind === "tool.completed", + ), + true, + ); + assert.equal(fs.readFileSync(path.join(harness.workspaceDir, "README.md"), "utf8"), "v2\n"); + assert.equal( + gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 2)), + false, + ); + assert.deepEqual(harness.adapterHarness!.getRollbackCalls(THREAD_ID), [1]); - const checkpointRows = yield* harness.checkpointRepository.listByThreadId({ - threadId: THREAD_ID, - }); - assert.equal(checkpointRows.length, 1); - }), - ), + const checkpointRows = yield* harness.checkpointRepository.listByThreadId({ + threadId: THREAD_ID, + }); + assert.equal(checkpointRows.length, 1); + }), + ), + LONG_LIVE_TEST_TIMEOUT_MS, ); -it.live( +live( "appends checkpoint.revert.failed activity when revert is requested without an active session", () => withHarness((harness) => @@ -924,7 +932,7 @@ it.live( ), ); -it.live("starts a claudeAgent session on first turn when provider is requested", () => +live("starts a claudeAgent session on first turn when provider is requested", () => withHarness( (harness) => Effect.gen(function* () { @@ -993,7 +1001,7 @@ it.live("starts a claudeAgent session on first turn when provider is requested", ), ); -it.live("recovers claudeAgent sessions after provider stopAll using persisted resume state", () => +live("recovers claudeAgent sessions after provider stopAll using persisted resume state", () => withHarness( (harness) => Effect.gen(function* () { @@ -1051,6 +1059,7 @@ it.live("recovers claudeAgent sessions after provider stopAll using persisted re THREAD_ID, (entry) => entry.latestTurn?.turnId === "turn-1" && entry.session?.threadId === "thread-1", + 30_000, ); yield* harness.adapterHarness!.adapter.stopAll(); @@ -1125,7 +1134,7 @@ it.live("recovers claudeAgent sessions after provider stopAll using persisted re ), ); -it.live("forwards claudeAgent approval responses to the provider session", () => +live("forwards claudeAgent approval responses to the provider session", () => withHarness( (harness) => Effect.gen(function* () { @@ -1211,7 +1220,7 @@ it.live("forwards claudeAgent approval responses to the provider session", () => ), ); -it.live("forwards thread.turn.interrupt to claudeAgent provider sessions", () => +live("forwards thread.turn.interrupt to claudeAgent provider sessions", () => withHarness( (harness) => Effect.gen(function* () { @@ -1292,150 +1301,130 @@ it.live("forwards thread.turn.interrupt to claudeAgent provider sessions", () => ), ); -it.live("reverts claudeAgent turns and rolls back provider conversation state", () => - withHarness( - (harness) => - Effect.gen(function* () { - yield* seedProjectAndThread(harness); +live( + "reverts claudeAgent turns and rolls back provider conversation state", + () => + withHarness( + (harness) => + Effect.gen(function* () { + yield* seedProjectAndThread(harness); - yield* harness.adapterHarness!.queueTurnResponseForNextSession({ - events: [ - { - type: "turn.started", - ...runtimeBase( - "evt-claude-revert-1", - "2026-02-24T10:14:00.000Z", - CLAUDE_AGENT_PROVIDER, - ), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, + yield* harness.adapterHarness!.queueTurnResponseForNextSession({ + events: [ + { + type: "turn.started", + ...runtimeBase("evt-claude-revert-1", "2026-02-24T10:14:00.000Z", "claudeAgent"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + }, + { + type: "message.delta", + ...runtimeBase("evt-claude-revert-2", "2026-02-24T10:14:00.050Z", "claudeAgent"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + delta: "README -> v2\n", + }, + { + type: "turn.completed", + ...runtimeBase("evt-claude-revert-3", "2026-02-24T10:14:00.100Z", "claudeAgent"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + status: "completed", + }, + ], + mutateWorkspace: ({ cwd }) => + Effect.sync(() => { + fs.writeFileSync(path.join(cwd, "README.md"), "v2\n", "utf8"); + }), + }); + + yield* startTurn({ + harness, + commandId: "cmd-turn-start-claude-revert-1", + messageId: "msg-user-claude-revert-1", + text: "First Claude edit", + modelSelection: { + provider: "claudeAgent", + model: "claude-sonnet-4-6", }, - { - type: "message.delta", - ...runtimeBase( - "evt-claude-revert-2", - "2026-02-24T10:14:00.050Z", - CLAUDE_AGENT_PROVIDER, - ), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - delta: "README -> v2\n", - }, - { - type: "turn.completed", - ...runtimeBase( - "evt-claude-revert-3", - "2026-02-24T10:14:00.100Z", - CLAUDE_AGENT_PROVIDER, - ), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - status: "completed", - }, - ], - mutateWorkspace: ({ cwd }) => - Effect.sync(() => { - NodeFS.writeFileSync(NodePath.join(cwd, "README.md"), "v2\n", "utf8"); - }), - }); + }); - yield* startTurn({ - harness, - commandId: "cmd-turn-start-claude-revert-1", - messageId: "msg-user-claude-revert-1", - text: "First Claude edit", - modelSelection: { - instanceId: ProviderInstanceId.make("claudeAgent"), - model: "claude-sonnet-4-6", - }, - }); + yield* harness.waitForThread( + THREAD_ID, + (entry) => + entry.latestTurn?.turnId === "turn-1" && entry.session?.threadId === "thread-1", + ); - yield* harness.waitForThread( - THREAD_ID, - (entry) => - entry.latestTurn?.turnId === "turn-1" && entry.session?.threadId === "thread-1", - ); + yield* harness.adapterHarness!.queueTurnResponse(THREAD_ID, { + events: [ + { + type: "turn.started", + ...runtimeBase("evt-claude-revert-4", "2026-02-24T10:14:01.000Z", "claudeAgent"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + }, + { + type: "message.delta", + ...runtimeBase("evt-claude-revert-5", "2026-02-24T10:14:01.050Z", "claudeAgent"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + delta: "README -> v3\n", + }, + { + type: "turn.completed", + ...runtimeBase("evt-claude-revert-6", "2026-02-24T10:14:01.100Z", "claudeAgent"), + threadId: THREAD_ID, + turnId: FIXTURE_TURN_ID, + status: "completed", + }, + ], + mutateWorkspace: ({ cwd }) => + Effect.sync(() => { + fs.writeFileSync(path.join(cwd, "README.md"), "v3\n", "utf8"); + }), + }); - yield* harness.adapterHarness!.queueTurnResponse(THREAD_ID, { - events: [ - { - type: "turn.started", - ...runtimeBase( - "evt-claude-revert-4", - "2026-02-24T10:14:01.000Z", - CLAUDE_AGENT_PROVIDER, - ), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - }, - { - type: "message.delta", - ...runtimeBase( - "evt-claude-revert-5", - "2026-02-24T10:14:01.050Z", - CLAUDE_AGENT_PROVIDER, - ), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - delta: "README -> v3\n", - }, - { - type: "turn.completed", - ...runtimeBase( - "evt-claude-revert-6", - "2026-02-24T10:14:01.100Z", - CLAUDE_AGENT_PROVIDER, - ), - threadId: THREAD_ID, - turnId: FIXTURE_TURN_ID, - status: "completed", - }, - ], - mutateWorkspace: ({ cwd }) => - Effect.sync(() => { - NodeFS.writeFileSync(NodePath.join(cwd, "README.md"), "v3\n", "utf8"); - }), - }); + yield* startTurn({ + harness, + commandId: "cmd-turn-start-claude-revert-2", + messageId: "msg-user-claude-revert-2", + text: "Second Claude edit", + }); - yield* startTurn({ - harness, - commandId: "cmd-turn-start-claude-revert-2", - messageId: "msg-user-claude-revert-2", - text: "Second Claude edit", - }); + yield* harness.waitForThread( + THREAD_ID, + (entry) => + entry.latestTurn?.turnId === "turn-2" && + entry.checkpoints.length === 2 && + entry.session?.providerName === "claudeAgent", + 30_000, + ); - yield* harness.waitForThread( - THREAD_ID, - (entry) => - entry.latestTurn?.turnId === "turn-2" && - entry.checkpoints.length === 2 && - entry.session?.providerName === "claudeAgent", - ); + yield* harness.engine.dispatch({ + type: "thread.checkpoint.revert", + commandId: CommandId.make("cmd-checkpoint-revert-claude"), + threadId: THREAD_ID, + turnCount: 1, + createdAt: nowIso(), + }); - yield* harness.engine.dispatch({ - type: "thread.checkpoint.revert", - commandId: CommandId.make("cmd-checkpoint-revert-claude"), - threadId: THREAD_ID, - turnCount: 1, - createdAt: nowIso(), - }); - - const revertedThread = yield* harness.waitForThread( - THREAD_ID, - (entry) => - entry.checkpoints.length === 1 && entry.checkpoints[0]?.checkpointTurnCount === 1, - ); - assert.equal(revertedThread.checkpoints[0]?.checkpointTurnCount, 1); - assert.equal( - gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 1)), - true, - ); - assert.equal( - gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 2)), - false, - ); - assert.deepEqual(harness.adapterHarness!.getRollbackCalls(THREAD_ID), [1]); - }), - CLAUDE_AGENT_PROVIDER, - ), + const revertedThread = yield* harness.waitForThread( + THREAD_ID, + (entry) => + entry.checkpoints.length === 1 && entry.checkpoints[0]?.checkpointTurnCount === 1, + ); + assert.equal(revertedThread.checkpoints[0]?.checkpointTurnCount, 1); + assert.equal( + gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 1)), + true, + ); + assert.equal( + gitRefExists(harness.workspaceDir, checkpointRefForThreadTurn(THREAD_ID, 2)), + false, + ); + assert.deepEqual(harness.adapterHarness!.getRollbackCalls(THREAD_ID), [1]); + }), + "claudeAgent", + ), + LONG_LIVE_TEST_TIMEOUT_MS, ); diff --git a/apps/server/package.json b/apps/server/package.json index 7a508a38ef..5029bba970 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -44,7 +44,9 @@ "@types/node": "catalog:", "effect-acp": "workspace:*", "effect-codex-app-server": "workspace:*", - "vite-plus": "catalog:" + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:" }, "engines": { "node": "^22.16 || ^23.11 || >=24.10" diff --git a/apps/server/scripts/acp-mock-agent.ts b/apps/server/scripts/acp-mock-agent.ts index bc7828dd85..c59776b8df 100644 --- a/apps/server/scripts/acp-mock-agent.ts +++ b/apps/server/scripts/acp-mock-agent.ts @@ -12,7 +12,6 @@ import * as AcpError from "effect-acp/errors"; import type * as AcpSchema from "effect-acp/schema"; const requestLogPath = process.env.T3_ACP_REQUEST_LOG_PATH; -const exitLogPath = process.env.T3_ACP_EXIT_LOG_PATH; const emitToolCalls = process.env.T3_ACP_EMIT_TOOL_CALLS === "1"; const emitInterleavedAssistantToolCalls = process.env.T3_ACP_EMIT_INTERLEAVED_ASSISTANT_TOOL_CALLS === "1"; @@ -57,42 +56,6 @@ let promptCount = 0; let overlappingFirstPromptId: string | undefined; const cancelledSessions = new Set(); -function promptIdFromRequestMeta( - request: Pick, -): string | undefined { - const meta = request._meta; - if (meta === null || typeof meta !== "object") { - return undefined; - } - const promptId = meta.promptId ?? meta.requestId; - return typeof promptId === "string" && promptId.length > 0 ? promptId : undefined; -} - -function logExit(reason: string): void { - if (!exitLogPath) { - return; - } - NodeFS.appendFileSync(exitLogPath, `${reason}\n`, "utf8"); -} - -function writeJsonRpcNotification(method: string, params: unknown): void { - process.stdout.write(`${JSON.stringify({ jsonrpc: "2.0", method, params })}\n`); -} - -process.once("SIGTERM", () => { - logExit("SIGTERM"); - process.exit(0); -}); - -process.once("SIGINT", () => { - logExit("SIGINT"); - process.exit(0); -}); - -process.once("exit", (code) => { - logExit(`exit:${code}`); -}); - function configOptions(): ReadonlyArray { if (parameterizedModelPicker) { const baseOptions: Array = [ @@ -434,21 +397,8 @@ const program = Effect.gen(function* () { ); yield* agent.handleCancel(({ sessionId }) => - Effect.gen(function* () { - const cancelledSessionId = String(sessionId ?? "mock-session-1"); - cancelledSessions.add(cancelledSessionId); - if (emitLateUpdateAfterCancel) { - yield* Effect.sleep("50 millis"); - yield* Effect.sync(() => { - writeJsonRpcNotification("session/update", { - sessionId: cancelledSessionId, - update: { - sessionUpdate: "agent_message_chunk", - content: { type: "text", text: "late after cancel" }, - }, - }); - }); - } + Effect.sync(() => { + cancelledSessions.add(String(sessionId)); }), ); diff --git a/apps/server/scripts/cursor-acp-model-mismatch-probe.ts b/apps/server/scripts/cursor-acp-model-mismatch-probe.ts index 7e4e88aeb2..d012ddbe1b 100644 --- a/apps/server/scripts/cursor-acp-model-mismatch-probe.ts +++ b/apps/server/scripts/cursor-acp-model-mismatch-probe.ts @@ -323,10 +323,10 @@ async function setSelectOptionIfAdvertised( sessionId, configId: option.id, value, - })) as SetConfigResult | null | undefined; + })) as SetConfigResult; logSection(`SET_${label}_RESPONSE`, response); - return response?.configOptions ?? configOptions; + return response.configOptions ?? configOptions; } async function main() { @@ -384,10 +384,10 @@ async function main() { sessionId, configId: modelConfig.id, value: targetModel, - })) as SetConfigResult | null | undefined; + })) as SetConfigResult; logSection("SET_MODEL_RESPONSE", setModelResponse); - configOptions = setModelResponse?.configOptions ?? configOptions; + configOptions = setModelResponse.configOptions ?? configOptions; configOptions = await setSelectOptionIfAdvertised( rpc, diff --git a/apps/server/src/git/GitManager.test.ts b/apps/server/src/git/GitManager.test.ts index a5f8fa659f..f1c824a5da 100644 --- a/apps/server/src/git/GitManager.test.ts +++ b/apps/server/src/git/GitManager.test.ts @@ -679,7 +679,14 @@ const GitManagerTestLayer = GitVcsDriver.layer.pipe( ); it.layer(GitManagerTestLayer)("GitManager", (it) => { - it.effect("status includes PR metadata when branch already has an open PR", () => + const LONG_EFFECT_TEST_TIMEOUT_MS = 30_000; + const effect = ( + name: string, + test: Parameters[1], + timeout = LONG_EFFECT_TEST_TIMEOUT_MS, + ) => it.effect(name, test, timeout); + + effect("status includes PR metadata when branch already has an open PR", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -721,7 +728,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status trims PR metadata returned by gh before publishing it", () => + effect("status trims PR metadata returned by gh before publishing it", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -760,7 +767,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status ignores invalid gh pr list entries and keeps valid ones", () => + effect("status ignores invalid gh pr list entries and keeps valid ones", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -812,7 +819,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status preserves lowercase merged and closed PR states from gh json", () => + effect("status preserves lowercase merged and closed PR states from gh json", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -862,7 +869,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status returns an explicit non-repo result for non-git directories", () => + effect("status returns an explicit non-repo result for non-git directories", () => Effect.gen(function* () { const cwd = yield* makeTempDir("t3code-git-manager-non-repo-"); const { manager } = yield* makeManager(); @@ -889,7 +896,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status returns an explicit non-repo result for deleted directories", () => + effect("status returns an explicit non-repo result for deleted directories", () => Effect.gen(function* () { const rootDir = yield* makeTempDir("t3code-git-manager-missing-dir-"); const cwd = NodePath.join(rootDir, "deleted-repo"); @@ -919,7 +926,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status briefly caches repeated lookups for the same cwd", () => + effect("status briefly caches repeated lookups for the same cwd", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1019,6 +1026,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }); it.effect( + effect( "status ignores unrelated fork PRs when the current branch tracks the same repository", () => Effect.gen(function* () { @@ -1060,7 +1068,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect( + effect( "status detects cross-repo PRs from the upstream remote URL owner", () => Effect.gen(function* () { @@ -1126,10 +1134,10 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { "pr list --head jasonLaster:statemachine --state all --limit 20 --json number,title,url,baseRefName,headRefName,state,mergedAt,updatedAt,isCrossRepository,headRepository,headRepositoryOwner", ); }), - 20_000, + LONG_EFFECT_TEST_TIMEOUT_MS, ); - it.effect( + effect( "status ignores synthetic local branch aliases when the upstream remote name contains slashes", () => Effect.gen(function* () { @@ -1242,10 +1250,10 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { ), ).toBe(false); }), - 20_000, + LONG_EFFECT_TEST_TIMEOUT_MS, ); - it.effect("status returns merged PR state when latest PR was merged", () => + effect("status returns merged PR state when latest PR was merged", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1284,38 +1292,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status hides merged PRs on the default branch", () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - - const { manager } = yield* makeManager({ - ghScenario: { - prListSequence: [ - // @effect-diagnostics-next-line preferSchemaOverJson:off - JSON.stringify([ - { - number: 23, - title: "Merged PR", - url: "https://github.com/pingdotgg/codething-mvp/pull/23", - baseRefName: "feature/status-default-branch-target", - headRefName: "main", - state: "MERGED", - mergedAt: "2026-01-30T10:00:00Z", - updatedAt: "2026-01-30T10:00:00Z", - }, - ]), - ], - }, - }); - - const status = yield* manager.status({ cwd: repoDir }); - expect(status.refName).toBe("main"); - expect(status.pr).toBeNull(); - }), - ); - - it.effect("status prefers open PR when merged PR has newer updatedAt", () => + effect("status prefers open PR when merged PR has newer updatedAt", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1363,7 +1340,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("status is resilient to gh lookup failures and returns pr null", () => + effect("status is resilient to gh lookup failures and returns pr null", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1714,119 +1691,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("preserves custom style when instructions are empty", () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - NodeFS.writeFileSync(NodePath.join(repoDir, "README.md"), "hello\nworld\n"); - let generatedPolicy: TextGeneration.CommitMessageGenerationInput["policy"] = undefined; - - const { manager } = yield* makeManager({ - serverSettings: { - sourceControlWritingStyle: { - mode: "custom" as const, - customInstructions: "", - }, - }, - textGeneration: { - generateCommitMessage: (input) => { - generatedPolicy = input.policy; - return Effect.succeed({ subject: "Preserve custom style", body: "" }); - }, - }, - }); - yield* runStackedAction(manager, { - cwd: repoDir, - action: "commit", - }); - - expect(generatedPolicy).toEqual({ - kind: "custom", - inferRepositoryConventions: false, - }); - }), - ); - - it.effect("falls back when the dedicated source control writer is unavailable", () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - NodeFS.writeFileSync(NodePath.join(repoDir, "README.md"), "hello\nworld\n"); - const missingInstanceId = ProviderInstanceId.make("missing_writer"); - let generatedModelSelection: - | TextGeneration.CommitMessageGenerationInput["modelSelection"] - | undefined; - - const { manager } = yield* makeManager({ - serverSettings: { - providerInstances: { - [missingInstanceId]: { - driver: ProviderDriverKind.make("missing-driver"), - config: {}, - }, - }, - sourceControlWriterModelSelection: { - instanceId: missingInstanceId, - model: "missing-model", - }, - }, - textGeneration: { - generateCommitMessage: (input) => { - generatedModelSelection = input.modelSelection; - return Effect.succeed({ subject: "Use the available writer", body: "" }); - }, - }, - }); - - yield* runStackedAction(manager, { - cwd: repoDir, - action: "commit", - }); - - expect(generatedModelSelection).toEqual(DEFAULT_SERVER_SETTINGS.textGenerationModelSelection); - }), - ); - - it.effect("preserves repository conventions style when recent history is empty", () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* runGit(repoDir, ["init", "--initial-branch=main"]); - yield* runGit(repoDir, ["config", "user.email", "test@example.com"]); - yield* runGit(repoDir, ["config", "user.name", "Test User"]); - NodeFS.writeFileSync(NodePath.join(repoDir, "README.md"), "hello\n"); - yield* runGit(repoDir, ["add", "README.md"]); - let generatedPolicy: TextGeneration.CommitMessageGenerationInput["policy"] = undefined; - - const { manager } = yield* makeManager({ - serverSettings: { - sourceControlWritingStyle: { - mode: "repo_conventions" as const, - }, - }, - textGeneration: { - generateCommitMessage: (input) => { - generatedPolicy = input.policy; - return Effect.succeed({ subject: "Create initial commit", body: "" }); - }, - }, - }); - yield* runStackedAction(manager, { - cwd: repoDir, - action: "commit", - }); - - expect(generatedPolicy).toEqual({ - kind: "repo_conventions", - commitInstructions: - "Follow the repository's established commit message style when examples are available.", - changeRequestInstructions: - "Follow the repository's established change request title and body style when examples are available.", - inferRepositoryConventions: true, - }); - }), - ); - - it.effect("uses custom commit message when provided", () => + effect("uses custom commit message when provided", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1869,7 +1734,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("commits only selected files when filePaths is provided", () => + effect("commits only selected files when filePaths is provided", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1894,7 +1759,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("creates feature branch, commits, and pushes with featureBranch option", () => + effect("creates feature branch, commits, and pushes with featureBranch option", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -1957,7 +1822,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("featureBranch uses custom commit message and derives branch name", () => + effect("featureBranch uses custom commit message and derives branch name", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2000,7 +1865,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("skips commit when there are no uncommitted changes", () => + effect("skips commit when there are no uncommitted changes", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2018,7 +1883,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("featureBranch returns error when worktree is clean", () => + effect("featureBranch returns error when worktree is clean", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2039,7 +1904,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("commits and pushes with upstream auto-setup when needed", () => + effect("commits and pushes with upstream auto-setup when needed", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2066,7 +1931,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect( + effect( "pushes and creates PR from a no-upstream branch when local commits are ahead of base", () => Effect.gen(function* () { @@ -2118,7 +1983,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("skips push when branch is already up to date", () => + effect("skips push when branch is already up to date", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2139,7 +2004,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("pushes existing clean commits without rerunning commit logic", () => + effect("pushes existing clean commits without rerunning commit logic", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2167,42 +2032,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("pushes existing commits without committing dirty worktree changes", () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - yield* runGit(repoDir, ["checkout", "-b", "feature/push-dirty"]); - const remoteDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); - NodeFS.writeFileSync(NodePath.join(repoDir, "push-dirty.txt"), "push dirty\n"); - yield* runGit(repoDir, ["add", "push-dirty.txt"]); - yield* runGit(repoDir, ["commit", "-m", "Push dirty branch"]); - NodeFS.mkdirSync(NodePath.join(repoDir, ".vercel")); - NodeFS.writeFileSync(NodePath.join(repoDir, ".vercel", "project.json"), "{}\n"); - - const { manager } = yield* makeManager(); - const result = yield* runStackedAction(manager, { - cwd: repoDir, - action: "push", - }); - - expect(result.commit.status).toBe("skipped_not_requested"); - expect(result.push.status).toBe("pushed"); - expect(result.pr.status).toBe("skipped_not_requested"); - expect( - yield* runGit(repoDir, ["status", "--porcelain"]).pipe( - Effect.map((output) => output.stdout.trim()), - ), - ).toContain("?? .vercel/"); - expect( - yield* runGit(remoteDir, ["log", "-1", "--pretty=%s", "feature/push-dirty"]).pipe( - Effect.map((output) => output.stdout.trim()), - ), - ).toBe("Push dirty branch"); - }), - ); - - it.effect("create_pr pushes a clean branch before creating the PR when needed", () => + effect("create_pr pushes a clean branch before creating the PR when needed", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2249,51 +2079,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("create_pr falls back to main when source control provider detection fails", () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - yield* runGit(repoDir, ["checkout", "-b", "feature/provider-fallback"]); - NodeFS.writeFileSync(NodePath.join(repoDir, "provider-fallback.txt"), "fallback\n"); - yield* runGit(repoDir, ["add", "provider-fallback.txt"]); - yield* runGit(repoDir, ["commit", "-m", "Provider fallback"]); - const remoteDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); - - const { manager, ghCalls } = yield* makeManager({ - ghScenario: { - prListSequence: [ - "[]", - // @effect-diagnostics-next-line preferSchemaOverJson:off - JSON.stringify([ - { - number: 404, - title: "Provider fallback", - url: "https://github.com/pingdotgg/codething-mvp/pull/404", - baseRefName: "main", - headRefName: "feature/provider-fallback", - }, - ]), - ], - }, - }); - - const result = yield* runStackedAction(manager, { - cwd: repoDir, - action: "create_pr", - }); - - expect(result.pr.status).toBe("created"); - expect(result.pr.number).toBe(404); - expect( - ghCalls.some((call) => - call.includes("pr create --base main --head feature/provider-fallback"), - ), - ).toBe(true); - }), - ); - - it.effect("returns existing PR metadata for commit/push/pr action", () => + effect("returns existing PR metadata for commit/push/pr action", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2339,7 +2125,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect( + effect( "returns existing cross-repo PR metadata using the fork owner selector", () => Effect.gen(function* () { @@ -2397,10 +2183,10 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { ).toBe(true); expect(ghCalls.some((call) => call.startsWith("pr create "))).toBe(false); }), - 12_000, + LONG_EFFECT_TEST_TIMEOUT_MS, ); - it.effect( + effect( "returns the correct existing PR when a slash remote checks out to a synthetic local alias", () => Effect.gen(function* () { @@ -2497,10 +2283,10 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { false, ); }), - 20_000, + LONG_EFFECT_TEST_TIMEOUT_MS, ); - it.effect( + effect( "prefers owner-qualified selectors before bare branch names for cross-repo PRs", () => Effect.gen(function* () { @@ -2572,10 +2358,10 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { expect(ownerSelectorCallIndex).toBeGreaterThanOrEqual(0); expect(ghCalls.some((call) => call.startsWith("pr create "))).toBe(false); }), - 12_000, + LONG_EFFECT_TEST_TIMEOUT_MS, ); - it.effect( + effect( "stops probing head selectors after finding an existing PR", () => Effect.gen(function* () { @@ -2639,127 +2425,10 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { "pr list --head octocat:statemachine --state open --limit 1", ); }), - 12_000, + LONG_EFFECT_TEST_TIMEOUT_MS, ); - it.effect( - "does not reuse a cross-repo PR when GitHub omits head identity metadata", - () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - yield* runGit(repoDir, ["checkout", "-b", "statemachine"]); - const forkDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "fork-seed", forkDir]); - yield* runGit(repoDir, ["push", "-u", "fork-seed", "statemachine"]); - yield* runGit(repoDir, [ - "config", - "remote.fork-seed.url", - "git@github.com:octocat/codething-mvp.git", - ]); - - const { manager, ghCalls } = yield* makeManager({ - ghScenario: { - prListSequenceByHeadSelector: { - "octocat:statemachine": [ - `[{"number":41,"title":"Ambiguous fork PR","url":"https://github.com/pingdotgg/codething-mvp/pull/41","baseRefName":"main","headRefName":"statemachine","state":"OPEN"}]`, - `[{"number":142,"title":"Add stacked git actions","url":"https://github.com/pingdotgg/codething-mvp/pull/142","baseRefName":"main","headRefName":"statemachine","state":"OPEN","isCrossRepository":true,"headRepository":{"nameWithOwner":"octocat/codething-mvp"},"headRepositoryOwner":{"login":"octocat"}}]`, - ], - "fork-seed:statemachine": ["[]"], - statemachine: ["[]"], - }, - }, - }); - - const result = yield* runStackedAction(manager, { - cwd: repoDir, - action: "commit_push_pr", - }); - - expect(result.pr.status).toBe("created"); - expect(result.pr.number).toBe(142); - expect(ghCalls.some((call) => call.startsWith("pr create "))).toBe(true); - }), - 20_000, - ); - - it.effect("rejects same-repo PR metadata when matching a cross-repo head context", () => - Effect.sync(() => { - const headContext = { - headBranch: "statemachine", - headRepositoryNameWithOwner: "pingdotgg/codething-mvp", - headRepositoryOwnerLogin: "pingdotgg", - isCrossRepository: true, - }; - - expect( - GitManager.matchesBranchHeadContext( - { - number: 41, - title: "Same-repo PR", - url: "https://github.com/pingdotgg/codething-mvp/pull/41", - baseRefName: "main", - headRefName: "statemachine", - state: "open", - updatedAt: Option.none(), - isCrossRepository: false, - headRepositoryNameWithOwner: "pingdotgg/codething-mvp", - headRepositoryOwnerLogin: "pingdotgg", - }, - headContext, - ), - ).toBe(false); - - expect( - GitManager.matchesBranchHeadContext( - { - number: 142, - title: "Fork PR", - url: "https://github.com/pingdotgg/codething-mvp/pull/142", - baseRefName: "main", - headRefName: "statemachine", - state: "open", - updatedAt: Option.none(), - isCrossRepository: true, - headRepositoryNameWithOwner: "pingdotgg/codething-mvp", - headRepositoryOwnerLogin: "pingdotgg", - }, - headContext, - ), - ).toBe(true); - }), - ); - - it.effect("accepts fork PR metadata when origin is the fork checkout remote", () => - Effect.sync(() => { - const headContext = { - headBranch: "t3code/git-audit-stability", - headRepositoryNameWithOwner: "justsomelegs/t3code", - headRepositoryOwnerLogin: "justsomelegs", - isCrossRepository: false, - }; - - expect( - GitManager.matchesBranchHeadContext( - { - number: 2284, - title: "Improve branch mismatch warnings", - url: "https://github.com/pingdotgg/t3code/pull/2284", - baseRefName: "main", - headRefName: "t3code/git-audit-stability", - state: "open", - updatedAt: Option.none(), - isCrossRepository: true, - headRepositoryNameWithOwner: "justsomelegs/t3code", - headRepositoryOwnerLogin: "justsomelegs", - }, - headContext, - ), - ).toBe(true); - }), - ); - - it.effect("creates PR when one does not already exist", () => + effect("creates PR when one does not already exist", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -2834,137 +2503,75 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("generates PR content against the remote base when the local base is stale", () => + effect("creates a new PR instead of reusing an unrelated fork PR with the same head branch", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); + yield* runGit(repoDir, ["checkout", "-b", "feature/no-fork-match"]); const remoteDir = yield* createBareRemote(); yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); - yield* runGit(repoDir, ["push", "-u", "origin", "main"]); - yield* runGit(remoteDir, ["symbolic-ref", "HEAD", "refs/heads/main"]); - - const peerDir = yield* makeTempDir("t3code-git-peer-"); - yield* runGit(peerDir, ["clone", remoteDir, "."]); - yield* runGit(peerDir, ["config", "user.email", "peer@example.com"]); - yield* runGit(peerDir, ["config", "user.name", "Peer User"]); - NodeFS.writeFileSync(NodePath.join(peerDir, "remote.txt"), "remote\n"); - yield* runGit(peerDir, ["add", "remote.txt"]); - yield* runGit(peerDir, ["commit", "-m", "Remote base commit"]); - yield* runGit(peerDir, ["push", "origin", "main"]); - - yield* runGit(repoDir, ["fetch", "origin"]); - yield* runGit(repoDir, [ - "checkout", - "--no-track", - "-b", - "feature/remote-base", - "origin/main", - ]); - NodeFS.writeFileSync(NodePath.join(repoDir, "feature.txt"), "feature\n"); - yield* runGit(repoDir, ["add", "feature.txt"]); + fs.writeFileSync(path.join(repoDir, "changes.txt"), "change\n"); + yield* runGit(repoDir, ["add", "changes.txt"]); yield* runGit(repoDir, ["commit", "-m", "Feature commit"]); - yield* runGit(repoDir, ["push", "-u", "origin", "feature/remote-base"]); - yield* runGit(repoDir, ["config", "branch.feature/remote-base.gh-merge-base", "main"]); + yield* runGit(repoDir, ["push", "-u", "origin", "feature/no-fork-match"]); - let generatedCommitSummary = ""; - const { manager } = yield* makeManager({ + const { manager, ghCalls } = yield* makeManager({ ghScenario: { - prListSequence: ["[]", "[]"], - }, - textGeneration: { - generatePrContent: (input) => { - generatedCommitSummary = input.commitSummary; - return Effect.succeed({ title: "Feature PR", body: "Feature body" }); - }, + prListSequence: [ + JSON.stringify([ + { + number: 1661, + title: "Fork PR with same branch name", + url: "https://github.com/pingdotgg/t3code/pull/1661", + baseRefName: "main", + headRefName: "feature/no-fork-match", + state: "OPEN", + isCrossRepository: true, + headRepository: { + nameWithOwner: "lnieuwenhuis/t3code", + }, + headRepositoryOwner: { + login: "lnieuwenhuis", + }, + }, + ]), + JSON.stringify([ + { + number: 188, + title: "Add stacked git actions", + url: "https://github.com/pingdotgg/codething-mvp/pull/188", + baseRefName: "main", + headRefName: "feature/no-fork-match", + state: "OPEN", + isCrossRepository: false, + }, + ]), + ], }, }); - const result = yield* runStackedAction(manager, { cwd: repoDir, - action: "create_pr", + action: "commit_push_pr", }); expect(result.pr.status).toBe("created"); - expect(generatedCommitSummary).toContain("Feature commit"); - expect(generatedCommitSummary).not.toContain("Remote base commit"); + expect(result.pr.number).toBe(188); + expect(result.toast).toEqual({ + title: "Created PR #188", + description: "Add stacked git actions", + cta: { + kind: "open_pr", + label: "View PR", + url: "https://github.com/pingdotgg/codething-mvp/pull/188", + }, + }); + expect( + ghCalls.some((call) => call.includes("pr create --base main --head feature/no-fork-match")), + ).toBe(true); }), ); - it.effect( - "creates a new PR instead of reusing an unrelated fork PR with the same head branch", - () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - yield* runGit(repoDir, ["checkout", "-b", "feature/no-fork-match"]); - const remoteDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); - NodeFS.writeFileSync(NodePath.join(repoDir, "changes.txt"), "change\n"); - yield* runGit(repoDir, ["add", "changes.txt"]); - yield* runGit(repoDir, ["commit", "-m", "Feature commit"]); - yield* runGit(repoDir, ["push", "-u", "origin", "feature/no-fork-match"]); - - const { manager, ghCalls } = yield* makeManager({ - ghScenario: { - prListSequence: [ - // @effect-diagnostics-next-line preferSchemaOverJson:off - JSON.stringify([ - { - number: 1661, - title: "Fork PR with same branch name", - url: "https://github.com/pingdotgg/t3code/pull/1661", - baseRefName: "main", - headRefName: "feature/no-fork-match", - state: "OPEN", - isCrossRepository: true, - headRepository: { - nameWithOwner: "lnieuwenhuis/t3code", - }, - headRepositoryOwner: { - login: "lnieuwenhuis", - }, - }, - ]), - // @effect-diagnostics-next-line preferSchemaOverJson:off - JSON.stringify([ - { - number: 188, - title: "Add stacked git actions", - url: "https://github.com/pingdotgg/codething-mvp/pull/188", - baseRefName: "main", - headRefName: "feature/no-fork-match", - state: "OPEN", - isCrossRepository: false, - }, - ]), - ], - }, - }); - const result = yield* runStackedAction(manager, { - cwd: repoDir, - action: "commit_push_pr", - }); - - expect(result.pr.status).toBe("created"); - expect(result.pr.number).toBe(188); - expect(result.toast).toEqual({ - title: "Created PR #188", - description: "Add stacked git actions", - cta: { - kind: "open_pr", - label: "View PR", - url: "https://github.com/pingdotgg/codething-mvp/pull/188", - }, - }); - expect( - ghCalls.some((call) => - call.includes("pr create --base main --head feature/no-fork-match"), - ), - ).toBe(true); - }), - ); - - it.effect("creates cross-repo PRs with the fork owner selector and default base branch", () => + effect("creates cross-repo PRs with the fork owner selector and default base branch", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3035,7 +2642,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("rejects push/pr actions from detached HEAD", () => + effect("rejects push/pr actions from detached HEAD", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3053,7 +2660,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("surfaces missing gh binary errors", () => + effect("surfaces missing gh binary errors", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3083,7 +2690,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("surfaces gh auth errors with guidance", () => + effect("surfaces gh auth errors with guidance", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3113,7 +2720,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("resolves pull requests from #number references", () => + effect("resolves pull requests from #number references", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3148,7 +2755,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("prepares pull request threads in local mode by checking out the PR branch", () => + effect("prepares pull request threads in local mode by checking out the PR branch", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3184,114 +2791,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect( - "restores same-repository upstream tracking after local PR checkout without a remote ref", - () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - const remoteDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); - yield* runGit(repoDir, ["push", "-u", "origin", "main"]); - yield* runGit(repoDir, ["checkout", "-b", "feature/pr-local-upstream"]); - NodeFS.writeFileSync(NodePath.join(repoDir, "upstream.txt"), "upstream\n"); - yield* runGit(repoDir, ["add", "upstream.txt"]); - yield* runGit(repoDir, ["commit", "-m", "Local upstream PR branch"]); - yield* runGit(repoDir, ["push", "-u", "origin", "feature/pr-local-upstream"]); - yield* runGit(repoDir, ["checkout", "main"]); - yield* runGit(repoDir, ["branch", "-D", "feature/pr-local-upstream"]); - yield* runGit(repoDir, [ - "update-ref", - "-d", - "refs/remotes/origin/feature/pr-local-upstream", - ]); - - const { manager } = yield* makeManager({ - ghScenario: { - pullRequest: { - number: 65, - title: "Local upstream PR", - url: "https://github.com/pingdotgg/codething-mvp/pull/65", - baseRefName: "main", - headRefName: "feature/pr-local-upstream", - state: "open", - isCrossRepository: false, - headRepositoryNameWithOwner: "pingdotgg/codething-mvp", - headRepositoryOwnerLogin: "pingdotgg", - }, - repositoryCloneUrls: { - "pingdotgg/codething-mvp": { - url: remoteDir, - sshUrl: remoteDir, - }, - }, - }, - }); - - const result = yield* preparePullRequestThread(manager, { - cwd: repoDir, - reference: "65", - mode: "local", - }); - - expect(result.worktreePath).toBeNull(); - expect(result.branch).toBe("feature/pr-local-upstream"); - expect( - (yield* runGit(repoDir, ["rev-parse", "--abbrev-ref", "@{upstream}"])).stdout.trim(), - ).toBe("origin/feature/pr-local-upstream"); - }), - ); - - it.effect( - "restores same-repository upstream tracking when provider omits head repository metadata", - () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - const remoteDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "origin", remoteDir]); - yield* runGit(repoDir, ["push", "-u", "origin", "main"]); - yield* runGit(repoDir, ["checkout", "-b", "feature/pr-local-no-head-repo"]); - NodeFS.writeFileSync(NodePath.join(repoDir, "no-head-repo.txt"), "upstream\n"); - yield* runGit(repoDir, ["add", "no-head-repo.txt"]); - yield* runGit(repoDir, ["commit", "-m", "Local PR branch without repo metadata"]); - yield* runGit(repoDir, ["push", "-u", "origin", "feature/pr-local-no-head-repo"]); - yield* runGit(repoDir, ["checkout", "main"]); - yield* runGit(repoDir, ["branch", "-D", "feature/pr-local-no-head-repo"]); - yield* runGit(repoDir, [ - "update-ref", - "-d", - "refs/remotes/origin/feature/pr-local-no-head-repo", - ]); - - const { manager } = yield* makeManager({ - ghScenario: { - pullRequest: { - number: 66, - title: "Local upstream PR without repo metadata", - url: "https://github.com/pingdotgg/codething-mvp/pull/66", - baseRefName: "main", - headRefName: "feature/pr-local-no-head-repo", - state: "open", - }, - }, - }); - - const result = yield* preparePullRequestThread(manager, { - cwd: repoDir, - reference: "66", - mode: "local", - }); - - expect(result.worktreePath).toBeNull(); - expect(result.branch).toBe("feature/pr-local-no-head-repo"); - expect( - (yield* runGit(repoDir, ["rev-parse", "--abbrev-ref", "@{upstream}"])).stdout.trim(), - ).toBe("origin/feature/pr-local-no-head-repo"); - }), - ); - - it.effect("prepares pull request threads in worktree mode on the PR head branch", () => + effect("prepares pull request threads in worktree mode on the PR head branch", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3510,7 +3010,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("preserves fork upstream tracking when preparing a local PR thread", () => + effect("preserves fork upstream tracking when preparing a local PR thread", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3563,7 +3063,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("derives fork repository identity from PR URL when GitHub omits nameWithOwner", () => + effect("derives fork repository identity from PR URL when GitHub omits nameWithOwner", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -3620,7 +3120,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("reuses an existing dedicated worktree for the PR head branch", () => + effect("reuses an existing dedicated worktree for the PR head branch", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -4213,7 +3713,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect( + effect( "does not block fork PR worktree prep when the fork head branch collides with root main", () => Effect.gen(function* () { @@ -4273,67 +3773,65 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect( - "does not overwrite an existing local main branch when preparing a fork PR worktree", - () => - Effect.gen(function* () { - const repoDir = yield* makeTempDir("t3code-git-manager-"); - yield* initRepo(repoDir); - const originDir = yield* createBareRemote(); - const forkDir = yield* createBareRemote(); - yield* runGit(repoDir, ["remote", "add", "origin", originDir]); - yield* runGit(repoDir, ["push", "-u", "origin", "main"]); - yield* runGit(repoDir, ["remote", "add", "fork-seed", forkDir]); - yield* runGit(repoDir, ["checkout", "-b", "fork-main-source"]); - NodeFS.writeFileSync(NodePath.join(repoDir, "fork-main-second.txt"), "fork main second\n"); - yield* runGit(repoDir, ["add", "fork-main-second.txt"]); - yield* runGit(repoDir, ["commit", "-m", "Fork main second branch"]); - yield* runGit(repoDir, ["push", "-u", "fork-seed", "fork-main-source:main"]); - yield* runGit(repoDir, ["checkout", "main"]); - const localMainBefore = (yield* runGit(repoDir, ["rev-parse", "main"])).stdout.trim(); - yield* runGit(repoDir, ["checkout", "-b", "feature/root-branch"]); + effect("does not overwrite an existing local main branch when preparing a fork PR worktree", () => + Effect.gen(function* () { + const repoDir = yield* makeTempDir("t3code-git-manager-"); + yield* initRepo(repoDir); + const originDir = yield* createBareRemote(); + const forkDir = yield* createBareRemote(); + yield* runGit(repoDir, ["remote", "add", "origin", originDir]); + yield* runGit(repoDir, ["push", "-u", "origin", "main"]); + yield* runGit(repoDir, ["remote", "add", "fork-seed", forkDir]); + yield* runGit(repoDir, ["checkout", "-b", "fork-main-source"]); + fs.writeFileSync(path.join(repoDir, "fork-main-second.txt"), "fork main second\n"); + yield* runGit(repoDir, ["add", "fork-main-second.txt"]); + yield* runGit(repoDir, ["commit", "-m", "Fork main second branch"]); + yield* runGit(repoDir, ["push", "-u", "fork-seed", "fork-main-source:main"]); + yield* runGit(repoDir, ["checkout", "main"]); + const localMainBefore = (yield* runGit(repoDir, ["rev-parse", "main"])).stdout.trim(); + yield* runGit(repoDir, ["checkout", "-b", "feature/root-branch"]); - const { manager } = yield* makeManager({ - ghScenario: { - pullRequest: { - number: 92, - title: "Fork main overwrite PR", - url: "https://github.com/pingdotgg/codething-mvp/pull/92", - baseRefName: "main", - headRefName: "main", - state: "open", - isCrossRepository: true, - headRepositoryNameWithOwner: "octocat/codething-mvp", - headRepositoryOwnerLogin: "octocat", - }, - repositoryCloneUrls: { - "octocat/codething-mvp": { - url: forkDir, - sshUrl: forkDir, - }, + const { manager } = yield* makeManager({ + ghScenario: { + pullRequest: { + number: 92, + title: "Fork main overwrite PR", + url: "https://github.com/pingdotgg/codething-mvp/pull/92", + baseRefName: "main", + headRefName: "main", + state: "open", + isCrossRepository: true, + headRepositoryNameWithOwner: "octocat/codething-mvp", + headRepositoryOwnerLogin: "octocat", + }, + repositoryCloneUrls: { + "octocat/codething-mvp": { + url: forkDir, + sshUrl: forkDir, }, }, - }); + }, + }); - const result = yield* preparePullRequestThread(manager, { - cwd: repoDir, - reference: "92", - mode: "worktree", - }); + const result = yield* preparePullRequestThread(manager, { + cwd: repoDir, + reference: "92", + mode: "worktree", + }); - expect(result.branch).toBe("t3code/pr-92/main"); - expect((yield* runGit(repoDir, ["rev-parse", "main"])).stdout.trim()).toBe(localMainBefore); - expect( - (yield* runGit(result.worktreePath as string, [ - "rev-parse", - "--abbrev-ref", - "@{upstream}", - ])).stdout.trim(), - ).toBe("fork-seed/main"); - }), + expect(result.branch).toBe("t3code/pr-92/main"); + expect((yield* runGit(repoDir, ["rev-parse", "main"])).stdout.trim()).toBe(localMainBefore); + expect( + (yield* runGit(result.worktreePath as string, [ + "rev-parse", + "--abbrev-ref", + "@{upstream}", + ])).stdout.trim(), + ).toBe("fork-seed/main"); + }), ); - it.effect("reuses an existing PR worktree and restores fork upstream tracking", () => + effect("reuses an existing PR worktree and restores fork upstream tracking", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -4477,7 +3975,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("emits ordered progress events for commit hooks", () => + effect("emits ordered progress events for commit hooks", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); @@ -4540,7 +4038,7 @@ it.layer(GitManagerTestLayer)("GitManager", (it) => { }), ); - it.effect("emits action_failed when a commit hook rejects", () => + effect("emits action_failed when a commit hook rejects", () => Effect.gen(function* () { const repoDir = yield* makeTempDir("t3code-git-manager-"); yield* initRepo(repoDir); diff --git a/apps/server/src/git/Layers/CodexTextGeneration.ts b/apps/server/src/git/Layers/CodexTextGeneration.ts new file mode 100644 index 0000000000..6718f34e31 --- /dev/null +++ b/apps/server/src/git/Layers/CodexTextGeneration.ts @@ -0,0 +1,417 @@ +import { randomUUID } from "node:crypto"; + +import { Effect, FileSystem, Layer, Option, Path, Schema, Scope, Stream } from "effect"; +import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; + +import { CodexModelSelection } from "@t3tools/contracts"; +import { sanitizeBranchFragment, sanitizeFeatureBranchName } from "@t3tools/shared/git"; + +import { resolveAttachmentPath } from "../../attachmentStore.ts"; +import { ServerConfig } from "../../config.ts"; +import { TextGenerationError } from "@t3tools/contracts"; +import { + type BranchNameGenerationInput, + type ThreadTitleGenerationResult, + type TextGenerationShape, + TextGeneration, +} from "../Services/TextGeneration.ts"; +import { + buildBranchNamePrompt, + buildCommitMessagePrompt, + buildPrContentPrompt, + buildThreadTitlePrompt, +} from "../Prompts.ts"; +import { + normalizeCliError, + sanitizeCommitSubject, + sanitizePrTitle, + sanitizeThreadTitle, + toJsonSchemaObject, +} from "../Utils.ts"; +import { getCodexModelCapabilities } from "../../provider/codexModels.ts"; +import { ServerSettingsService } from "../../serverSettings.ts"; +import { normalizeCodexModelOptionsWithCapabilities } from "@t3tools/shared/model"; + +const CODEX_GIT_TEXT_GENERATION_REASONING_EFFORT = "low"; +const CODEX_TIMEOUT_MS = 180_000; +const makeCodexTextGeneration = Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const commandSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; + const serverConfig = yield* Effect.service(ServerConfig); + const serverSettingsService = yield* Effect.service(ServerSettingsService); + + type MaterializedImageAttachments = { + readonly imagePaths: ReadonlyArray; + }; + + const readStreamAsString = ( + operation: string, + stream: Stream.Stream, + ): Effect.Effect => + stream.pipe( + Stream.decodeText(), + Stream.runFold( + () => "", + (acc, chunk) => acc + chunk, + ), + Effect.mapError((cause) => + normalizeCliError("codex", operation, cause, "Failed to collect process output"), + ), + ); + + const writeTempFile = ( + operation: string, + prefix: string, + content: string, + ): Effect.Effect => { + return fileSystem + .makeTempFileScoped({ + prefix: `t3code-${prefix}-${process.pid}-${randomUUID()}.tmp`, + }) + .pipe( + Effect.tap((filePath) => fileSystem.writeFileString(filePath, content)), + Effect.mapError( + (cause) => + new TextGenerationError({ + operation, + detail: `Failed to write temp file`, + cause, + }), + ), + ); + }; + + const safeUnlink = (filePath: string): Effect.Effect => + fileSystem.remove(filePath).pipe(Effect.catch(() => Effect.void)); + + const materializeImageAttachments = Effect.fn("materializeImageAttachments")(function* ( + _operation: + | "generateCommitMessage" + | "generatePrContent" + | "generateBranchName" + | "generateThreadTitle", + attachments: BranchNameGenerationInput["attachments"], + ): Effect.fn.Return { + if (!attachments || attachments.length === 0) { + return { imagePaths: [] }; + } + + const imagePaths: string[] = []; + for (const attachment of attachments) { + if (attachment.type !== "image") { + continue; + } + + const resolvedPath = resolveAttachmentPath({ + attachmentsDir: serverConfig.attachmentsDir, + attachment, + }); + if (!resolvedPath || !path.isAbsolute(resolvedPath)) { + continue; + } + const fileInfo = yield* fileSystem + .stat(resolvedPath) + .pipe(Effect.catch(() => Effect.succeed(null))); + if (!fileInfo || fileInfo.type !== "File") { + continue; + } + imagePaths.push(resolvedPath); + } + return { imagePaths }; + }); + + const runCodexJson = Effect.fn("runCodexJson")(function* ({ + operation, + cwd, + prompt, + outputSchemaJson, + imagePaths = [], + cleanupPaths = [], + modelSelection, + }: { + operation: + | "generateCommitMessage" + | "generatePrContent" + | "generateBranchName" + | "generateThreadTitle"; + cwd: string; + prompt: string; + outputSchemaJson: S; + imagePaths?: ReadonlyArray; + cleanupPaths?: ReadonlyArray; + modelSelection: CodexModelSelection; + }): Effect.fn.Return { + const schemaPath = yield* writeTempFile( + operation, + "codex-schema", + JSON.stringify(toJsonSchemaObject(outputSchemaJson)), + ); + const outputPath = yield* writeTempFile(operation, "codex-output", ""); + + const codexSettings = yield* Effect.map( + serverSettingsService.getSettings, + (settings) => settings.providers.codex, + ).pipe(Effect.catch(() => Effect.undefined)); + + const runCodexCommand = Effect.fn("runCodexJson.runCodexCommand")(function* () { + const normalizedOptions = normalizeCodexModelOptionsWithCapabilities( + getCodexModelCapabilities(modelSelection.model), + modelSelection.options, + ); + const reasoningEffort = + modelSelection.options?.reasoningEffort ?? CODEX_GIT_TEXT_GENERATION_REASONING_EFFORT; + const command = ChildProcess.make( + codexSettings?.binaryPath || "codex", + [ + "exec", + "--ephemeral", + "--skip-git-repo-check", + "-s", + "read-only", + "--model", + modelSelection.model, + "--config", + `model_reasoning_effort="${reasoningEffort}"`, + ...(normalizedOptions?.fastMode ? ["--config", `service_tier="fast"`] : []), + "--output-schema", + schemaPath, + "--output-last-message", + outputPath, + ...imagePaths.flatMap((imagePath) => ["--image", imagePath]), + "-", + ], + { + env: { + ...process.env, + ...(codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {}), + }, + cwd, + shell: process.platform === "win32", + stdin: { + stream: Stream.encodeText(Stream.make(prompt)), + }, + }, + ); + + const child = yield* commandSpawner + .spawn(command) + .pipe( + Effect.mapError((cause) => + normalizeCliError("codex", operation, cause, "Failed to spawn Codex CLI process"), + ), + ); + + const [stdout, stderr, exitCode] = yield* Effect.all( + [ + readStreamAsString(operation, child.stdout), + readStreamAsString(operation, child.stderr), + child.exitCode.pipe( + Effect.mapError((cause) => + normalizeCliError("codex", operation, cause, "Failed to read Codex CLI exit code"), + ), + ), + ], + { concurrency: "unbounded" }, + ); + + if (exitCode !== 0) { + const stderrDetail = stderr.trim(); + const stdoutDetail = stdout.trim(); + const detail = stderrDetail.length > 0 ? stderrDetail : stdoutDetail; + return yield* new TextGenerationError({ + operation, + detail: + detail.length > 0 + ? `Codex CLI command failed: ${detail}` + : `Codex CLI command failed with code ${exitCode}.`, + }); + } + }); + + const cleanup = Effect.all( + [schemaPath, outputPath, ...cleanupPaths].map((filePath) => safeUnlink(filePath)), + { + concurrency: "unbounded", + }, + ).pipe(Effect.asVoid); + + return yield* Effect.gen(function* () { + yield* runCodexCommand().pipe( + Effect.scoped, + Effect.timeoutOption(CODEX_TIMEOUT_MS), + Effect.flatMap( + Option.match({ + onNone: () => + Effect.fail( + new TextGenerationError({ operation, detail: "Codex CLI request timed out." }), + ), + onSome: () => Effect.void, + }), + ), + ); + + return yield* fileSystem.readFileString(outputPath).pipe( + Effect.mapError( + (cause) => + new TextGenerationError({ + operation, + detail: "Failed to read Codex output file.", + cause, + }), + ), + Effect.flatMap(Schema.decodeEffect(Schema.fromJsonString(outputSchemaJson))), + Effect.catchTag("SchemaError", (cause) => + Effect.fail( + new TextGenerationError({ + operation, + detail: "Codex returned invalid structured output.", + cause, + }), + ), + ), + ); + }).pipe(Effect.ensuring(cleanup)); + }); + + const generateCommitMessage: TextGenerationShape["generateCommitMessage"] = Effect.fn( + "CodexTextGeneration.generateCommitMessage", + )(function* (input) { + const { prompt, outputSchema } = buildCommitMessagePrompt({ + branch: input.branch, + stagedSummary: input.stagedSummary, + stagedPatch: input.stagedPatch, + includeBranch: input.includeBranch === true, + }); + + if (input.modelSelection.provider !== "codex") { + return yield* new TextGenerationError({ + operation: "generateCommitMessage", + detail: "Invalid model selection.", + }); + } + + const generated = yield* runCodexJson({ + operation: "generateCommitMessage", + cwd: input.cwd, + prompt, + outputSchemaJson: outputSchema, + modelSelection: input.modelSelection, + }); + + return { + subject: sanitizeCommitSubject(generated.subject), + body: generated.body.trim(), + ...("branch" in generated && typeof generated.branch === "string" + ? { branch: sanitizeFeatureBranchName(generated.branch) } + : {}), + }; + }); + + const generatePrContent: TextGenerationShape["generatePrContent"] = Effect.fn( + "CodexTextGeneration.generatePrContent", + )(function* (input) { + const { prompt, outputSchema } = buildPrContentPrompt({ + baseBranch: input.baseBranch, + headBranch: input.headBranch, + commitSummary: input.commitSummary, + diffSummary: input.diffSummary, + diffPatch: input.diffPatch, + }); + + if (input.modelSelection.provider !== "codex") { + return yield* new TextGenerationError({ + operation: "generatePrContent", + detail: "Invalid model selection.", + }); + } + + const generated = yield* runCodexJson({ + operation: "generatePrContent", + cwd: input.cwd, + prompt, + outputSchemaJson: outputSchema, + modelSelection: input.modelSelection, + }); + + return { + title: sanitizePrTitle(generated.title), + body: generated.body.trim(), + }; + }); + + const generateBranchName: TextGenerationShape["generateBranchName"] = Effect.fn( + "CodexTextGeneration.generateBranchName", + )(function* (input) { + const { imagePaths } = yield* materializeImageAttachments( + "generateBranchName", + input.attachments, + ); + const { prompt, outputSchema } = buildBranchNamePrompt({ + message: input.message, + attachments: input.attachments, + }); + + if (input.modelSelection.provider !== "codex") { + return yield* new TextGenerationError({ + operation: "generateBranchName", + detail: "Invalid model selection.", + }); + } + + const generated = yield* runCodexJson({ + operation: "generateBranchName", + cwd: input.cwd, + prompt, + outputSchemaJson: outputSchema, + imagePaths, + modelSelection: input.modelSelection, + }); + + return { + branch: sanitizeBranchFragment(generated.branch), + }; + }); + + const generateThreadTitle: TextGenerationShape["generateThreadTitle"] = Effect.fn( + "CodexTextGeneration.generateThreadTitle", + )(function* (input) { + const { imagePaths } = yield* materializeImageAttachments( + "generateThreadTitle", + input.attachments, + ); + const { prompt, outputSchema } = buildThreadTitlePrompt({ + message: input.message, + attachments: input.attachments, + }); + + if (input.modelSelection.provider !== "codex") { + return yield* new TextGenerationError({ + operation: "generateThreadTitle", + detail: "Invalid model selection.", + }); + } + + const generated = yield* runCodexJson({ + operation: "generateThreadTitle", + cwd: input.cwd, + prompt, + outputSchemaJson: outputSchema, + imagePaths, + modelSelection: input.modelSelection, + }); + + return { + title: sanitizeThreadTitle(generated.title), + } satisfies ThreadTitleGenerationResult; + }); + + return { + generateCommitMessage, + generatePrContent, + generateBranchName, + generateThreadTitle, + } satisfies TextGenerationShape; +}); + +export const CodexTextGenerationLive = Layer.effect(TextGeneration, makeCodexTextGeneration); diff --git a/apps/server/src/git/Layers/CursorTextGeneration.test.ts b/apps/server/src/git/Layers/CursorTextGeneration.test.ts new file mode 100644 index 0000000000..2c010a93ff --- /dev/null +++ b/apps/server/src/git/Layers/CursorTextGeneration.test.ts @@ -0,0 +1,253 @@ +import * as path from "node:path"; +import * as os from "node:os"; +import { fileURLToPath } from "node:url"; +import { chmodSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; + +import * as NodeServices from "@effect/platform-node/NodeServices"; +import { it } from "@effect/vitest"; +import { Effect, Layer } from "effect"; +import { expect } from "vitest"; + +import { ServerSettingsError } from "@t3tools/contracts"; + +import { ServerConfig } from "../../config.ts"; +import { TextGeneration } from "../Services/TextGeneration.ts"; +import { CursorTextGenerationLive } from "./CursorTextGeneration.ts"; +import { ServerSettingsService } from "../../serverSettings.ts"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const mockAgentPath = path.join(__dirname, "../../../scripts/acp-mock-agent.ts"); + +function shellSingleQuote(value: string): string { + return `'${value.replaceAll("'", `'"'"'`)}'`; +} + +const CursorTextGenerationTestLayer = CursorTextGenerationLive.pipe( + Layer.provideMerge(ServerSettingsService.layerTest()), + Layer.provideMerge( + ServerConfig.layerTest(process.cwd(), { + prefix: "t3code-cursor-text-generation-test-", + }), + ), + Layer.provideMerge(NodeServices.layer), +); + +function makeAcpAgentWrapper(dir: string, env: Record): string { + const binDir = path.join(dir, "bin"); + const agentPath = path.join(binDir, "agent"); + mkdirSync(binDir, { recursive: true }); + writeFileSync( + agentPath, + [ + "#!/bin/sh", + ...Object.entries(env).map(([key, value]) => `export ${key}=${shellSingleQuote(value)}`), + 'if [ "$1" != "acp" ]; then', + ' printf "%s\\n" "unexpected args: $*" >&2', + " exit 11", + "fi", + `exec bun ${JSON.stringify(mockAgentPath)}`, + "", + ].join("\n"), + "utf8", + ); + chmodSync(agentPath, 0o755); + return agentPath; +} + +function withFakeAcpAgent( + env: Record, + effect: Effect.Effect, +): Effect.Effect { + return Effect.gen(function* () { + const tempDir = mkdtempSync(path.join(os.tmpdir(), "t3code-cursor-text-acp-")); + const agentPath = makeAcpAgentWrapper(tempDir, env); + const serverSettings = yield* ServerSettingsService; + const previousSettings = yield* serverSettings.getSettings; + + yield* serverSettings.updateSettings({ + providers: { + cursor: { + binaryPath: agentPath, + }, + }, + }); + + return yield* effect.pipe( + Effect.ensuring( + serverSettings + .updateSettings({ + providers: { + cursor: { + binaryPath: previousSettings.providers.cursor.binaryPath, + }, + }, + }) + .pipe( + Effect.catch(() => Effect.void), + Effect.ensuring( + Effect.sync(() => { + rmSync(tempDir, { recursive: true, force: true }); + }), + ), + Effect.asVoid, + ), + ), + ); + }); +} + +it.layer(CursorTextGenerationTestLayer)("CursorTextGenerationLive", (it) => { + it.effect("uses ACP model config options instead of raw CLI model ids", () => { + const requestLogDir = mkdtempSync(path.join(os.tmpdir(), "t3code-cursor-text-log-")); + const requestLogPath = path.join(requestLogDir, "requests.ndjson"); + + return withFakeAcpAgent( + { + T3_ACP_REQUEST_LOG_PATH: requestLogPath, + T3_ACP_PROMPT_RESPONSE_TEXT: JSON.stringify({ + subject: "Add generated commit message", + body: "- verify cursor acp model config path", + }), + }, + Effect.gen(function* () { + const textGeneration = yield* TextGeneration; + + const generated = yield* textGeneration.generateCommitMessage({ + cwd: process.cwd(), + branch: "feature/cursor-text-generation", + stagedSummary: "M apps/server/src/git/Layers/CursorTextGeneration.ts", + stagedPatch: + "diff --git a/apps/server/src/git/Layers/CursorTextGeneration.ts b/apps/server/src/git/Layers/CursorTextGeneration.ts", + modelSelection: { + provider: "cursor", + model: "gpt-5.4", + options: { + reasoning: "xhigh", + fastMode: true, + contextWindow: "1m", + }, + }, + }); + + expect(generated.subject).toBe("Add generated commit message"); + expect(generated.body).toBe("- verify cursor acp model config path"); + + const requests = readFileSync(requestLogPath, "utf8") + .trim() + .split("\n") + .filter((line) => line.length > 0) + .map((line) => JSON.parse(line) as { method?: string; params?: Record }); + + expect( + requests.find((request) => request.method === "initialize")?.params?.clientCapabilities, + ).toMatchObject({ + _meta: { + parameterizedModelPicker: true, + }, + }); + expect( + requests.some( + (request) => + request.method === "session/set_config_option" && + request.params?.configId === "mode" && + request.params?.value === "ask", + ), + ).toBe(true); + expect( + requests.some( + (request) => + request.method === "session/set_config_option" && + request.params?.configId === "model" && + request.params?.value === "gpt-5.4", + ), + ).toBe(true); + expect( + requests.some( + (request) => + request.method === "session/set_config_option" && + request.params?.configId === "reasoning" && + request.params?.value === "extra-high", + ), + ).toBe(true); + expect( + requests.some( + (request) => + request.method === "session/set_config_option" && + request.params?.configId === "context" && + request.params?.value === "1m", + ), + ).toBe(true); + expect( + requests.some( + (request) => + request.method === "session/set_config_option" && + request.params?.configId === "fast" && + request.params?.value === "true", + ), + ).toBe(true); + expect( + requests.find((request) => request.method === "session/prompt")?.params?.prompt, + ).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + type: "text", + text: expect.stringContaining("Staged patch:"), + }), + ]), + ); + + rmSync(requestLogDir, { recursive: true, force: true }); + }), + ); + }); + + it.effect("accepts json objects with extra assistant text around them", () => + withFakeAcpAgent( + { + T3_ACP_PROMPT_RESPONSE_TEXT: + 'Sure, here is the JSON:\n```json\n{\n "subject": "Update README dummy comment with attribution and date",\n "body": ""\n}\n```\nDone.', + }, + Effect.gen(function* () { + const textGeneration = yield* TextGeneration; + + const generated = yield* textGeneration.generateCommitMessage({ + cwd: process.cwd(), + branch: "feature/cursor-noisy-json", + stagedSummary: "M README.md", + stagedPatch: "diff --git a/README.md b/README.md", + modelSelection: { + provider: "cursor", + model: "composer-2", + }, + }); + + expect(generated.subject).toBe("Update README dummy comment with attribution and date"); + expect(generated.body).toBe(""); + }), + ), + ); + + it.effect("generates thread titles through Cursor ACP text generation", () => + withFakeAcpAgent( + { + T3_ACP_PROMPT_RESPONSE_TEXT: JSON.stringify({ + title: '"Trim reconnect spinner status after resume."', + }), + }, + Effect.gen(function* () { + const textGeneration = yield* TextGeneration; + + const generated = yield* textGeneration.generateThreadTitle({ + cwd: process.cwd(), + message: "Fix the reconnect spinner after a resumed session.", + modelSelection: { + provider: "cursor", + model: "composer-2", + }, + }); + + expect(generated.title).toBe("Trim reconnect spinner status after resume."); + }), + ), + ); +}); diff --git a/apps/server/src/git/Layers/GitCore.test.ts b/apps/server/src/git/Layers/GitCore.test.ts new file mode 100644 index 0000000000..020b7de183 --- /dev/null +++ b/apps/server/src/git/Layers/GitCore.test.ts @@ -0,0 +1,2326 @@ +import { existsSync } from "node:fs"; +import path from "node:path"; + +import * as NodeServices from "@effect/platform-node/NodeServices"; +import { it } from "@effect/vitest"; +import { Effect, FileSystem, Layer, PlatformError, Scope } from "effect"; +import { describe, expect, vi } from "vitest"; + +import { GitCoreLive, makeGitCore } from "./GitCore.ts"; +import { GitCore, type GitCoreShape } from "../Services/GitCore.ts"; +import { GitCommandError } from "@t3tools/contracts"; +import { type ProcessRunResult, runProcess } from "../../processRunner.ts"; +import { ServerConfig } from "../../config.ts"; + +// ── Helpers ── + +const ServerConfigLayer = ServerConfig.layerTest(process.cwd(), { prefix: "t3-git-core-test-" }); +const GitCoreTestLayer = GitCoreLive.pipe( + Layer.provide(ServerConfigLayer), + Layer.provide(NodeServices.layer), +); +const TestLayer = Layer.mergeAll(NodeServices.layer, GitCoreTestLayer); + +function makeTmpDir( + prefix = "git-test-", +): Effect.Effect { + return Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + return yield* fileSystem.makeTempDirectoryScoped({ prefix }); + }); +} + +function writeTextFile( + filePath: string, + contents: string, +): Effect.Effect { + return Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + yield* fileSystem.writeFileString(filePath, contents); + }); +} + +function removePath( + targetPath: string, +): Effect.Effect { + return Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + yield* fileSystem.remove(targetPath, { recursive: true, force: true }); + }); +} + +function makeDirectory( + dirPath: string, +): Effect.Effect { + return Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + yield* fileSystem.makeDirectory(dirPath, { recursive: true }); + }); +} + +/** Run a raw git command for test setup (not under test). */ +function git( + cwd: string, + args: ReadonlyArray, + env?: NodeJS.ProcessEnv, +): Effect.Effect { + return Effect.gen(function* () { + const gitCore = yield* GitCore; + const result = yield* gitCore.execute({ + operation: "GitCore.test.git", + cwd, + args, + ...(env ? { env } : {}), + timeoutMs: 10_000, + }); + return result.stdout.trim(); + }); +} + +function configureRemote( + cwd: string, + remoteName: string, + remotePath: string, + fetchNamespace: string, +): Effect.Effect { + return Effect.gen(function* () { + yield* git(cwd, ["config", `remote.${remoteName}.url`, remotePath]); + return yield* git(cwd, [ + "config", + "--replace-all", + `remote.${remoteName}.fetch`, + `+refs/heads/*:refs/remotes/${fetchNamespace}/*`, + ]); + }); +} + +function runShellCommand(input: { + command: string; + cwd: string; + timeoutMs?: number; + maxOutputBytes?: number; +}): Effect.Effect { + return Effect.promise(() => { + const shellPath = + process.platform === "win32" + ? (process.env.ComSpec ?? "cmd.exe") + : (process.env.SHELL ?? "/bin/sh"); + + const args = + process.platform === "win32" ? ["/d", "/s", "/c", input.command] : ["-lc", input.command]; + + return runProcess(shellPath, args, { + cwd: input.cwd, + timeoutMs: input.timeoutMs ?? 30_000, + allowNonZeroExit: true, + maxBufferBytes: input.maxOutputBytes ?? 1_000_000, + outputMode: "truncate", + }); + }); +} + +const makeIsolatedGitCore = (executeOverride: GitCoreShape["execute"]) => + makeGitCore({ executeOverride }).pipe( + Effect.provide(Layer.provideMerge(ServerConfigLayer, NodeServices.layer)), + ); + +/** Create a repo with an initial commit so branches work. */ +function initRepoWithCommit( + cwd: string, +): Effect.Effect< + { initialBranch: string }, + GitCommandError | PlatformError.PlatformError, + GitCore | FileSystem.FileSystem +> { + return Effect.gen(function* () { + const core = yield* GitCore; + yield* core.initRepo({ cwd }); + yield* git(cwd, ["config", "user.email", "test@test.com"]); + yield* git(cwd, ["config", "user.name", "Test"]); + yield* writeTextFile(path.join(cwd, "README.md"), "# test\n"); + yield* git(cwd, ["add", "."]); + yield* git(cwd, ["commit", "-m", "initial commit"]); + const initialBranch = yield* git(cwd, ["branch", "--show-current"]); + return { initialBranch }; + }); +} + +function commitWithDate( + cwd: string, + fileName: string, + fileContents: string, + dateIsoString: string, + message: string, +): Effect.Effect< + void, + GitCommandError | PlatformError.PlatformError, + GitCore | FileSystem.FileSystem +> { + return Effect.gen(function* () { + yield* writeTextFile(path.join(cwd, fileName), fileContents); + yield* git(cwd, ["add", fileName]); + yield* git(cwd, ["commit", "-m", message], { + ...process.env, + GIT_AUTHOR_DATE: dateIsoString, + GIT_COMMITTER_DATE: dateIsoString, + }); + }); +} + +function buildLargeText(lineCount = 20_000): string { + return Array.from({ length: lineCount }, (_, index) => `line ${String(index).padStart(5, "0")}`) + .join("\n") + .concat("\n"); +} + +function splitNullSeparatedPaths(input: string): string[] { + return input + .split("\0") + .map((value) => value.trim()) + .filter((value) => value.length > 0); +} + +// ── Tests ── + +it.layer(TestLayer)("git integration", (it) => { + const LONG_EFFECT_TEST_TIMEOUT_MS = 30_000; + const ASYNC_GIT_WAIT_TIMEOUT_MS = 30_000; + const effect = ( + name: string, + test: Parameters[1], + timeout = LONG_EFFECT_TEST_TIMEOUT_MS, + ) => it.effect(name, test, timeout); + + describe("shell process execution", () => { + effect("caps captured output when maxOutputBytes is exceeded", () => + Effect.gen(function* () { + const result = yield* runShellCommand({ + command: `node -e "process.stdout.write('x'.repeat(2000))"`, + cwd: process.cwd(), + timeoutMs: 10_000, + maxOutputBytes: 128, + }); + + expect(result.code).toBe(0); + expect(result.stdout.length).toBeLessThanOrEqual(128); + expect(result.stdoutTruncated || result.stderrTruncated).toBe(true); + }), + ); + }); + + // ── initGitRepo ── + + describe("initGitRepo", () => { + effect("creates a valid git repo", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* (yield* GitCore).initRepo({ cwd: tmp }); + expect(existsSync(path.join(tmp, ".git"))).toBe(true); + }), + ); + + effect("listGitBranches reports isRepo: true after init + commit", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.isRepo).toBe(true); + expect(result.hasOriginRemote).toBe(false); + expect(result.branches.length).toBeGreaterThanOrEqual(1); + }), + ); + }); + + describe("workspace helpers", () => { + it.effect("filterIgnoredPaths chunks large path lists and preserves kept paths", () => + Effect.gen(function* () { + const cwd = "/virtual/repo"; + const relativePaths = Array.from({ length: 340 }, (_, index) => { + const prefix = index % 3 === 0 ? "ignored" : "kept"; + return `${prefix}/segment-${String(index).padStart(4, "0")}/${"x".repeat(900)}.ts`; + }); + const expectedPaths = relativePaths.filter( + (relativePath) => !relativePath.startsWith("ignored/"), + ); + + const seenChunks: string[][] = []; + const core = yield* makeIsolatedGitCore((input) => { + if ( + input.args.join(" ") !== + "-c core.fsmonitor=false -c core.untrackedCache=false check-ignore --no-index -z --stdin" + ) { + return Effect.fail( + new GitCommandError({ + operation: input.operation, + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "unexpected git command in chunking test", + }), + ); + } + + const chunkPaths = splitNullSeparatedPaths(input.stdin ?? ""); + seenChunks.push(chunkPaths); + const ignoredPaths = chunkPaths.filter((relativePath) => + relativePath.startsWith("ignored/"), + ); + + return Effect.succeed({ + code: ignoredPaths.length > 0 ? 0 : 1, + stdout: ignoredPaths.length > 0 ? `${ignoredPaths.join("\0")}\0` : "", + stderr: "", + stdoutTruncated: false, + stderrTruncated: false, + }); + }); + + const result = yield* core.filterIgnoredPaths(cwd, relativePaths); + + expect(seenChunks.length).toBeGreaterThan(1); + expect(seenChunks.flat()).toEqual(relativePaths); + expect(result).toEqual(expectedPaths); + }), + ); + + it.effect("listWorkspaceFiles disables fsmonitor and untracked cache helpers", () => + Effect.gen(function* () { + const core = yield* makeIsolatedGitCore((input) => { + expect(input.args).toEqual([ + "-c", + "core.fsmonitor=false", + "-c", + "core.untrackedCache=false", + "ls-files", + "--cached", + "--others", + "--exclude-standard", + "-z", + ]); + return Effect.succeed({ + code: 0, + stdout: "src/index.ts\0README.md\0", + stderr: "", + stdoutTruncated: false, + stderrTruncated: false, + }); + }); + + const result = yield* core.listWorkspaceFiles("/virtual/repo"); + expect(result.paths).toEqual(["src/index.ts", "README.md"]); + expect(result.truncated).toBe(false); + }), + ); + }); + + // ── listGitBranches ── + + describe("listGitBranches", () => { + effect("returns isRepo: false for non-git directory", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.isRepo).toBe(false); + expect(result.hasOriginRemote).toBe(false); + expect(result.branches).toEqual([]); + }), + ); + + effect("returns isRepo: false for deleted directories", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const deletedDir = path.join(tmp, "deleted-repo"); + yield* makeDirectory(deletedDir); + yield* removePath(deletedDir); + + const result = yield* (yield* GitCore).listBranches({ cwd: deletedDir }); + + expect(result.isRepo).toBe(false); + expect(result.hasOriginRemote).toBe(false); + expect(result.branches).toEqual([]); + }), + ); + + effect("returns the current branch with current: true", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const current = result.branches.find((b) => b.current); + expect(current).toBeDefined(); + expect(current!.current).toBe(true); + }), + ); + + effect("does not include detached HEAD pseudo-refs as branches", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* git(tmp, ["checkout", "--detach", "HEAD"]); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.branches.some((branch) => branch.name.startsWith("("))).toBe(false); + expect(result.branches.some((branch) => branch.current)).toBe(false); + }), + ); + + effect("keeps current branch first and sorts the remaining branches by recency", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const initialBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (branch) => branch.current, + )!.name; + + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "older-branch" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "older-branch" }); + yield* commitWithDate( + tmp, + "older.txt", + "older branch change\n", + "Thu, 1 Jan 2037 00:00:00 +0000", + "older branch change", + ); + + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: initialBranch }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "newer-branch" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "newer-branch" }); + yield* commitWithDate( + tmp, + "newer.txt", + "newer branch change\n", + "Fri, 1 Jan 2038 00:00:00 +0000", + "newer branch change", + ); + + // Switch away to show current branch is pinned, then remaining branches are recency-sorted. + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "older-branch" }); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.branches[0]!.name).toBe("older-branch"); + expect(result.branches[1]!.name).toBe("newer-branch"); + }), + ); + + effect("keeps default branch right after current branch", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (branch) => branch.current, + )!.name; + + yield* git(remote, ["init", "--bare"]); + yield* git(tmp, ["remote", "add", "origin", remote]); + yield* git(tmp, ["push", "-u", "origin", defaultBranch]); + yield* git(tmp, ["remote", "set-head", "origin", defaultBranch]); + + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "current-branch" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "current-branch" }); + yield* commitWithDate( + tmp, + "current.txt", + "current change\n", + "Thu, 1 Jan 2037 00:00:00 +0000", + "current change", + ); + + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: defaultBranch }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "newer-branch" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "newer-branch" }); + yield* commitWithDate( + tmp, + "newer.txt", + "newer change\n", + "Fri, 1 Jan 2038 00:00:00 +0000", + "newer change", + ); + + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "current-branch" }); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.branches[0]!.name).toBe("current-branch"); + expect(result.branches[1]!.name).toBe(defaultBranch); + expect(result.branches[2]!.name).toBe("newer-branch"); + }), + ); + + effect("lists multiple branches after creating them", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature-a" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature-b" }); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const names = result.branches.map((b) => b.name); + expect(names).toContain("feature-a"); + expect(names).toContain("feature-b"); + }), + ); + + it.effect("paginates branch results and returns paging metadata", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const { initialBranch } = yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature-a" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature-b" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature-c" }); + + const firstPage = yield* (yield* GitCore).listBranches({ cwd: tmp, limit: 2 }); + expect(firstPage.totalCount).toBe(4); + expect(firstPage.nextCursor).toBe(2); + expect(firstPage.branches.map((branch) => branch.name)).toEqual([ + initialBranch, + "feature-a", + ]); + + const secondPage = yield* (yield* GitCore).listBranches({ + cwd: tmp, + cursor: firstPage.nextCursor ?? 0, + limit: 2, + }); + expect(secondPage.totalCount).toBe(4); + expect(secondPage.nextCursor).toBeNull(); + expect(secondPage.branches.map((branch) => branch.name)).toEqual([ + "feature-b", + "feature-c", + ]); + }), + ); + + it.effect("parses separate branch names when column.ui is always enabled", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const { initialBranch } = yield* initRepoWithCommit(tmp); + const createdBranchNames = [ + "go-bin", + "copilot/rewrite-cli-in-go", + "copilot/rewrite-cli-in-rust", + ] as const; + for (const branchName of createdBranchNames) { + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: branchName }); + } + yield* git(tmp, ["config", "column.ui", "always"]); + + const rawBranchOutput = yield* git(tmp, ["branch", "--no-color"], { + ...process.env, + COLUMNS: "120", + }); + expect( + rawBranchOutput + .split("\n") + .some( + (line) => + createdBranchNames.filter((branchName) => line.includes(branchName)).length >= 2, + ), + ).toBe(true); + + const realGitCore = yield* GitCore; + const core = yield* makeIsolatedGitCore((input) => + realGitCore.execute( + input.args[0] === "branch" + ? { + ...input, + env: { ...input.env, COLUMNS: "120" }, + } + : input, + ), + ); + + const result = yield* core.listBranches({ cwd: tmp }); + const localBranchNames = result.branches + .filter((branch) => !branch.isRemote) + .map((branch) => branch.name); + + expect(localBranchNames).toHaveLength(4); + expect(localBranchNames).toEqual( + expect.arrayContaining([initialBranch, ...createdBranchNames]), + ); + expect( + localBranchNames.some( + (branchName) => + createdBranchNames.filter((createdBranch) => branchName.includes(createdBranch)) + .length >= 2, + ), + ).toBe(false); + }), + ); + + it.effect("isDefault is false when no remote exists", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.branches.every((b) => b.isDefault === false)).toBe(true); + }), + ); + + effect("lists local branches first and remote branches last", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const tmp = yield* makeTmpDir(); + + yield* git(remote, ["init", "--bare"]); + yield* initRepoWithCommit(tmp); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (branch) => branch.current, + )!.name; + + yield* git(tmp, ["remote", "add", "origin", remote]); + yield* git(tmp, ["push", "-u", "origin", defaultBranch]); + + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature/local-only" }); + + const remoteOnlyBranch = "feature/remote-only"; + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: defaultBranch }); + yield* git(tmp, ["checkout", "-b", remoteOnlyBranch]); + yield* git(tmp, ["push", "-u", "origin", remoteOnlyBranch]); + yield* git(tmp, ["checkout", defaultBranch]); + yield* git(tmp, ["branch", "-D", remoteOnlyBranch]); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const firstRemoteIndex = result.branches.findIndex((branch) => branch.isRemote); + + expect(result.hasOriginRemote).toBe(true); + expect(firstRemoteIndex).toBeGreaterThan(0); + expect(result.branches.slice(0, firstRemoteIndex).every((branch) => !branch.isRemote)).toBe( + true, + ); + expect(result.branches.slice(firstRemoteIndex).every((branch) => branch.isRemote)).toBe( + true, + ); + expect( + result.branches.some( + (branch) => branch.name === "feature/local-only" && !branch.isRemote, + ), + ).toBe(true); + expect( + result.branches.some( + (branch) => branch.name === "origin/feature/remote-only" && branch.isRemote, + ), + ).toBe(true); + }), + ); + + effect("includes remoteName metadata for remotes with slash in the name", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const tmp = yield* makeTmpDir(); + const remoteName = "my-org/upstream"; + + yield* git(remote, ["init", "--bare"]); + yield* initRepoWithCommit(tmp); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (branch) => branch.current, + )!.name; + + yield* git(tmp, ["remote", "add", remoteName, remote]); + yield* git(tmp, ["push", "-u", remoteName, defaultBranch]); + + const remoteOnlyBranch = "feature/remote-with-remote-name"; + yield* git(tmp, ["checkout", "-b", remoteOnlyBranch]); + yield* git(tmp, ["push", "-u", remoteName, remoteOnlyBranch]); + yield* git(tmp, ["checkout", defaultBranch]); + yield* git(tmp, ["branch", "-D", remoteOnlyBranch]); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const remoteBranch = result.branches.find( + (branch) => branch.name === `${remoteName}/${remoteOnlyBranch}`, + ); + + expect(remoteBranch).toBeDefined(); + expect(remoteBranch?.isRemote).toBe(true); + expect(remoteBranch?.remoteName).toBe(remoteName); + }), + ); + + it.effect( + "filters branch queries before pagination and dedupes origin refs with local matches", + () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const tmp = yield* makeTmpDir(); + + yield* git(remote, ["init", "--bare"]); + const { initialBranch } = yield* initRepoWithCommit(tmp); + yield* git(tmp, ["remote", "add", "origin", remote]); + yield* git(tmp, ["push", "-u", "origin", initialBranch]); + + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature/demo" }); + yield* git(tmp, ["push", "-u", "origin", "feature/demo"]); + + yield* git(tmp, ["checkout", "-b", "feature/remote-only"]); + yield* git(tmp, ["push", "-u", "origin", "feature/remote-only"]); + yield* git(tmp, ["checkout", initialBranch]); + yield* git(tmp, ["branch", "-D", "feature/remote-only"]); + + const result = yield* (yield* GitCore).listBranches({ + cwd: tmp, + query: "feature/", + limit: 10, + }); + + expect(result.totalCount).toBe(2); + expect(result.nextCursor).toBeNull(); + expect(result.branches.map((branch) => branch.name)).toEqual([ + "feature/demo", + "origin/feature/remote-only", + ]); + }), + ); + }); + + // ── checkoutGitBranch ── + + describe("checkoutGitBranch", () => { + effect("checks out an existing branch", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature" }); + + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "feature" }); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const current = result.branches.find((b) => b.current); + expect(current!.name).toBe("feature"); + }), + ); + + effect("refreshes upstream behind count after checkout when remote branch advanced", () => + Effect.gen(function* () { + const context = yield* Effect.context(); + const runPromise = Effect.runPromiseWith(context); + + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + const clone = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: source })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", defaultBranch]); + + const featureBranch = "feature-behind"; + yield* (yield* GitCore).createBranch({ cwd: source, branch: featureBranch }); + yield* (yield* GitCore).checkoutBranch({ cwd: source, branch: featureBranch }); + yield* writeTextFile(path.join(source, "feature.txt"), "feature base\n"); + yield* git(source, ["add", "feature.txt"]); + yield* git(source, ["commit", "-m", "feature base"]); + yield* git(source, ["push", "-u", "origin", featureBranch]); + yield* (yield* GitCore).checkoutBranch({ cwd: source, branch: defaultBranch }); + + yield* git(clone, ["clone", remote, "."]); + yield* git(clone, ["config", "user.email", "test@test.com"]); + yield* git(clone, ["config", "user.name", "Test"]); + yield* git(clone, ["checkout", "-b", featureBranch, "--track", `origin/${featureBranch}`]); + yield* writeTextFile(path.join(clone, "feature.txt"), "feature from remote\n"); + yield* git(clone, ["add", "feature.txt"]); + yield* git(clone, ["commit", "-m", "remote feature update"]); + yield* git(clone, ["push", "origin", featureBranch]); + + yield* (yield* GitCore).checkoutBranch({ cwd: source, branch: featureBranch }); + const core = yield* GitCore; + yield* Effect.promise(() => + vi.waitFor( + async () => { + const details = await runPromise(core.statusDetails(source)); + expect(details.branch).toBe(featureBranch); + expect(details.aheadCount).toBe(0); + expect(details.behindCount).toBe(1); + }, + { + timeout: ASYNC_GIT_WAIT_TIMEOUT_MS, + interval: 100, + }, + ), + ); + }), + ); + + effect("statusDetails remains successful when upstream refresh fails after checkout", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: source })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", defaultBranch]); + + const featureBranch = "feature-refresh-failure"; + yield* git(source, ["branch", featureBranch]); + yield* git(source, ["checkout", featureBranch]); + yield* writeTextFile(path.join(source, "feature.txt"), "feature base\n"); + yield* git(source, ["add", "feature.txt"]); + yield* git(source, ["commit", "-m", "feature base"]); + yield* git(source, ["push", "-u", "origin", featureBranch]); + yield* git(source, ["checkout", defaultBranch]); + + const realGitCore = yield* GitCore; + let refreshFetchAttempts = 0; + const core = yield* makeIsolatedGitCore((input) => { + if (input.args[0] === "--git-dir" && input.args[2] === "fetch") { + refreshFetchAttempts += 1; + return Effect.fail( + new GitCommandError({ + operation: "git.test.refreshFailure", + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "simulated fetch timeout", + }), + ); + } + return realGitCore.execute(input); + }); + yield* core.checkoutBranch({ cwd: source, branch: featureBranch }); + const status = yield* core.statusDetails(source); + expect(refreshFetchAttempts).toBe(1); + expect(status.branch).toBe(featureBranch); + expect(status.upstreamRef).toBe(`origin/${featureBranch}`); + expect(yield* git(source, ["branch", "--show-current"])).toBe(featureBranch); + }), + ); + + effect("defers upstream refresh until statusDetails is requested", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: source })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", defaultBranch]); + + const featureBranch = "feature/scoped-fetch"; + yield* git(source, ["checkout", "-b", featureBranch]); + yield* writeTextFile(path.join(source, "feature.txt"), "feature base\n"); + yield* git(source, ["add", "feature.txt"]); + yield* git(source, ["commit", "-m", "feature base"]); + yield* git(source, ["push", "-u", "origin", featureBranch]); + yield* git(source, ["checkout", defaultBranch]); + + const realGitCore = yield* GitCore; + let refreshFetchAttempts = 0; + const core = yield* makeIsolatedGitCore((input) => { + if (input.args[0] === "--git-dir" && input.args[2] === "fetch") { + refreshFetchAttempts += 1; + return Effect.succeed({ + code: 0, + stdout: "", + stderr: "", + stdoutTruncated: false, + stderrTruncated: false, + }); + } + return realGitCore.execute(input); + }); + yield* core.checkoutBranch({ cwd: source, branch: featureBranch }); + yield* Effect.promise(() => new Promise((resolve) => setTimeout(resolve, 50))); + expect(refreshFetchAttempts).toBe(0); + const status = yield* core.statusDetails(source); + expect(status.branch).toBe(featureBranch); + expect(refreshFetchAttempts).toBe(1); + }), + ); + + effect("shares upstream refreshes across worktrees that use the same git common dir", () => + Effect.gen(function* () { + const ok = (stdout = "") => + Effect.succeed({ + code: 0, + stdout, + stderr: "", + stdoutTruncated: false, + stderrTruncated: false, + }); + + let fetchCount = 0; + const core = yield* makeIsolatedGitCore((input) => { + if ( + input.args[0] === "rev-parse" && + input.args[1] === "--abbrev-ref" && + input.args[2] === "--symbolic-full-name" && + input.args[3] === "@{upstream}" + ) { + return ok( + input.cwd === "/repo/worktrees/pr-123" ? "origin/feature/pr-123\n" : "origin/main\n", + ); + } + if (input.args[0] === "remote") { + return ok("origin\n"); + } + if (input.args[0] === "rev-parse" && input.args[1] === "--git-common-dir") { + return ok("/repo/.git\n"); + } + if (input.args[0] === "--git-dir" && input.args[2] === "fetch") { + fetchCount += 1; + expect(input.cwd).toBe("/repo"); + expect(input.args).toEqual([ + "--git-dir", + "/repo/.git", + "fetch", + "--quiet", + "--no-tags", + "origin", + ]); + return ok(); + } + if (input.operation === "GitCore.statusDetails.status") { + return ok( + input.cwd === "/repo/worktrees/pr-123" + ? "# branch.head feature/pr-123\n# branch.upstream origin/feature/pr-123\n# branch.ab +0 -0\n" + : "# branch.head main\n# branch.upstream origin/main\n# branch.ab +0 -0\n", + ); + } + if ( + input.operation === "GitCore.statusDetails.unstagedNumstat" || + input.operation === "GitCore.statusDetails.stagedNumstat" + ) { + return ok(); + } + if (input.operation === "GitCore.statusDetails.defaultRef") { + return ok("refs/remotes/origin/main\n"); + } + return Effect.fail( + new GitCommandError({ + operation: input.operation, + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "Unexpected git command in shared refresh cache test.", + }), + ); + }); + + yield* core.statusDetails("/repo/worktrees/main"); + yield* core.statusDetails("/repo/worktrees/pr-123"); + expect(fetchCount).toBe(1); + }), + ); + + effect("briefly backs off failed upstream refreshes across sibling worktrees", () => + Effect.gen(function* () { + const ok = (stdout = "") => + Effect.succeed({ + code: 0, + stdout, + stderr: "", + stdoutTruncated: false, + stderrTruncated: false, + }); + + let fetchCount = 0; + const core = yield* makeIsolatedGitCore((input) => { + if ( + input.args[0] === "rev-parse" && + input.args[1] === "--abbrev-ref" && + input.args[2] === "--symbolic-full-name" && + input.args[3] === "@{upstream}" + ) { + return ok( + input.cwd === "/repo/worktrees/pr-123" ? "origin/feature/pr-123\n" : "origin/main\n", + ); + } + if (input.args[0] === "remote") { + return ok("origin\n"); + } + if (input.args[0] === "rev-parse" && input.args[1] === "--git-common-dir") { + return ok("/repo/.git\n"); + } + if (input.args[0] === "--git-dir" && input.args[2] === "fetch") { + fetchCount += 1; + return Effect.fail( + new GitCommandError({ + operation: input.operation, + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "simulated fetch timeout", + }), + ); + } + if (input.operation === "GitCore.statusDetails.status") { + return ok( + input.cwd === "/repo/worktrees/pr-123" + ? "# branch.head feature/pr-123\n# branch.upstream origin/feature/pr-123\n# branch.ab +0 -0\n" + : "# branch.head main\n# branch.upstream origin/main\n# branch.ab +0 -0\n", + ); + } + if ( + input.operation === "GitCore.statusDetails.unstagedNumstat" || + input.operation === "GitCore.statusDetails.stagedNumstat" + ) { + return ok(); + } + if (input.operation === "GitCore.statusDetails.defaultRef") { + return ok("refs/remotes/origin/main\n"); + } + return Effect.fail( + new GitCommandError({ + operation: input.operation, + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "Unexpected git command in refresh failure cooldown test.", + }), + ); + }); + yield* core.statusDetails("/repo/worktrees/main"); + yield* core.statusDetails("/repo/worktrees/pr-123"); + expect(fetchCount).toBe(1); + }), + ); + + effect("throws when branch does not exist", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const result = yield* Effect.result( + (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "nonexistent" }), + ); + expect(result._tag).toBe("Failure"); + }), + ); + + effect("does not silently checkout a local branch when a remote ref no longer exists", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: source })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", defaultBranch]); + + yield* (yield* GitCore).createBranch({ cwd: source, branch: "feature" }); + + const checkoutResult = yield* Effect.result( + (yield* GitCore).checkoutBranch({ cwd: source, branch: "origin/feature" }), + ); + expect(checkoutResult._tag).toBe("Failure"); + expect(yield* git(source, ["branch", "--show-current"])).toBe(defaultBranch); + }), + ); + + effect("checks out a remote tracking branch when remote name contains slashes", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const prefixRemote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + const prefixFetchNamespace = "prefix-my-org"; + const prefixRemoteName = "my-org"; + const remoteName = "my-org/upstream"; + const featureBranch = "feature"; + yield* git(remote, ["init", "--bare"]); + yield* git(prefixRemote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: source })).branches.find( + (branch) => branch.current, + )!.name; + yield* configureRemote(source, prefixRemoteName, prefixRemote, prefixFetchNamespace); + yield* configureRemote(source, remoteName, remote, remoteName); + yield* git(source, ["push", "-u", remoteName, defaultBranch]); + + yield* git(source, ["checkout", "-b", featureBranch]); + yield* writeTextFile(path.join(source, "feature.txt"), "feature content\n"); + yield* git(source, ["add", "feature.txt"]); + yield* git(source, ["commit", "-m", "feature commit"]); + yield* git(source, ["push", "-u", remoteName, featureBranch]); + yield* git(source, ["checkout", defaultBranch]); + yield* git(source, ["branch", "-D", featureBranch]); + + const checkoutResult = yield* (yield* GitCore).checkoutBranch({ + cwd: source, + branch: `${remoteName}/${featureBranch}`, + }); + + expect(checkoutResult.branch).toBe("upstream/feature"); + expect(yield* git(source, ["branch", "--show-current"])).toBe("upstream/feature"); + const realGitCore = yield* GitCore; + let fetchArgs: readonly string[] | null = null; + const core = yield* makeIsolatedGitCore((input) => { + if (input.args[0] === "--git-dir" && input.args[2] === "fetch") { + fetchArgs = [...input.args]; + return Effect.succeed({ + code: 0, + stdout: "", + stderr: "", + stdoutTruncated: false, + stderrTruncated: false, + }); + } + return realGitCore.execute(input); + }); + + const status = yield* core.statusDetails(source); + expect(status.branch).toBe("upstream/feature"); + expect(status.upstreamRef).toBe(`${remoteName}/${featureBranch}`); + expect(fetchArgs).toEqual([ + "--git-dir", + path.join(source, ".git"), + "fetch", + "--quiet", + "--no-tags", + remoteName, + ]); + }), + ); + + effect( + "falls back to detached checkout when --track would conflict with an existing local branch", + () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const defaultBranch = (yield* (yield* GitCore).listBranches({ + cwd: source, + })).branches.find((branch) => branch.current)!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", defaultBranch]); + + // Keep local branch but remove tracking so `--track origin/` + // would attempt to create an already-existing local branch. + yield* git(source, ["branch", "--unset-upstream"]); + + yield* (yield* GitCore).checkoutBranch({ + cwd: source, + branch: `origin/${defaultBranch}`, + }); + + const core = yield* GitCore; + const status = yield* core.statusDetails(source); + expect(status.branch).toBeNull(); + }), + ); + + effect("throws when checkout would overwrite uncommitted changes", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "other" }); + + // Create a conflicting change: modify README on current branch + yield* writeTextFile(path.join(tmp, "README.md"), "modified\n"); + yield* git(tmp, ["add", "README.md"]); + + // First, checkout other branch cleanly + yield* git(tmp, ["stash"]); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "other" }); + yield* writeTextFile(path.join(tmp, "README.md"), "other content\n"); + yield* git(tmp, ["add", "."]); + yield* git(tmp, ["commit", "-m", "other change"]); + + // Go back to default branch + const defaultBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => !b.current, + )!.name; + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: defaultBranch }); + + // Make uncommitted changes to the same file + yield* writeTextFile(path.join(tmp, "README.md"), "conflicting local\n"); + + // Checkout should fail due to uncommitted changes + const result = yield* Effect.result( + (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "other" }), + ); + expect(result._tag).toBe("Failure"); + }), + ); + }); + + // ── createGitBranch ── + + describe("createGitBranch", () => { + effect("creates a new branch visible in listGitBranches", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "new-feature" }); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.branches.some((b) => b.name === "new-feature")).toBe(true); + }), + ); + + effect("throws when branch already exists", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "dupe" }); + const result = yield* Effect.result( + (yield* GitCore).createBranch({ cwd: tmp, branch: "dupe" }), + ); + expect(result._tag).toBe("Failure"); + }), + ); + }); + + // ── renameGitBranch ── + + describe("renameGitBranch", () => { + effect("renames the current branch", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature/old-name" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "feature/old-name" }); + + const renamed = yield* (yield* GitCore).renameBranch({ + cwd: tmp, + oldBranch: "feature/old-name", + newBranch: "feature/new-name", + }); + + expect(renamed.branch).toBe("feature/new-name"); + + const branches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(branches.branches.some((branch) => branch.name === "feature/old-name")).toBe(false); + const current = branches.branches.find((branch) => branch.current); + expect(current?.name).toBe("feature/new-name"); + }), + ); + + effect("returns success without git invocation when old/new names match", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const current = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!; + + const renamed = yield* (yield* GitCore).renameBranch({ + cwd: tmp, + oldBranch: current.name, + newBranch: current.name, + }); + + expect(renamed.branch).toBe(current.name); + }), + ); + + effect("appends numeric suffix when target branch already exists", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "t3code/feat/session" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "t3code/tmp-working" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "t3code/tmp-working" }); + + const renamed = yield* (yield* GitCore).renameBranch({ + cwd: tmp, + oldBranch: "t3code/tmp-working", + newBranch: "t3code/feat/session", + }); + + expect(renamed.branch).toBe("t3code/feat/session-1"); + const branches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(branches.branches.some((branch) => branch.name === "t3code/feat/session")).toBe( + true, + ); + expect(branches.branches.some((branch) => branch.name === "t3code/feat/session-1")).toBe( + true, + ); + const current = branches.branches.find((branch) => branch.current); + expect(current?.name).toBe("t3code/feat/session-1"); + }), + ); + + effect("increments suffix until it finds an available branch name", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "t3code/feat/session" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "t3code/feat/session-1" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "t3code/tmp-working" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "t3code/tmp-working" }); + + const renamed = yield* (yield* GitCore).renameBranch({ + cwd: tmp, + oldBranch: "t3code/tmp-working", + newBranch: "t3code/feat/session", + }); + + expect(renamed.branch).toBe("t3code/feat/session-2"); + }), + ); + + effect("uses '--' separator for branch rename arguments", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature/old-name" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "feature/old-name" }); + + const realGitCore = yield* GitCore; + let renameArgs: ReadonlyArray | null = null; + const core = yield* makeIsolatedGitCore((input) => { + if (input.args[0] === "branch" && input.args[1] === "-m") { + renameArgs = [...input.args]; + } + return realGitCore.execute(input); + }); + + const renamed = yield* core.renameBranch({ + cwd: tmp, + oldBranch: "feature/old-name", + newBranch: "feature/new-name", + }); + + expect(renamed.branch).toBe("feature/new-name"); + expect(renameArgs).toEqual(["branch", "-m", "--", "feature/old-name", "feature/new-name"]); + }), + ); + }); + + // ── createGitWorktree + removeGitWorktree ── + + describe("createGitWorktree", () => { + effect("creates a worktree with a new branch from the base branch", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + + const wtPath = path.join(tmp, "worktree-out"); + const currentBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + const result = yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: currentBranch, + newBranch: "wt-branch", + path: wtPath, + }); + + expect(result.worktree.path).toBe(wtPath); + expect(result.worktree.branch).toBe("wt-branch"); + expect(existsSync(wtPath)).toBe(true); + expect(existsSync(path.join(wtPath, "README.md"))).toBe(true); + + // Clean up worktree before tmp dir disposal + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }); + }), + ); + + effect("worktree has the new branch checked out", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + + const wtPath = path.join(tmp, "wt-check-dir"); + const currentBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: currentBranch, + newBranch: "wt-check", + path: wtPath, + }); + + // Verify the worktree is on the new branch + const branchOutput = yield* git(wtPath, ["branch", "--show-current"]); + expect(branchOutput).toBe("wt-check"); + + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }); + }), + ); + + effect("creates a worktree for an existing branch when newBranch is omitted", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature/existing-worktree" }); + + const wtPath = path.join(tmp, "wt-existing"); + const result = yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: "feature/existing-worktree", + path: wtPath, + }); + + expect(result.worktree.path).toBe(wtPath); + expect(result.worktree.branch).toBe("feature/existing-worktree"); + const branchOutput = yield* git(wtPath, ["branch", "--show-current"]); + expect(branchOutput).toBe("feature/existing-worktree"); + + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }); + }), + ); + + effect("throws when new branch name already exists", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "existing" }); + + const wtPath = path.join(tmp, "wt-conflict"); + const currentBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + const result = yield* Effect.result( + (yield* GitCore).createWorktree({ + cwd: tmp, + branch: currentBranch, + newBranch: "existing", + path: wtPath, + }), + ); + expect(result._tag).toBe("Failure"); + }), + ); + + effect("listGitBranches from worktree cwd reports worktree branch as current", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + + const wtPath = path.join(tmp, "wt-list-dir"); + const mainBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: mainBranch, + newBranch: "wt-list", + path: wtPath, + }); + + // listGitBranches from the worktree should show wt-list as current + const wtBranches = yield* (yield* GitCore).listBranches({ cwd: wtPath }); + expect(wtBranches.isRepo).toBe(true); + const wtCurrent = wtBranches.branches.find((b) => b.current); + expect(wtCurrent!.name).toBe("wt-list"); + + // Main repo should still show the original branch as current + const mainBranches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const mainCurrent = mainBranches.branches.find((b) => b.current); + expect(mainCurrent!.name).toBe(mainBranch); + + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }); + }), + ); + + effect("removeGitWorktree cleans up the worktree", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + + const wtPath = path.join(tmp, "wt-remove-dir"); + const currentBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: currentBranch, + newBranch: "wt-remove", + path: wtPath, + }); + expect(existsSync(wtPath)).toBe(true); + + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }); + expect(existsSync(wtPath)).toBe(false); + }), + ); + + effect("removeGitWorktree force removes a dirty worktree", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + + const wtPath = path.join(tmp, "wt-dirty-dir"); + const currentBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: currentBranch, + newBranch: "wt-dirty", + path: wtPath, + }); + expect(existsSync(wtPath)).toBe(true); + + yield* writeTextFile(path.join(wtPath, "README.md"), "dirty change\n"); + + const failedRemove = yield* Effect.result( + (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }), + ); + expect(failedRemove._tag).toBe("Failure"); + expect(existsSync(wtPath)).toBe(true); + + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath, force: true }); + expect(existsSync(wtPath)).toBe(false); + }), + ); + }); + + // ── Full flow: local branch checkout ── + + describe("full flow: local branch checkout", () => { + effect("init → commit → create branch → checkout → verify current", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature-login" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "feature-login" }); + + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const current = result.branches.find((b) => b.current); + expect(current!.name).toBe("feature-login"); + }), + ); + }); + + // ── Full flow: worktree creation from base branch ── + + describe("full flow: worktree creation", () => { + effect("creates worktree with new branch from current branch", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + + const currentBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (b) => b.current, + )!.name; + + const wtPath = path.join(tmp, "my-worktree"); + const result = yield* (yield* GitCore).createWorktree({ + cwd: tmp, + branch: currentBranch, + newBranch: "feature-wt", + path: wtPath, + }); + + // Worktree exists + expect(existsSync(result.worktree.path)).toBe(true); + + // Main repo still on original branch + const mainBranches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const mainCurrent = mainBranches.branches.find((b) => b.current); + expect(mainCurrent!.name).toBe(currentBranch); + + // Worktree is on the new branch + const wtBranch = yield* git(wtPath, ["branch", "--show-current"]); + expect(wtBranch).toBe("feature-wt"); + + yield* (yield* GitCore).removeWorktree({ cwd: tmp, path: wtPath }); + }), + ); + }); + + describe("fetchPullRequestBranch", () => { + effect("fetches a GitHub pull request ref into a local branch without checkout", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const { initialBranch } = yield* initRepoWithCommit(tmp); + const remoteDir = yield* makeTmpDir("git-remote-"); + yield* git(remoteDir, ["init", "--bare"]); + yield* git(tmp, ["remote", "add", "origin", remoteDir]); + yield* git(tmp, ["push", "-u", "origin", initialBranch]); + yield* git(tmp, ["checkout", "-b", "feature/pr-fetch"]); + yield* writeTextFile(path.join(tmp, "pr-fetch.txt"), "fetch me\n"); + yield* git(tmp, ["add", "pr-fetch.txt"]); + yield* git(tmp, ["commit", "-m", "Add PR fetch branch"]); + yield* git(tmp, ["push", "-u", "origin", "feature/pr-fetch"]); + yield* git(tmp, ["push", "origin", "HEAD:refs/pull/55/head"]); + yield* git(tmp, ["checkout", initialBranch]); + + yield* (yield* GitCore).fetchPullRequestBranch({ + cwd: tmp, + prNumber: 55, + branch: "feature/pr-fetch", + }); + + const localBranches = yield* git(tmp, ["branch", "--list", "feature/pr-fetch"]); + expect(localBranches).toContain("feature/pr-fetch"); + const currentBranch = yield* git(tmp, ["branch", "--show-current"]); + expect(currentBranch).toBe(initialBranch); + }), + ); + }); + + // ── Full flow: thread switching simulation ── + + describe("full flow: thread switching (checkout toggling)", () => { + effect("checkout a → checkout b → checkout a → current matches", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "branch-a" }); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "branch-b" }); + + // Simulate switching to thread A's branch + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "branch-a" }); + let branches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(branches.branches.find((b) => b.current)!.name).toBe("branch-a"); + + // Simulate switching to thread B's branch + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "branch-b" }); + branches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(branches.branches.find((b) => b.current)!.name).toBe("branch-b"); + + // Switch back to thread A + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "branch-a" }); + branches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(branches.branches.find((b) => b.current)!.name).toBe("branch-a"); + }), + ); + }); + + // ── Full flow: checkout conflict ── + + describe("full flow: checkout conflict", () => { + effect("uncommitted changes prevent checkout to a diverged branch", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "diverged" }); + + // Make diverged branch have different file content + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "diverged" }); + yield* writeTextFile(path.join(tmp, "README.md"), "diverged content\n"); + yield* git(tmp, ["add", "."]); + yield* git(tmp, ["commit", "-m", "diverge"]); + + // Actually, let's just get back to the initial branch explicitly + const allBranches = yield* (yield* GitCore).listBranches({ cwd: tmp }); + const initialBranch = allBranches.branches.find((b) => b.name !== "diverged")!.name; + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: initialBranch }); + + // Make local uncommitted changes to the same file + yield* writeTextFile(path.join(tmp, "README.md"), "local uncommitted\n"); + + // Attempt checkout should fail + const failedCheckout = yield* Effect.result( + (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "diverged" }), + ); + expect(failedCheckout._tag).toBe("Failure"); + + // Current branch should still be the initial one + const result = yield* (yield* GitCore).listBranches({ cwd: tmp }); + expect(result.branches.find((b) => b.current)!.name).toBe(initialBranch); + }), + ); + }); + + describe("GitCore", () => { + effect("supports branch lifecycle operations through the service API", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const core = yield* GitCore; + + yield* core.initRepo({ cwd: tmp }); + yield* git(tmp, ["config", "user.email", "test@test.com"]); + yield* git(tmp, ["config", "user.name", "Test"]); + yield* writeTextFile(path.join(tmp, "README.md"), "# test\n"); + yield* git(tmp, ["add", "."]); + yield* git(tmp, ["commit", "-m", "initial commit"]); + + yield* core.createBranch({ cwd: tmp, branch: "feature/service-api" }); + yield* core.checkoutBranch({ cwd: tmp, branch: "feature/service-api" }); + const branches = yield* core.listBranches({ cwd: tmp }); + + expect(branches.isRepo).toBe(true); + expect( + branches.branches.find((branch: { current: boolean; name: string }) => branch.current) + ?.name, + ).toBe("feature/service-api"); + }), + ); + + effect( + "reuses an existing remote when the target URL only differs by a trailing slash after .git", + () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* git(tmp, ["remote", "add", "origin", "git@github.com:pingdotgg/t3code.git"]); + + const remoteName = yield* core.ensureRemote({ + cwd: tmp, + preferredName: "origin", + url: "git@github.com:pingdotgg/t3code.git/", + }); + + expect(remoteName).toBe("origin"); + expect((yield* git(tmp, ["remote"])).split("\n").filter(Boolean)).toEqual(["origin"]); + }), + ); + + effect("reports status details and dirty state", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + const clean = yield* core.status({ cwd: tmp }); + expect(clean.hasWorkingTreeChanges).toBe(false); + expect(clean.branch).toBeTruthy(); + + yield* writeTextFile(path.join(tmp, "README.md"), "updated\n"); + const dirty = yield* core.statusDetails(tmp); + expect(dirty.hasWorkingTreeChanges).toBe(true); + }), + ); + + effect("returns a non-repo status for deleted directories", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const deletedDir = path.join(tmp, "deleted-repo"); + yield* makeDirectory(deletedDir); + yield* removePath(deletedDir); + const core = yield* GitCore; + + const status = yield* core.statusDetails(deletedDir); + const localStatus = yield* core.statusDetailsLocal(deletedDir); + + expect(status).toEqual({ + isRepo: false, + hasOriginRemote: false, + isDefaultBranch: false, + branch: null, + upstreamRef: null, + hasWorkingTreeChanges: false, + workingTree: { + files: [], + insertions: 0, + deletions: 0, + }, + hasUpstream: false, + aheadCount: 0, + behindCount: 0, + }); + expect(localStatus).toEqual(status); + }), + ); + + effect("computes ahead count against base branch when no upstream is configured", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* core.createBranch({ cwd: tmp, branch: "feature/no-upstream-ahead" }); + yield* core.checkoutBranch({ cwd: tmp, branch: "feature/no-upstream-ahead" }); + yield* writeTextFile(path.join(tmp, "feature.txt"), "ahead of base\n"); + yield* git(tmp, ["add", "feature.txt"]); + yield* git(tmp, ["commit", "-m", "feature commit"]); + + const details = yield* core.statusDetails(tmp); + expect(details.branch).toBe("feature/no-upstream-ahead"); + expect(details.hasUpstream).toBe(false); + expect(details.aheadCount).toBe(1); + expect(details.behindCount).toBe(0); + }), + ); + + effect("computes ahead count against origin/default when local default branch is missing", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const initialBranch = (yield* (yield* GitCore).listBranches({ + cwd: source, + })).branches.find((branch) => branch.current)!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", initialBranch]); + yield* git(source, ["checkout", "-b", "feature/remote-base-only"]); + yield* writeTextFile( + path.join(source, "feature.txt"), + `ahead of origin/${initialBranch}\n`, + ); + yield* git(source, ["add", "feature.txt"]); + yield* git(source, ["commit", "-m", "feature commit"]); + yield* git(source, ["branch", "-D", initialBranch]); + + const core = yield* GitCore; + const details = yield* core.statusDetails(source); + expect(details.branch).toBe("feature/remote-base-only"); + expect(details.hasUpstream).toBe(false); + expect(details.aheadCount).toBe(1); + expect(details.behindCount).toBe(0); + }), + ); + + effect( + "computes ahead count against a non-origin remote-prefixed gh-merge-base candidate", + () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + const remoteName = "fork-seed"; + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const initialBranch = (yield* (yield* GitCore).listBranches({ + cwd: source, + })).branches.find((branch) => branch.current)!.name; + yield* git(source, ["remote", "add", remoteName, remote]); + yield* git(source, ["push", "-u", remoteName, initialBranch]); + yield* git(source, ["checkout", "-b", "feature/non-origin-merge-base"]); + yield* git(source, [ + "config", + "branch.feature/non-origin-merge-base.gh-merge-base", + `${remoteName}/${initialBranch}`, + ]); + yield* writeTextFile( + path.join(source, "feature.txt"), + `ahead of ${remoteName}/${initialBranch}\n`, + ); + yield* git(source, ["add", "feature.txt"]); + yield* git(source, ["commit", "-m", "feature commit"]); + yield* git(source, ["branch", "-D", initialBranch]); + + const core = yield* GitCore; + const details = yield* core.statusDetails(source); + expect(details.branch).toBe("feature/non-origin-merge-base"); + expect(details.hasUpstream).toBe(false); + expect(details.aheadCount).toBe(1); + expect(details.behindCount).toBe(0); + }), + ); + + effect("skips push when no upstream is configured and branch is not ahead of base", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* core.createBranch({ cwd: tmp, branch: "feature/no-upstream-no-ahead" }); + yield* core.checkoutBranch({ cwd: tmp, branch: "feature/no-upstream-no-ahead" }); + + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("skipped_up_to_date"); + expect(pushed.branch).toBe("feature/no-upstream-no-ahead"); + expect(pushed.setUpstream).toBeUndefined(); + }), + ); + + effect("pushes with upstream setup when no comparable base branch exists", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + yield* git(tmp, ["init", "--initial-branch=trunk"]); + yield* git(tmp, ["config", "user.email", "test@test.com"]); + yield* git(tmp, ["config", "user.name", "Test"]); + yield* writeTextFile(path.join(tmp, "README.md"), "hello\n"); + yield* git(tmp, ["add", "README.md"]); + yield* git(tmp, ["commit", "-m", "initial"]); + yield* git(remote, ["init", "--bare"]); + yield* git(tmp, ["remote", "add", "origin", remote]); + yield* git(tmp, ["checkout", "-b", "feature/no-base"]); + + const core = yield* GitCore; + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(true); + expect(pushed.upstreamBranch).toBe("origin/feature/no-base"); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + "origin/feature/no-base", + ); + }), + ); + + effect("pushes with upstream setup to the only configured non-origin remote", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + yield* git(tmp, ["init", "--initial-branch=main"]); + yield* git(tmp, ["config", "user.email", "test@test.com"]); + yield* git(tmp, ["config", "user.name", "Test"]); + yield* writeTextFile(path.join(tmp, "README.md"), "hello\n"); + yield* git(tmp, ["add", "README.md"]); + yield* git(tmp, ["commit", "-m", "initial"]); + yield* git(remote, ["init", "--bare"]); + yield* git(tmp, ["remote", "add", "fork", remote]); + yield* git(tmp, ["checkout", "-b", "feature/fork-only"]); + + const core = yield* GitCore; + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(true); + expect(pushed.upstreamBranch).toBe("fork/feature/fork-only"); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + "fork/feature/fork-only", + ); + }), + ); + + effect( + "pushes with upstream setup when comparable base exists but remote branch is missing", + () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(tmp); + const initialBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(tmp, ["remote", "add", "origin", remote]); + yield* git(tmp, ["push", "-u", "origin", initialBranch]); + + yield* writeTextFile(path.join(tmp, "default-ahead.txt"), "ahead on default\n"); + yield* git(tmp, ["add", "default-ahead.txt"]); + yield* git(tmp, ["commit", "-m", "default ahead"]); + + const featureBranch = "feature/publish-no-upstream"; + yield* git(tmp, ["checkout", "-b", featureBranch]); + + const core = yield* GitCore; + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(true); + expect(pushed.upstreamBranch).toBe(`origin/${featureBranch}`); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + `origin/${featureBranch}`, + ); + expect(yield* git(tmp, ["ls-remote", "--heads", "origin", featureBranch])).toContain( + featureBranch, + ); + }), + ); + + effect("prefers branch pushRemote over origin when setting upstream", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const origin = yield* makeTmpDir(); + const fork = yield* makeTmpDir(); + yield* git(origin, ["init", "--bare"]); + yield* git(fork, ["init", "--bare"]); + + yield* initRepoWithCommit(tmp); + const initialBranch = (yield* (yield* GitCore).listBranches({ cwd: tmp })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(tmp, ["remote", "add", "origin", origin]); + yield* git(tmp, ["remote", "add", "fork", fork]); + yield* git(tmp, ["push", "-u", "origin", initialBranch]); + + const featureBranch = "feature/push-remote"; + yield* git(tmp, ["checkout", "-b", featureBranch]); + yield* git(tmp, ["config", `branch.${featureBranch}.pushRemote`, "fork"]); + yield* writeTextFile(path.join(tmp, "feature.txt"), "push to fork\n"); + yield* git(tmp, ["add", "feature.txt"]); + yield* git(tmp, ["commit", "-m", "feature commit"]); + + const core = yield* GitCore; + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(true); + expect(pushed.upstreamBranch).toBe(`fork/${featureBranch}`); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + `fork/${featureBranch}`, + ); + expect(yield* git(tmp, ["ls-remote", "--heads", "fork", featureBranch])).toContain( + featureBranch, + ); + }), + ); + + effect( + "pushes renamed PR worktree branches to their tracked upstream branch even when push.default is current", + () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const fork = yield* makeTmpDir(); + yield* git(fork, ["init", "--bare"]); + + const { initialBranch } = yield* initRepoWithCommit(tmp); + yield* git(tmp, ["remote", "add", "jasonLaster", fork]); + yield* git(tmp, ["checkout", "-b", "statemachine"]); + yield* writeTextFile(path.join(tmp, "fork.txt"), "fork branch\n"); + yield* git(tmp, ["add", "fork.txt"]); + yield* git(tmp, ["commit", "-m", "fork branch"]); + yield* git(tmp, ["push", "-u", "jasonLaster", "statemachine"]); + yield* git(tmp, ["checkout", initialBranch]); + yield* git(tmp, ["branch", "-D", "statemachine"]); + yield* git(tmp, [ + "checkout", + "-b", + "t3code/pr-488/statemachine", + "--track", + "jasonLaster/statemachine", + ]); + yield* git(tmp, ["config", "push.default", "current"]); + yield* writeTextFile(path.join(tmp, "fork.txt"), "updated fork branch\n"); + yield* git(tmp, ["add", "fork.txt"]); + yield* git(tmp, ["commit", "-m", "update reviewed PR branch"]); + + const core = yield* GitCore; + const pushed = yield* core.pushCurrentBranch(tmp, null); + + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(false); + expect(pushed.upstreamBranch).toBe("jasonLaster/statemachine"); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + "jasonLaster/statemachine", + ); + expect( + yield* git(tmp, ["ls-remote", "--heads", "jasonLaster", "statemachine"]), + ).toContain("statemachine"); + expect( + yield* git(tmp, ["ls-remote", "--heads", "jasonLaster", "t3code/pr-488/statemachine"]), + ).toBe(""); + }), + ); + + effect("pushes to the tracked upstream when the remote name contains slashes", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + const prefixRemote = yield* makeTmpDir(); + const prefixFetchNamespace = "prefix-my-org"; + const prefixRemoteName = "my-org"; + const remoteName = "my-org/upstream"; + const featureBranch = "feature/slash-remote-push"; + yield* git(remote, ["init", "--bare"]); + yield* git(prefixRemote, ["init", "--bare"]); + + const { initialBranch } = yield* initRepoWithCommit(tmp); + yield* configureRemote(tmp, prefixRemoteName, prefixRemote, prefixFetchNamespace); + yield* configureRemote(tmp, remoteName, remote, remoteName); + yield* git(tmp, ["push", "-u", remoteName, initialBranch]); + + yield* git(tmp, ["checkout", "-b", featureBranch]); + yield* writeTextFile(path.join(tmp, "feature.txt"), "first revision\n"); + yield* git(tmp, ["add", "feature.txt"]); + yield* git(tmp, ["commit", "-m", "feature base"]); + yield* git(tmp, ["push", "-u", remoteName, featureBranch]); + + yield* writeTextFile(path.join(tmp, "feature.txt"), "second revision\n"); + yield* git(tmp, ["add", "feature.txt"]); + yield* git(tmp, ["commit", "-m", "feature update"]); + + const core = yield* GitCore; + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(false); + expect(pushed.upstreamBranch).toBe(`${remoteName}/${featureBranch}`); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + `${remoteName}/${featureBranch}`, + ); + expect(yield* git(tmp, ["ls-remote", "--heads", remoteName, featureBranch])).toContain( + featureBranch, + ); + }), + ); + + effect("includes command context when worktree removal fails", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + const missingWorktreePath = path.join(tmp, "missing-worktree"); + + const removeResult = yield* Effect.result( + core.removeWorktree({ cwd: tmp, path: missingWorktreePath }), + ); + expect(removeResult._tag).toBe("Failure"); + if (removeResult._tag !== "Failure") { + return; + } + const message = removeResult.failure.message; + expect(message).toContain("git worktree remove"); + expect(message).toContain(`cwd: ${tmp}`); + expect(message).toContain(missingWorktreePath); + }), + ); + + effect("refreshes upstream before statusDetails so behind count reflects remote updates", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + const clone = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const initialBranch = (yield* (yield* GitCore).listBranches({ + cwd: source, + })).branches.find((branch) => branch.current)!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", initialBranch]); + + yield* git(clone, ["clone", remote, "."]); + yield* git(clone, ["config", "user.email", "test@test.com"]); + yield* git(clone, ["config", "user.name", "Test"]); + yield* git(clone, ["checkout", "-B", initialBranch, "--track", `origin/${initialBranch}`]); + yield* writeTextFile(path.join(clone, "CHANGELOG.md"), "remote change\n"); + yield* git(clone, ["add", "CHANGELOG.md"]); + yield* git(clone, ["commit", "-m", "remote update"]); + yield* git(clone, ["push", "origin", initialBranch]); + + const core = yield* GitCore; + const details = yield* core.statusDetails(source); + expect(details.branch).toBe(initialBranch); + expect(details.aheadCount).toBe(0); + expect(details.behindCount).toBe(1); + }), + ); + + effect("prepares commit context by auto-staging and creates commit", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* writeTextFile(path.join(tmp, "README.md"), "new content\n"); + const context = yield* core.prepareCommitContext(tmp); + expect(context).not.toBeNull(); + expect(context!.stagedSummary.length).toBeGreaterThan(0); + expect(context!.stagedPatch.length).toBeGreaterThan(0); + + const created = yield* core.commit(tmp, "Add README update", "- include updated content"); + expect(created.commitSha.length).toBeGreaterThan(0); + expect(yield* git(tmp, ["log", "-1", "--pretty=%s"])).toBe("Add README update"); + }), + ); + + effect("prepareCommitContext stages only selected files when filePaths provided", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* writeTextFile(path.join(tmp, "a.txt"), "file a\n"); + yield* writeTextFile(path.join(tmp, "b.txt"), "file b\n"); + + const context = yield* core.prepareCommitContext(tmp, ["a.txt"]); + expect(context).not.toBeNull(); + expect(context!.stagedSummary).toContain("a.txt"); + expect(context!.stagedSummary).not.toContain("b.txt"); + + yield* core.commit(tmp, "Add only a.txt", ""); + + // b.txt should still be untracked after commit + const statusAfter = yield* git(tmp, ["status", "--porcelain"]); + expect(statusAfter).toContain("b.txt"); + expect(statusAfter).not.toContain("a.txt"); + }), + ); + + effect("prepareCommitContext stages everything when filePaths is undefined", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* writeTextFile(path.join(tmp, "a.txt"), "file a\n"); + yield* writeTextFile(path.join(tmp, "b.txt"), "file b\n"); + + const context = yield* core.prepareCommitContext(tmp); + expect(context).not.toBeNull(); + expect(context!.stagedSummary).toContain("a.txt"); + expect(context!.stagedSummary).toContain("b.txt"); + }), + ); + + effect("prepareCommitContext truncates oversized staged patches instead of failing", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* writeTextFile(path.join(tmp, "README.md"), buildLargeText()); + + const context = yield* core.prepareCommitContext(tmp); + expect(context).not.toBeNull(); + expect(context!.stagedSummary).toContain("README.md"); + expect(context!.stagedPatch).toContain("[truncated]"); + }), + ); + + effect("readRangeContext truncates oversized diff patches instead of failing", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const { initialBranch } = yield* initRepoWithCommit(tmp); + const core = yield* GitCore; + + yield* core.createBranch({ cwd: tmp, branch: "feature/large-range-context" }); + yield* core.checkoutBranch({ cwd: tmp, branch: "feature/large-range-context" }); + yield* writeTextFile(path.join(tmp, "large.txt"), buildLargeText()); + yield* git(tmp, ["add", "large.txt"]); + yield* git(tmp, ["commit", "-m", "Add large range context"]); + + const rangeContext = yield* core.readRangeContext(tmp, initialBranch); + expect(rangeContext.commitSummary).toContain("Add large range context"); + expect(rangeContext.diffSummary).toContain("large.txt"); + expect(rangeContext.diffPatch).toContain("[truncated]"); + }), + ); + + effect("pushes with upstream setup and then skips when up to date", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* git(remote, ["init", "--bare"]); + yield* git(tmp, ["remote", "add", "origin", remote]); + yield* (yield* GitCore).createBranch({ cwd: tmp, branch: "feature/core-push" }); + yield* (yield* GitCore).checkoutBranch({ cwd: tmp, branch: "feature/core-push" }); + + yield* writeTextFile(path.join(tmp, "feature.txt"), "push me\n"); + const core = yield* GitCore; + const context = yield* core.prepareCommitContext(tmp); + expect(context).not.toBeNull(); + yield* core.commit(tmp, "Add feature file", ""); + + const pushed = yield* core.pushCurrentBranch(tmp, null); + expect(pushed.status).toBe("pushed"); + expect(pushed.setUpstream).toBe(true); + expect(yield* git(tmp, ["rev-parse", "--abbrev-ref", "@{upstream}"])).toBe( + "origin/feature/core-push", + ); + + const skipped = yield* core.pushCurrentBranch(tmp, null); + expect(skipped.status).toBe("skipped_up_to_date"); + }), + ); + + effect("pulls behind branch and then reports up-to-date", () => + Effect.gen(function* () { + const remote = yield* makeTmpDir(); + const source = yield* makeTmpDir(); + const clone = yield* makeTmpDir(); + yield* git(remote, ["init", "--bare"]); + + yield* initRepoWithCommit(source); + const initialBranch = (yield* (yield* GitCore).listBranches({ cwd: source })).branches.find( + (branch) => branch.current, + )!.name; + yield* git(source, ["remote", "add", "origin", remote]); + yield* git(source, ["push", "-u", "origin", initialBranch]); + + yield* git(clone, ["clone", remote, "."]); + yield* git(clone, ["config", "user.email", "test@test.com"]); + yield* git(clone, ["config", "user.name", "Test"]); + yield* writeTextFile(path.join(clone, "CHANGELOG.md"), "remote change\n"); + yield* git(clone, ["add", "CHANGELOG.md"]); + yield* git(clone, ["commit", "-m", "remote update"]); + yield* git(clone, ["push", "origin", initialBranch]); + + const core = yield* GitCore; + const pulled = yield* core.pullCurrentBranch(source); + expect(pulled.status).toBe("pulled"); + expect((yield* core.statusDetails(source)).behindCount).toBe(0); + + const skipped = yield* core.pullCurrentBranch(source); + expect(skipped.status).toBe("skipped_up_to_date"); + }), + ); + + effect("top-level pullGitBranch rejects when no upstream exists", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const result = yield* Effect.result((yield* GitCore).pullCurrentBranch(tmp)); + expect(result._tag).toBe("Failure"); + if (result._tag === "Failure") { + expect(result.failure.message.toLowerCase()).toContain("no upstream"); + } + }), + ); + + effect("lists branches when recency lookup fails", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + const realGitCore = yield* GitCore; + let didFailRecency = false; + const core = yield* makeIsolatedGitCore((input) => { + if (!didFailRecency && input.args[0] === "for-each-ref") { + didFailRecency = true; + return Effect.fail( + new GitCommandError({ + operation: "git.test.listBranchesRecency", + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "timeout", + }), + ); + } + return realGitCore.execute(input); + }); + + const result = yield* core.listBranches({ cwd: tmp }); + + expect(result.isRepo).toBe(true); + expect(result.branches.length).toBeGreaterThan(0); + expect(result.branches[0]?.current).toBe(true); + expect(didFailRecency).toBe(true); + }), + ); + + effect("falls back to empty remote branch data when remote lookups fail", () => + Effect.gen(function* () { + const tmp = yield* makeTmpDir(); + const remote = yield* makeTmpDir(); + yield* initRepoWithCommit(tmp); + yield* git(remote, ["init", "--bare"]); + yield* git(tmp, ["remote", "add", "origin", remote]); + + const realGitCore = yield* GitCore; + let didFailRemoteBranches = false; + let didFailRemoteNames = false; + const core = yield* makeIsolatedGitCore((input) => { + if (input.args.join(" ") === "branch --no-color --no-column --remotes") { + didFailRemoteBranches = true; + return Effect.fail( + new GitCommandError({ + operation: "git.test.listBranchesRemoteBranches", + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "remote unavailable", + }), + ); + } + if (input.args.join(" ") === "remote") { + didFailRemoteNames = true; + return Effect.fail( + new GitCommandError({ + operation: "git.test.listBranchesRemoteNames", + command: `git ${input.args.join(" ")}`, + cwd: input.cwd, + detail: "remote unavailable", + }), + ); + } + return realGitCore.execute(input); + }); + + const result = yield* core.listBranches({ cwd: tmp }); + + expect(result.isRepo).toBe(true); + expect(result.branches.length).toBeGreaterThan(0); + expect(result.branches.every((branch) => !branch.isRemote)).toBe(true); + expect(didFailRemoteBranches).toBe(true); + expect(didFailRemoteNames).toBe(true); + }), + ); + }); +}); diff --git a/apps/server/src/git/Layers/RoutingTextGeneration.ts b/apps/server/src/git/Layers/RoutingTextGeneration.ts new file mode 100644 index 0000000000..31fed43409 --- /dev/null +++ b/apps/server/src/git/Layers/RoutingTextGeneration.ts @@ -0,0 +1,112 @@ +/** + * RoutingTextGeneration – Dispatches text generation requests to either the + * Codex CLI or Claude CLI implementation based on the provider in each + * request input. + * + * When `modelSelection.provider` is `"claudeAgent"` the request is forwarded to + * the Claude layer; for any other value (including the default `undefined`) it + * falls through to the Codex layer. + * + * @module RoutingTextGeneration + */ +import { Effect, Layer, Context } from "effect"; + +import { + TextGeneration, + type TextGenerationProvider, + type TextGenerationShape, +} from "../Services/TextGeneration.ts"; +import { CodexTextGenerationLive } from "./CodexTextGeneration.ts"; +import { ClaudeTextGenerationLive } from "./ClaudeTextGeneration.ts"; +import { CursorTextGenerationLive } from "./CursorTextGeneration.ts"; +import { OpenCodeTextGenerationLive } from "./OpenCodeTextGeneration.ts"; + +// --------------------------------------------------------------------------- +// Internal service tags so both concrete layers can coexist. +// --------------------------------------------------------------------------- + +class CodexTextGen extends Context.Service()( + "t3/git/Layers/RoutingTextGeneration/CodexTextGen", +) {} + +class ClaudeTextGen extends Context.Service()( + "t3/git/Layers/RoutingTextGeneration/ClaudeTextGen", +) {} + +class CursorTextGen extends Context.Service()( + "t3/git/Layers/RoutingTextGeneration/CursorTextGen", +) {} + +class OpenCodeTextGen extends Context.Service()( + "t3/git/Layers/RoutingTextGeneration/OpenCodeTextGen", +) {} + +// --------------------------------------------------------------------------- +// Routing implementation +// --------------------------------------------------------------------------- + +const makeRoutingTextGeneration = Effect.gen(function* () { + const codex = yield* CodexTextGen; + const claude = yield* ClaudeTextGen; + const cursor = yield* CursorTextGen; + const opencode = yield* OpenCodeTextGen; + + const providerToService = { + codex, + claudeAgent: claude, + cursor, + opencode, + }; + + const route = (provider: TextGenerationProvider | "opencode") => providerToService[provider]; + + return { + generateCommitMessage: (input) => + route(input.modelSelection.provider).generateCommitMessage(input), + generatePrContent: (input) => route(input.modelSelection.provider).generatePrContent(input), + generateBranchName: (input) => route(input.modelSelection.provider).generateBranchName(input), + generateThreadTitle: (input) => route(input.modelSelection.provider).generateThreadTitle(input), + } satisfies TextGenerationShape; +}); + +const InternalCodexLayer = Layer.effect( + CodexTextGen, + Effect.gen(function* () { + const svc = yield* TextGeneration; + return svc; + }), +).pipe(Layer.provide(CodexTextGenerationLive)); + +const InternalClaudeLayer = Layer.effect( + ClaudeTextGen, + Effect.gen(function* () { + const svc = yield* TextGeneration; + return svc; + }), +).pipe(Layer.provide(ClaudeTextGenerationLive)); + +const InternalCursorLayer = Layer.effect( + CursorTextGen, + Effect.gen(function* () { + const svc = yield* TextGeneration; + return svc; + }), +).pipe(Layer.provide(CursorTextGenerationLive)); + +const InternalOpenCodeLayer = Layer.effect( + OpenCodeTextGen, + Effect.gen(function* () { + const svc = yield* TextGeneration; + return svc; + }), +).pipe(Layer.provide(OpenCodeTextGenerationLive)); + +export const RoutingTextGenerationLive = Layer.effect( + TextGeneration, + makeRoutingTextGeneration, +).pipe( + Layer.provide(InternalCodexLayer), + Layer.provide(InternalClaudeLayer), + Layer.provide(InternalCursorLayer), + Layer.provide(InternalOpenCodeLayer), +); diff --git a/apps/server/src/git/Services/TextGeneration.ts b/apps/server/src/git/Services/TextGeneration.ts new file mode 100644 index 0000000000..f02627008d --- /dev/null +++ b/apps/server/src/git/Services/TextGeneration.ts @@ -0,0 +1,123 @@ +/** + * TextGeneration - Effect service contract for AI-generated Git content. + * + * Generates commit messages and pull request titles/bodies from repository + * context prepared by Git services. + * + * @module TextGeneration + */ +import { Context } from "effect"; +import type { Effect } from "effect"; +import type { ChatAttachment, ModelSelection } from "@t3tools/contracts"; + +import type { TextGenerationError } from "@t3tools/contracts"; + +/** Providers that support git text generation (commit messages, PR content, branch names). */ +export type TextGenerationProvider = "codex" | "claudeAgent" | "cursor"; + +export interface CommitMessageGenerationInput { + cwd: string; + branch: string | null; + stagedSummary: string; + stagedPatch: string; + /** When true, the model also returns a semantic branch name for the change. */ + includeBranch?: boolean; + /** What model and provider to use for generation. */ + modelSelection: ModelSelection; +} + +export interface CommitMessageGenerationResult { + subject: string; + body: string; + /** Only present when `includeBranch` was set on the input. */ + branch?: string | undefined; +} + +export interface PrContentGenerationInput { + cwd: string; + baseBranch: string; + headBranch: string; + commitSummary: string; + diffSummary: string; + diffPatch: string; + /** What model and provider to use for generation. */ + modelSelection: ModelSelection; +} + +export interface PrContentGenerationResult { + title: string; + body: string; +} + +export interface BranchNameGenerationInput { + cwd: string; + message: string; + attachments?: ReadonlyArray | undefined; + /** What model and provider to use for generation. */ + modelSelection: ModelSelection; +} + +export interface BranchNameGenerationResult { + branch: string; +} + +export interface ThreadTitleGenerationInput { + cwd: string; + message: string; + attachments?: ReadonlyArray | undefined; + /** What model and provider to use for generation. */ + modelSelection: ModelSelection; +} + +export interface ThreadTitleGenerationResult { + title: string; +} + +export interface TextGenerationService { + generateCommitMessage( + input: CommitMessageGenerationInput, + ): Promise; + generatePrContent(input: PrContentGenerationInput): Promise; + generateBranchName(input: BranchNameGenerationInput): Promise; + generateThreadTitle(input: ThreadTitleGenerationInput): Promise; +} + +/** + * TextGenerationShape - Service API for commit/PR text generation. + */ +export interface TextGenerationShape { + /** + * Generate a commit message from staged change context. + */ + readonly generateCommitMessage: ( + input: CommitMessageGenerationInput, + ) => Effect.Effect; + + /** + * Generate pull request title/body from branch and diff context. + */ + readonly generatePrContent: ( + input: PrContentGenerationInput, + ) => Effect.Effect; + + /** + * Generate a concise branch name from a user message. + */ + readonly generateBranchName: ( + input: BranchNameGenerationInput, + ) => Effect.Effect; + + /** + * Generate a concise thread title from a user's first message. + */ + readonly generateThreadTitle: ( + input: ThreadTitleGenerationInput, + ) => Effect.Effect; +} + +/** + * TextGeneration - Service tag for commit and PR text generation. + */ +export class TextGeneration extends Context.Service()( + "t3/git/Services/TextGeneration", +) {} diff --git a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts index 08ea1437bb..1bc1bb680d 100644 --- a/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts +++ b/apps/server/src/orchestration/Layers/CheckpointReactor.test.ts @@ -155,7 +155,7 @@ async function waitForThread( checkpoints: ReadonlyArray<{ checkpointTurnCount: number }>; activities: ReadonlyArray<{ kind: string }>; }) => boolean, - timeoutMs = 15_000, + timeoutMs = 30_000, ) { const deadline = (await Effect.runPromise(Clock.currentTimeMillis)) + timeoutMs; const poll = async (): Promise<{ @@ -180,7 +180,7 @@ async function waitForThread( async function waitForEvent( engine: OrchestrationEngineShape, predicate: (event: { type: string }) => boolean, - timeoutMs = 15_000, + timeoutMs = 30_000, ) { const deadline = (await Effect.runPromise(Clock.currentTimeMillis)) + timeoutMs; const poll = async () => { @@ -231,8 +231,8 @@ function gitShowFileAtRef(cwd: string, ref: string, filePath: string): string { return runGit(cwd, ["show", `${ref}:${filePath}`]); } -async function waitForGitRefExists(cwd: string, ref: string, timeoutMs = 15_000) { - const deadline = (await Effect.runPromise(Clock.currentTimeMillis)) + timeoutMs; +async function waitForGitRefExists(cwd: string, ref: string, timeoutMs = 30_000) { + const deadline = Date.now() + timeoutMs; const poll = async (): Promise => { if (gitRefExists(cwd, ref)) { return; @@ -247,6 +247,9 @@ async function waitForGitRefExists(cwd: string, ref: string, timeoutMs = 15_000) } describe("CheckpointReactor", () => { + const LONG_TEST_TIMEOUT_MS = 30_000; + const test = (name: string, run: () => Promise, timeout = LONG_TEST_TIMEOUT_MS) => + it(name, run, timeout); let runtime: ManagedRuntime.ManagedRuntime< | OrchestrationEngineService | CheckpointReactor @@ -453,7 +456,7 @@ describe("CheckpointReactor", () => { }; } - it("captures pre-turn baseline on turn.started and post-turn checkpoint on turn.completed", async () => { + test("captures pre-turn baseline on turn.started and post-turn checkpoint on turn.completed", async () => { const harness = await createHarness({ seedFilesystemCheckpoints: false }); const createdAt = "2026-01-01T00:00:00.000Z"; @@ -703,7 +706,7 @@ describe("CheckpointReactor", () => { expect(thread.checkpoints[0]?.checkpointTurnCount).toBe(1); }); - it("captures pre-turn and completion checkpoints for claude runtime events", async () => { + test("captures pre-turn and completion checkpoints for claude runtime events", async () => { const harness = await createHarness({ seedFilesystemCheckpoints: false, providerName: ProviderDriverKind.make("claudeAgent"), @@ -764,7 +767,7 @@ describe("CheckpointReactor", () => { ).toBe(true); }); - it("appends capture failure activity when turn diff summary cannot be derived", async () => { + test("appends capture failure activity when turn diff summary cannot be derived", async () => { const harness = await createHarness({ seedFilesystemCheckpoints: false }); const createdAt = "2026-01-01T00:00:00.000Z"; @@ -811,7 +814,7 @@ describe("CheckpointReactor", () => { ).toBe(true); }); - it("captures pre-turn baseline from project workspace root when thread worktree is unset", async () => { + test("captures pre-turn baseline from project workspace root when thread worktree is unset", async () => { const harness = await createHarness({ hasSession: false, seedFilesystemCheckpoints: false, @@ -848,7 +851,7 @@ describe("CheckpointReactor", () => { ).toBe("v1\n"); }); - it("captures turn completion checkpoint from project workspace root when provider session cwd is unavailable", async () => { + test("captures turn completion checkpoint from project workspace root when provider session cwd is unavailable", async () => { const harness = await createHarness({ hasSession: false, seedFilesystemCheckpoints: false, @@ -899,7 +902,7 @@ describe("CheckpointReactor", () => { ).toBe("v2\n"); }); - it("ignores non-v2 checkpoint.captured runtime events", async () => { + test("ignores non-v2 checkpoint.captured runtime events", async () => { const harness = await createHarness(); const createdAt = "2026-01-01T00:00:00.000Z"; @@ -941,9 +944,9 @@ describe("CheckpointReactor", () => { ); }); - it("continues processing runtime events after a single checkpoint runtime failure", async () => { - const nonRepositorySessionCwd = NodeFS.mkdtempSync( - NodePath.join(NodeOS.tmpdir(), "t3-checkpoint-runtime-non-repo-"), + test("continues processing runtime events after a single checkpoint runtime failure", async () => { + const nonRepositorySessionCwd = fs.mkdtempSync( + path.join(os.tmpdir(), "t3-checkpoint-runtime-non-repo-"), ); tempDirs.push(nonRepositorySessionCwd); @@ -1001,7 +1004,7 @@ describe("CheckpointReactor", () => { ).toBe(true); }); - it("executes provider revert and emits thread.reverted for checkpoint revert requests", async () => { + test("executes provider revert and emits thread.reverted for checkpoint revert requests", async () => { const harness = await createHarness(); const createdAt = "2026-01-01T00:00:00.000Z"; @@ -1082,9 +1085,9 @@ describe("CheckpointReactor", () => { ).toBe(false); }); - it("executes provider revert and emits thread.reverted for claude sessions", async () => { - const harness = await createHarness({ providerName: ProviderDriverKind.make("claudeAgent") }); - const createdAt = "2026-01-01T00:00:00.000Z"; + test("executes provider revert and emits thread.reverted for claude sessions", async () => { + const harness = await createHarness({ providerName: "claudeAgent" }); + const createdAt = new Date().toISOString(); await Effect.runPromise( harness.engine.dispatch({ @@ -1151,7 +1154,7 @@ describe("CheckpointReactor", () => { }); }); - it("processes consecutive revert requests with deterministic rollback sequencing", async () => { + test("processes consecutive revert requests with deterministic rollback sequencing", async () => { const harness = await createHarness(); const createdAt = "2026-01-01T00:00:00.000Z"; @@ -1234,7 +1237,7 @@ describe("CheckpointReactor", () => { }); }); - it("appends an error activity when revert is requested without an active session", async () => { + test("appends an error activity when revert is requested without an active session", async () => { const harness = await createHarness({ hasSession: false }); const createdAt = "2026-01-01T00:00:00.000Z"; diff --git a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts index 2b4d377160..e2e01fd544 100644 --- a/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts +++ b/apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts @@ -21,16 +21,8 @@ import { ThreadId, TurnId, } from "@t3tools/contracts"; -import * as Effect from "effect/Effect"; -import * as Deferred from "effect/Deferred"; -import * as Exit from "effect/Exit"; -import * as Layer from "effect/Layer"; -import * as ManagedRuntime from "effect/ManagedRuntime"; -import * as PubSub from "effect/PubSub"; -import * as Scope from "effect/Scope"; -import * as Stream from "effect/Stream"; -import { it as effectIt } from "@effect/vitest"; -import { afterEach, describe, expect, it, vi } from "vite-plus/test"; +import { Deferred, Effect, Exit, Layer, ManagedRuntime, PubSub, Scope, Stream } from "effect"; +import { afterEach, describe, expect, it, vi } from "vitest"; import { deriveServerPaths, ServerConfig } from "../../config.ts"; import { TextGenerationError } from "@t3tools/contracts"; @@ -552,115 +544,58 @@ describe("ProviderCommandReactor", () => { expect(thread?.session?.runtimeMode).toBe("approval-required"); }); - effectIt.effect("projects starting before a slow provider session finishes", () => - Effect.gen(function* () { - const releaseStart = yield* Deferred.make(); - const harness = yield* Effect.promise(() => - createHarness({ - startSessionEffect: (session) => Deferred.await(releaseStart).pipe(Effect.as(session)), - }), - ); - const now = "2026-01-01T00:00:00.000Z"; + it("records session lastError and clears active turn when provider turn start fails", async () => { + const harness = await createHarness(); + const now = new Date().toISOString(); - yield* harness.engine.dispatch({ + harness.sendTurn.mockImplementation( + () => + Effect.fail( + new ProviderAdapterRequestError({ + provider: "cursor", + method: "session/set_config_option", + detail: 'Invalid value for session config option "model"', + }), + ) as never, + ); + + await Effect.runPromise( + harness.engine.dispatch({ type: "thread.turn.start", - commandId: CommandId.make("cmd-turn-start-slow-provider"), + commandId: CommandId.make("cmd-turn-start-session-error"), threadId: ThreadId.make("thread-1"), message: { - messageId: asMessageId("user-message-slow-provider"), + messageId: asMessageId("user-message-session-error"), role: "user", - text: "start slowly", + text: "hello", attachments: [], }, interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, runtimeMode: "approval-required", createdAt: now, - }); + }), + ); - yield* Effect.promise(() => waitFor(() => harness.startSession.mock.calls.length === 1)); - const duringStartup = yield* Effect.promise(() => harness.readModel()); - expect( - duringStartup.threads.find((entry) => entry.id === ThreadId.make("thread-1"))?.session - ?.status, - ).toBe("starting"); - expect(harness.sendTurn).not.toHaveBeenCalled(); - - yield* Deferred.succeed(releaseStart, undefined); - yield* Effect.promise(() => waitFor(() => harness.sendTurn.mock.calls.length === 1)); - }), - ); - - effectIt.effect("settles a failed provider startup and allows a clean retry", () => - Effect.gen(function* () { - let failStartup = true; - const harness = yield* Effect.promise(() => - createHarness({ - startSessionEffect: (session) => - failStartup - ? Effect.fail( - new ProviderAdapterRequestError({ - provider: "codex", - method: "thread.start", - detail: "deterministic startup failure", - }), - ) - : Effect.succeed(session), - }), + await waitFor(async () => { + const readModel = await Effect.runPromise(harness.engine.getReadModel()); + const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); + return ( + thread?.session?.lastError === + 'Provider adapter request failed (cursor) for session/set_config_option: Invalid value for session config option "model"' && + thread?.session?.status === "ready" && + thread?.session?.activeTurnId === null ); - const now = "2026-01-01T00:00:00.000Z"; + }); - yield* harness.engine.dispatch({ - type: "thread.turn.start", - commandId: CommandId.make("cmd-turn-start-provider-failure"), - threadId: ThreadId.make("thread-1"), - message: { - messageId: asMessageId("user-message-provider-failure"), - role: "user", - text: "fail once", - attachments: [], - }, - interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, - runtimeMode: "approval-required", - createdAt: now, - }); - - yield* Effect.promise(() => - waitFor(async () => { - const readModel = await harness.readModel(); - return ( - readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1"))?.session - ?.status === "error" - ); - }), - ); - let readModel = yield* Effect.promise(() => harness.readModel()); - let thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); - expect(thread?.session?.lastError).toContain("deterministic startup failure"); - expect(harness.sendTurn).not.toHaveBeenCalled(); - - failStartup = false; - yield* harness.engine.dispatch({ - type: "thread.turn.start", - commandId: CommandId.make("cmd-turn-start-provider-retry"), - threadId: ThreadId.make("thread-1"), - message: { - messageId: asMessageId("user-message-provider-retry"), - role: "user", - text: "retry", - attachments: [], - }, - interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, - runtimeMode: "approval-required", - createdAt: "2026-01-01T00:00:01.000Z", - }); - - yield* Effect.promise(() => waitFor(() => harness.sendTurn.mock.calls.length === 1)); - readModel = yield* Effect.promise(() => harness.readModel()); - thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); - expect(thread?.session?.status).toBe("starting"); - expect(thread?.session?.lastError).toBeNull(); - }), - ); + const readModel = await Effect.runPromise(harness.engine.getReadModel()); + const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); + expect(thread?.session).toMatchObject({ + status: "ready", + activeTurnId: null, + lastError: + 'Provider adapter request failed (cursor) for session/set_config_option: Invalid value for session config option "model"', + }); + }); it("generates a thread title on the first turn", async () => { const harness = await createHarness(); @@ -2112,6 +2047,63 @@ describe("ProviderCommandReactor", () => { }); }); + it("switches cursor model in-session without restarting", async () => { + const harness = await createHarness({ + threadModelSelection: { provider: "cursor", model: "composer-2" }, + }); + const now = new Date().toISOString(); + + await Effect.runPromise( + harness.engine.dispatch({ + type: "thread.turn.start", + commandId: CommandId.make("cmd-turn-start-cursor-model-1"), + threadId: ThreadId.make("thread-1"), + message: { + messageId: asMessageId("user-message-cursor-model-1"), + role: "user", + text: "first cursor turn", + attachments: [], + }, + modelSelection: { provider: "cursor", model: "composer-2" }, + interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, + runtimeMode: "approval-required", + createdAt: now, + }), + ); + + await waitFor(() => harness.startSession.mock.calls.length === 1); + await waitFor(() => harness.sendTurn.mock.calls.length === 1); + + await Effect.runPromise( + harness.engine.dispatch({ + type: "thread.turn.start", + commandId: CommandId.make("cmd-turn-start-cursor-model-2"), + threadId: ThreadId.make("thread-1"), + message: { + messageId: asMessageId("user-message-cursor-model-2"), + role: "user", + text: "second cursor turn", + attachments: [], + }, + modelSelection: { + provider: "cursor", + model: "composer-2", + options: { fastMode: true }, + }, + interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, + runtimeMode: "approval-required", + createdAt: now, + }), + ); + + await waitFor(() => harness.sendTurn.mock.calls.length === 2); + + expect(harness.startSession.mock.calls.length).toBe(1); + expect(harness.sendTurn.mock.calls[1]?.[0]).toMatchObject({ + modelSelection: { provider: "cursor", model: "composer-2", options: { fastMode: true } }, + }); + }); + it("restarts the provider session when runtime mode is updated on the thread", async () => { const harness = await createHarness(); const now = "2026-01-01T00:00:00.000Z"; @@ -2486,37 +2478,30 @@ describe("ProviderCommandReactor", () => { }); }); - it("starts a fresh session when only projected session state exists", async () => { + it("preserves provider method context when turn start fails", async () => { const harness = await createHarness(); const now = "2026-01-01T00:00:00.000Z"; - await Effect.runPromise( - harness.engine.dispatch({ - type: "thread.session.set", - commandId: CommandId.make("cmd-session-set-stale"), - threadId: ThreadId.make("thread-1"), - session: { - threadId: ThreadId.make("thread-1"), - status: "ready", - providerName: "codex", - runtimeMode: "approval-required", - activeTurnId: null, - lastError: null, - updatedAt: now, - }, - createdAt: now, - }), + harness.sendTurn.mockImplementation( + () => + Effect.fail( + new ProviderAdapterRequestError({ + provider: "cursor", + method: "session/set_config_option", + detail: "Invalid cursor/set_config_option payload: Expected string, got null", + }), + ) as never, ); await Effect.runPromise( harness.engine.dispatch({ type: "thread.turn.start", - commandId: CommandId.make("cmd-turn-start-stale"), + commandId: CommandId.make("cmd-turn-start-provider-error"), threadId: ThreadId.make("thread-1"), message: { - messageId: asMessageId("user-message-stale"), + messageId: asMessageId("user-message-provider-error"), role: "user", - text: "resume codex", + text: "hello", attachments: [], }, interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, @@ -2525,19 +2510,73 @@ describe("ProviderCommandReactor", () => { }), ); - await waitFor(() => harness.startSession.mock.calls.length === 1); - await waitFor(() => harness.sendTurn.mock.calls.length === 1); - - expect(harness.startSession.mock.calls[0]?.[1]).toMatchObject({ - threadId: ThreadId.make("thread-1"), - modelSelection: { - instanceId: ProviderInstanceId.make("codex"), - model: "gpt-5-codex", - }, - runtimeMode: "approval-required", + await waitFor(async () => { + const readModel = await Effect.runPromise(harness.engine.getReadModel()); + const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); + return ( + thread?.activities.some((activity) => activity.kind === "provider.turn.start.failed") ?? + false + ); }); - expect(harness.sendTurn.mock.calls[0]?.[0]).toMatchObject({ - threadId: ThreadId.make("thread-1"), + + const readModel = await Effect.runPromise(harness.engine.getReadModel()); + const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); + expect( + thread?.activities.find((activity) => activity.kind === "provider.turn.start.failed"), + ).toMatchObject({ + payload: { + detail: expect.stringContaining( + "Provider adapter request failed (cursor) for session/set_config_option", + ), + }, + }); + }); + + it("keeps the full rendered cause for non-adapter turn start failures", async () => { + const harness = await createHarness(); + const now = new Date().toISOString(); + + harness.sendTurn.mockImplementation( + () => + Effect.fail( + new Error("Invalid params", { cause: new Error("session/prompt failed") }), + ) as never, + ); + + await Effect.runPromise( + harness.engine.dispatch({ + type: "thread.turn.start", + commandId: CommandId.make("cmd-turn-start-raw-error"), + threadId: ThreadId.make("thread-1"), + message: { + messageId: asMessageId("user-message-raw-error"), + role: "user", + text: "hello", + attachments: [], + }, + interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, + runtimeMode: "approval-required", + createdAt: now, + }), + ); + + await waitFor(async () => { + const readModel = await Effect.runPromise(harness.engine.getReadModel()); + const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); + return ( + thread?.activities.some((activity) => activity.kind === "provider.turn.start.failed") ?? + false + ); + }); + + const readModel = await Effect.runPromise(harness.engine.getReadModel()); + const thread = readModel.threads.find((entry) => entry.id === ThreadId.make("thread-1")); + expect( + thread?.activities.find((activity) => activity.kind === "provider.turn.start.failed"), + ).toMatchObject({ + payload: { + detail: expect.stringContaining("session/prompt failed"), + }, }); }); @@ -2653,6 +2692,60 @@ describe("ProviderCommandReactor", () => { }); }); + it("processes approval responses while a provider turn is still in flight", async () => { + const harness = await createHarness(); + const now = new Date().toISOString(); + const unblockSendTurn = Effect.runSync(Deferred.make()); + + harness.sendTurn.mockImplementation(() => + Deferred.await(unblockSendTurn).pipe( + Effect.as({ + threadId: ThreadId.make("thread-1"), + turnId: asTurnId("turn-1"), + }), + ), + ); + + await Effect.runPromise( + harness.engine.dispatch({ + type: "thread.turn.start", + commandId: CommandId.make("cmd-turn-start-blocked-approval"), + threadId: ThreadId.make("thread-1"), + message: { + messageId: asMessageId("user-message-blocked-approval"), + role: "user", + text: "need approval while turn is running", + attachments: [], + }, + interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE, + runtimeMode: "approval-required", + createdAt: now, + }), + ); + + await waitFor(() => harness.sendTurn.mock.calls.length === 1); + + await Effect.runPromise( + harness.engine.dispatch({ + type: "thread.approval.respond", + commandId: CommandId.make("cmd-approval-respond-during-send-turn"), + threadId: ThreadId.make("thread-1"), + requestId: asApprovalRequestId("approval-request-while-send-turn-blocked"), + decision: "acceptForSession", + createdAt: now, + }), + ); + + await waitFor(() => harness.respondToRequest.mock.calls.length === 1); + expect(harness.respondToRequest.mock.calls[0]?.[0]).toEqual({ + threadId: "thread-1", + requestId: "approval-request-while-send-turn-blocked", + decision: "acceptForSession", + }); + + await Effect.runPromise(Deferred.succeed(unblockSendTurn, undefined)); + }); + it("reacts to thread.user-input.respond by forwarding structured user input answers", async () => { const harness = await createHarness(); const now = "2026-01-01T00:00:00.000Z"; diff --git a/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts b/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts index ff63979717..63ee192abb 100644 --- a/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts +++ b/apps/server/src/orchestration/Layers/ProviderCommandReactor.ts @@ -248,7 +248,7 @@ function findProviderAdapterRequestError( function isUnknownPendingApprovalRequestError(cause: Cause.Cause): boolean { const error = findProviderAdapterRequestError(cause); - if (error) { + if (Schema.is(ProviderAdapterRequestError)(error)) { const detail = error.detail.toLowerCase(); return ( detail.includes("unknown pending approval request") || @@ -264,13 +264,8 @@ function isUnknownPendingApprovalRequestError(cause: Cause.Cause): boolean { const error = findProviderAdapterRequestError(cause); - if (error) { - const detail = error.detail.toLowerCase(); - return ( - detail.includes("unknown pending user-input request") || - detail.includes("unknown pending user input request") || - detail.includes("unknown pending codex user input request") - ); + if (Schema.is(ProviderAdapterRequestError)(error)) { + return error.detail.toLowerCase().includes("unknown pending user-input request"); } const message = Cause.pretty(cause).toLowerCase(); return ( @@ -384,7 +379,7 @@ const make = Effect.gen(function* () { ? failReason.error : undefined; if (providerError) { - return providerError.detail; + return providerError.message; } return Cause.pretty(cause); }; @@ -664,9 +659,13 @@ const make = Effect.gen(function* () { thread.session && thread.session.status !== "stopped" && activeSession ? thread.id : null; if (existingSessionThreadId) { const runtimeModeChanged = thread.runtimeMode !== thread.session?.runtimeMode; - const cwdChanged = effectiveCwd !== activeSession?.cwd; - const sessionModelSwitch = (yield* providerService.getCapabilities(desiredInstanceId)) - .sessionModelSwitch; + const providerChanged = + requestedModelSelection !== undefined && + requestedModelSelection.provider !== currentProvider; + const sessionModelSwitch = + currentProvider === undefined + ? "in-session" + : (yield* providerService.getCapabilities(currentProvider)).sessionModelSwitch; const modelChanged = requestedModelSelection !== undefined && requestedModelSelection.model !== activeSession?.model; @@ -682,17 +681,14 @@ const make = Effect.gen(function* () { if ( !runtimeModeChanged && - !cwdChanged && - !instanceChanged && + !providerChanged && !shouldRestartForModelChange && !shouldRestartForModelSelectionChange ) { return existingSessionThreadId; } - const resumeCursor = shouldRestartForModelChange - ? undefined - : (activeSession?.resumeCursor ?? undefined); + const resumeCursor = providerChanged ? undefined : (activeSession?.resumeCursor ?? undefined); yield* Effect.logInfo("provider command reactor restarting provider session", { threadId, existingSessionThreadId, @@ -703,9 +699,7 @@ const make = Effect.gen(function* () { currentRuntimeMode: thread.session?.runtimeMode, desiredRuntimeMode: thread.runtimeMode, runtimeModeChanged, - previousCwd: activeSession?.cwd, - desiredCwd: effectiveCwd, - cwdChanged, + providerChanged, modelChanged, instanceChanged, shouldRestartForModelChange, @@ -1126,9 +1120,6 @@ const make = Effect.gen(function* () { } const handleTurnStartFailure = (cause: Cause.Cause) => { - if (Cause.hasInterruptsOnly(cause)) { - return Effect.void; - } const detail = formatFailureDetail(cause); return setThreadSessionErrorOnTurnStartFailure({ threadId: event.payload.threadId, @@ -1145,22 +1136,9 @@ const make = Effect.gen(function* () { createdAt: event.payload.createdAt, }), ), - Effect.asVoid, ); }; - const recoverTurnStartFailure = (cause: Cause.Cause) => - handleTurnStartFailure(cause).pipe( - Effect.catchCause((recoveryCause) => - Effect.logWarning("provider command reactor failed to recover turn start failure", { - eventType: event.type, - threadId: event.payload.threadId, - cause: Cause.pretty(recoveryCause), - originalCause: Cause.pretty(cause), - }), - ), - ); - const sendTurnRequest = yield* buildSendTurnRequestForThread({ threadId: event.payload.threadId, messageText: message.text, @@ -1181,7 +1159,7 @@ const make = Effect.gen(function* () { yield* providerService .sendTurn(sendTurnRequest.value) - .pipe(Effect.catchCause(recoverTurnStartFailure), Effect.forkScoped); + .pipe(Effect.catchCause(handleTurnStartFailure), Effect.forkScoped); }); const processTurnInterruptRequested = Effect.fn("processTurnInterruptRequested")(function* ( diff --git a/apps/server/src/provider/Layers/ClaudeProvider.ts b/apps/server/src/provider/Layers/ClaudeProvider.ts index 0e019f003c..83bafae4a3 100644 --- a/apps/server/src/provider/Layers/ClaudeProvider.ts +++ b/apps/server/src/provider/Layers/ClaudeProvider.ts @@ -12,14 +12,8 @@ import * as Option from "effect/Option"; import * as Path from "effect/Path"; import * as Result from "effect/Result"; import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; -import { - createModelCapabilities, - getModelSelectionStringOptionValue, - getProviderOptionCurrentValue, - getProviderOptionDescriptors, -} from "@t3tools/shared/model"; -import { resolveSpawnCommand } from "@t3tools/shared/shell"; -import { compareSemverVersions } from "@t3tools/shared/semver"; +import { resolveApiModelId } from "@t3tools/shared/model"; +import { decodeJsonResult } from "@t3tools/shared/schemaJson"; import { query as claudeQuery, type Options as ClaudeQueryOptions, @@ -383,79 +377,50 @@ export function getClaudeModelCapabilities(model: string | null | undefined): Mo ); } -export function resolveClaudeEffort( - caps: ModelCapabilities, - raw: string | null | undefined, -): string | undefined { - const descriptors = getProviderOptionDescriptors({ - caps, - ...(raw ? { selections: [{ id: "effort", value: raw }] } : {}), +function buildInitialClaudeProviderSnapshot(claudeSettings: ClaudeSettings): ServerProvider { + const checkedAt = new Date().toISOString(); + const models = providerModelsFromSettings( + BUILT_IN_MODELS, + PROVIDER, + claudeSettings.customModels, + DEFAULT_CLAUDE_MODEL_CAPABILITIES, + ); + + if (!claudeSettings.enabled) { + return buildServerProvider({ + provider: PROVIDER, + enabled: false, + checkedAt, + models, + slashCommands: [], + probe: { + installed: false, + version: null, + status: "warning", + auth: { status: "unknown" }, + message: "Claude is disabled in T3 Code settings.", + }, + }); + } + + return buildServerProvider({ + provider: PROVIDER, + enabled: true, + checkedAt, + models, + slashCommands: [], + probe: { + installed: true, + version: null, + status: "warning", + auth: { status: "unknown" }, + message: "Checking Claude availability...", + }, }); - const effortDescriptor = descriptors.find((descriptor) => descriptor.id === "effort"); - const value = getProviderOptionCurrentValue(effortDescriptor); - return typeof value === "string" ? value : undefined; } -/** - * Normalize a resolved Claude effort value into one suitable for the Claude - * CLI's `--effort` flag. - * - * Mirrors the mapping used when invoking the Claude Agent SDK - * ({@link getEffectiveClaudeAgentEffort} in ClaudeAdapter): `ultracode` is a - * Claude Code setting that pairs with `xhigh`, `ultrathink` is filtered out - * because it is a prompt-prefix mode, and older model compatibility mappings - * are preserved for current Claude Code behavior. - */ -export function normalizeClaudeCliEffort( - effort: string | null | undefined, - model: string | null | undefined, -): string | undefined { - if (!effort || effort === "ultrathink") { - return undefined; - } - if (effort === "ultracode") { - return "xhigh"; - } - if ( - effort === "xhigh" && - model !== "claude-fable-5" && - model !== "claude-opus-5" && - model !== "claude-opus-4-8" && - model !== "claude-sonnet-5" - ) { - return "max"; - } - if (effort === "max" && model === "claude-sonnet-4-6") { - return "high"; - } - return effort; -} - -export function isClaudeUltracodeEffort(effort: string | null | undefined): boolean { - return effort === "ultracode"; -} - -export function resolveClaudeContextWindow( - modelSelection: ModelSelection | undefined, -): string | undefined { - const caps = getClaudeModelCapabilities(modelSelection?.model); - const raw = getModelSelectionStringOptionValue(modelSelection, "contextWindow"); - const descriptors = getProviderOptionDescriptors({ - caps, - ...(raw ? { selections: [{ id: "contextWindow", value: raw }] } : {}), - }); - const descriptor = descriptors.find((candidate) => candidate.id === "contextWindow"); - const value = getProviderOptionCurrentValue(descriptor); - return typeof value === "string" ? value : undefined; -} - -export function resolveClaudeApiModelId(modelSelection: ModelSelection): string { - switch (resolveClaudeContextWindow(modelSelection)) { - case "1m": - return `${modelSelection.model}[1m]`; - default: - return modelSelection.model; - } +export function resolveClaudeApiModelId(modelSelection: ClaudeModelSelection): string { + return resolveApiModelId(modelSelection); } function toTitleCaseWords(value: string): string { @@ -1002,4 +967,43 @@ export const makePendingClaudeProvider = ( }); }); -export { probeClaudeCapabilities }; +export const ClaudeProviderLive = Layer.effect( + ClaudeProvider, + Effect.gen(function* () { + const serverSettings = yield* ServerSettingsService; + const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; + + const subscriptionProbeCache = yield* Cache.make({ + capacity: 1, + timeToLive: Duration.minutes(5), + lookup: (binaryPath: string) => probeClaudeCapabilities(binaryPath), + }); + + const checkProvider = checkClaudeProviderStatus( + (binaryPath) => + Cache.get(subscriptionProbeCache, binaryPath).pipe( + Effect.map((probe) => probe?.subscriptionType), + ), + (binaryPath) => + Cache.get(subscriptionProbeCache, binaryPath).pipe( + Effect.map((probe) => probe?.slashCommands), + ), + ).pipe( + Effect.provideService(ServerSettingsService, serverSettings), + Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner), + ); + + return yield* makeManagedServerProvider({ + getSettings: serverSettings.getSettings.pipe( + Effect.map((settings) => settings.providers.claudeAgent), + Effect.orDie, + ), + streamSettings: serverSettings.streamChanges.pipe( + Stream.map((settings) => settings.providers.claudeAgent), + ), + haveSettingsChanged: (previous, next) => !Equal.equals(previous, next), + buildInitialSnapshot: buildInitialClaudeProviderSnapshot, + checkProvider, + }); + }), +); diff --git a/apps/server/src/provider/Layers/CodexAdapter.test.ts b/apps/server/src/provider/Layers/CodexAdapter.test.ts index 7b8fbec566..0cc5a635bc 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.test.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.test.ts @@ -22,17 +22,7 @@ import { createModelSelection } from "@t3tools/shared/model"; import * as NodeServices from "@effect/platform-node/NodeServices"; import { it, vi } from "@effect/vitest"; -import * as Context from "effect/Context"; -import * as Effect from "effect/Effect"; -import * as Exit from "effect/Exit"; -import * as Fiber from "effect/Fiber"; -import * as Layer from "effect/Layer"; -import * as Option from "effect/Option"; -import * as Queue from "effect/Queue"; -import * as Schema from "effect/Schema"; -import * as Scope from "effect/Scope"; -import * as Stream from "effect/Stream"; -import * as CodexErrors from "effect-codex-app-server/errors"; +import { Effect, Fiber, Layer, Option, Queue, Stream } from "effect"; import { ServerConfig } from "../../config.ts"; import { ServerSettingsService } from "../../serverSettings.ts"; @@ -44,14 +34,8 @@ import { type CodexSessionRuntimeSendTurnInput, type CodexSessionRuntimeShape, type CodexThreadSnapshot, -} from "./CodexSessionRuntime.ts"; -import { makeCodexAdapter } from "./CodexAdapter.ts"; -const decodeCodexSettings = Schema.decodeSync(CodexSettings); - -// Test-local service tag so the rest of the file can keep using `yield* CodexAdapter`. -class CodexAdapter extends Context.Service()( - "t3/provider/Layers/CodexAdapter.test/CodexAdapter", -) {} +} from "../codex/CodexSessionRuntime.ts"; +import { makeCodexAdapterLive } from "./CodexAdapter.ts"; const asThreadId = (value: string): ThreadId => ThreadId.make(value); const asTurnId = (value: string): TurnId => TurnId.make(value); @@ -60,11 +44,11 @@ const asItemId = (value: string): ProviderItemId => ProviderItemId.make(value); class FakeCodexRuntime implements CodexSessionRuntimeShape { private readonly eventQueue = Effect.runSync(Queue.unbounded()); - private readonly now = "2026-01-01T00:00:00.000Z"; + private readonly now = new Date().toISOString(); public readonly startImpl = vi.fn(() => Promise.resolve({ - provider: ProviderDriverKind.make("codex"), + provider: "codex" as const, status: "ready" as const, runtimeMode: this.options.runtimeMode, threadId: this.options.threadId, @@ -176,41 +160,6 @@ function makeRuntimeFactory() { }; } -function makeScopedRuntimeFactory(options?: { readonly failConstruction?: boolean }) { - const runtimes: Array = []; - const releasedThreadIds: Array = []; - - const factory = vi.fn((runtimeOptions: CodexSessionRuntimeOptions) => - Effect.gen(function* () { - yield* Scope.Scope; - yield* Effect.addFinalizer(() => - Effect.sync(() => { - releasedThreadIds.push(runtimeOptions.threadId); - }), - ); - - if (options?.failConstruction) { - return yield* new CodexErrors.CodexAppServerSpawnError({ - command: `${runtimeOptions.binaryPath} app-server`, - cause: new Error("runtime construction failed"), - }); - } - - const runtime = new FakeCodexRuntime(runtimeOptions); - runtimes.push(runtime); - return runtime; - }), - ); - - return { - factory, - releasedThreadIds, - get lastRuntime(): FakeCodexRuntime | undefined { - return runtimes.at(-1); - }, - }; -} - const providerSessionDirectoryTestLayer = Layer.succeed(ProviderSessionDirectory, { upsert: () => Effect.void, getProvider: () => @@ -222,15 +171,7 @@ const providerSessionDirectoryTestLayer = Layer.succeed(ProviderSessionDirectory const validationRuntimeFactory = makeRuntimeFactory(); const validationLayer = it.layer( - Layer.effect( - CodexAdapter, - Effect.gen(function* () { - const codexConfig = decodeCodexSettings({}); - return yield* makeCodexAdapter(codexConfig, { - makeRuntime: validationRuntimeFactory.factory, - }); - }), - ).pipe( + makeCodexAdapterLive({ makeRuntime: validationRuntimeFactory.factory }).pipe( Layer.provideMerge(ServerConfig.layerTest(process.cwd(), process.cwd())), Layer.provideMerge(ServerSettingsService.layerTest()), Layer.provideMerge(providerSessionDirectoryTestLayer), @@ -259,7 +200,7 @@ validationLayer("CodexAdapterLive validation", (it) => { issue: "Expected provider 'codex' but received 'claudeAgent'.", }), ); - NodeAssert.equal(validationRuntimeFactory.factory.mock.calls.length, 0); + assert.equal(validationRuntimeFactory.factory.mock.calls.length, 0); }), ); it.effect("maps codex model options before starting a session", () => @@ -276,13 +217,11 @@ validationLayer("CodexAdapterLive validation", (it) => { runtimeMode: "full-access", }); - NodeAssert.deepStrictEqual(validationRuntimeFactory.factory.mock.calls[0]?.[0], { + assert.deepStrictEqual(validationRuntimeFactory.factory.mock.calls[0]?.[0], { binaryPath: "codex", cwd: process.cwd(), - launchArgs: "", model: "gpt-5.3-codex", - providerInstanceId: ProviderInstanceId.make("codex"), - serviceTier: "priority", + serviceTier: "fast", threadId: asThreadId("thread-1"), runtimeMode: "full-access", }); @@ -292,15 +231,7 @@ validationLayer("CodexAdapterLive validation", (it) => { const sessionRuntimeFactory = makeRuntimeFactory(); const sessionErrorLayer = it.layer( - Layer.effect( - CodexAdapter, - Effect.gen(function* () { - const codexConfig = decodeCodexSettings({}); - return yield* makeCodexAdapter(codexConfig, { - makeRuntime: sessionRuntimeFactory.factory, - }); - }), - ).pipe( + makeCodexAdapterLive({ makeRuntime: sessionRuntimeFactory.factory }).pipe( Layer.provideMerge(ServerConfig.layerTest(process.cwd(), process.cwd())), Layer.provideMerge(ServerSettingsService.layerTest()), Layer.provideMerge(providerSessionDirectoryTestLayer), @@ -320,10 +251,10 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => { }) .pipe(Effect.result); - NodeAssert.equal(result._tag, "Failure"); - NodeAssert.equal(result.failure._tag, "ProviderAdapterSessionNotFoundError"); - NodeAssert.equal(result.failure.provider, "codex"); - NodeAssert.equal(result.failure.threadId, "sess-missing"); + assert.equal(result._tag, "Failure"); + assert.equal(result.failure._tag, "ProviderAdapterSessionNotFoundError"); + assert.equal(result.failure.provider, "codex"); + assert.equal(result.failure.threadId, "sess-missing"); }), ); @@ -331,12 +262,12 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => { Effect.gen(function* () { const adapter = yield* CodexAdapter; yield* adapter.startSession({ - provider: ProviderDriverKind.make("codex"), + provider: "codex", threadId: asThreadId("sess-missing"), runtimeMode: "full-access", }); const runtime = sessionRuntimeFactory.lastRuntime; - NodeAssert.ok(runtime); + assert.ok(runtime); runtime.sendTurnImpl.mockClear(); yield* Effect.ignore( @@ -351,7 +282,7 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => { }), ); - NodeAssert.deepStrictEqual(runtime.sendTurnImpl.mock.calls[0]?.[0], { + assert.deepStrictEqual(runtime.sendTurnImpl.mock.calls[0]?.[0], { input: "hello", model: "gpt-5.3-codex", effort: "high", @@ -481,15 +412,7 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => { const lifecycleRuntimeFactory = makeRuntimeFactory(); const lifecycleLayer = it.layer( - Layer.effect( - CodexAdapter, - Effect.gen(function* () { - const codexConfig = decodeCodexSettings({}); - return yield* makeCodexAdapter(codexConfig, { - makeRuntime: lifecycleRuntimeFactory.factory, - }); - }), - ).pipe( + makeCodexAdapterLive({ makeRuntime: lifecycleRuntimeFactory.factory }).pipe( Layer.provideMerge(ServerConfig.layerTest(process.cwd(), process.cwd())), Layer.provideMerge(ServerSettingsService.layerTest()), Layer.provideMerge(providerSessionDirectoryTestLayer), @@ -501,12 +424,12 @@ function startLifecycleRuntime() { return Effect.gen(function* () { const adapter = yield* CodexAdapter; yield* adapter.startSession({ - provider: ProviderDriverKind.make("codex"), + provider: "codex", threadId: asThreadId("thread-1"), runtimeMode: "full-access", }); const runtime = lifecycleRuntimeFactory.lastRuntime; - NodeAssert.ok(runtime); + assert.ok(runtime); return { adapter, runtime }; }); } @@ -527,7 +450,6 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { turnId: asTurnId("turn-1"), itemId: asItemId("msg_1"), payload: { - completedAtMs: 1_778_000_000_000, threadId: "thread-1", turnId: "turn-1", item: { @@ -628,7 +550,6 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { turnId: asTurnId("turn-1"), itemId: asItemId("plan_1"), payload: { - completedAtMs: 1_778_000_000_000, threadId: "thread-1", turnId: "turn-1", item: { @@ -796,40 +717,6 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { ); it.effect("maps realtime started notifications with upstream realtime session ids", () => - Effect.gen(function* () { - const { adapter, runtime } = yield* startLifecycleRuntime(); - const firstEventFiber = yield* Stream.runHead(adapter.streamEvents).pipe(Effect.forkChild); - - yield* runtime.emit({ - id: asEventId("evt-realtime-started"), - kind: "notification", - provider: ProviderDriverKind.make("codex"), - threadId: asThreadId("thread-1"), - createdAt: "2026-01-01T00:00:00.000Z", - method: "thread/realtime/started", - payload: { - threadId: "thread-1", - realtimeSessionId: "realtime-session-1", - version: "v2", - }, - } satisfies ProviderEvent); - - const firstEvent = yield* Fiber.join(firstEventFiber); - - NodeAssert.equal(firstEvent._tag, "Some"); - if (firstEvent._tag !== "Some") { - return; - } - NodeAssert.equal(firstEvent.value.type, "thread.realtime.started"); - if (firstEvent.value.type !== "thread.realtime.started") { - return; - } - NodeAssert.equal(firstEvent.value.threadId, "thread-1"); - NodeAssert.equal(firstEvent.value.payload.realtimeSessionId, "realtime-session-1"); - }), - ); - - it.effect("maps fatal websocket stderr notifications to runtime.error", () => Effect.gen(function* () { const { adapter, runtime } = yield* startLifecycleRuntime(); const firstEventFiber = yield* Stream.runHead(adapter.streamEvents).pipe(Effect.forkChild); @@ -1072,9 +959,9 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { const events = Array.from(yield* Fiber.join(eventsFiber)); NodeAssert.equal(events[0]?.type, "user-input.requested"); if (events[0]?.type === "user-input.requested") { - NodeAssert.equal(events[0].requestId, "req-user-input-1"); - NodeAssert.equal(events[0].payload.questions[0]?.id, "sandbox_mode"); - NodeAssert.equal(events[0].payload.questions[0]?.multiSelect, false); + assert.equal(events[0].requestId, "req-user-input-1"); + assert.equal(events[0].payload.questions[0]?.id, "sandbox_mode"); + assert.equal(events[0].payload.questions[0]?.multiSelect, false); } NodeAssert.equal(events[1]?.type, "user-input.resolved"); @@ -1151,155 +1038,3 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { }), ); }); - -const scopedLifecycleRuntimeFactory = makeScopedRuntimeFactory(); -const scopedLifecycleLayer = it.layer( - Layer.effect( - CodexAdapter, - Effect.gen(function* () { - const codexConfig = decodeCodexSettings({}); - return yield* makeCodexAdapter(codexConfig, { - makeRuntime: scopedLifecycleRuntimeFactory.factory, - }); - }), - ).pipe( - Layer.provideMerge(ServerConfig.layerTest(process.cwd(), process.cwd())), - Layer.provideMerge(ServerSettingsService.layerTest()), - Layer.provideMerge(providerSessionDirectoryTestLayer), - Layer.provideMerge(NodeServices.layer), - ), -); - -scopedLifecycleLayer("CodexAdapterLive scoped lifecycle", (it) => { - it.effect("closes the externally owned session scope on stopSession", () => - Effect.gen(function* () { - scopedLifecycleRuntimeFactory.releasedThreadIds.length = 0; - const adapter = yield* CodexAdapter; - - yield* adapter.startSession({ - provider: ProviderDriverKind.make("codex"), - threadId: asThreadId("thread-stop"), - runtimeMode: "full-access", - }); - - const runtime = scopedLifecycleRuntimeFactory.lastRuntime; - NodeAssert.ok(runtime); - - yield* adapter.stopSession(asThreadId("thread-stop")); - - NodeAssert.equal(runtime.closeImpl.mock.calls.length, 1); - NodeAssert.deepStrictEqual(scopedLifecycleRuntimeFactory.releasedThreadIds, [ - asThreadId("thread-stop"), - ]); - NodeAssert.equal(yield* adapter.hasSession(asThreadId("thread-stop")), false); - }), - ); -}); - -const scopedFailureRuntimeFactory = makeScopedRuntimeFactory({ failConstruction: true }); -const scopedFailureLayer = it.layer( - Layer.effect( - CodexAdapter, - Effect.gen(function* () { - const codexConfig = decodeCodexSettings({}); - return yield* makeCodexAdapter(codexConfig, { - makeRuntime: scopedFailureRuntimeFactory.factory, - }); - }), - ).pipe( - Layer.provideMerge(ServerConfig.layerTest(process.cwd(), process.cwd())), - Layer.provideMerge(ServerSettingsService.layerTest()), - Layer.provideMerge(providerSessionDirectoryTestLayer), - Layer.provideMerge(NodeServices.layer), - ), -); - -scopedFailureLayer("CodexAdapterLive scoped startup failure", (it) => { - it.effect("closes the externally owned session scope when startSession fails", () => - Effect.gen(function* () { - scopedFailureRuntimeFactory.releasedThreadIds.length = 0; - const adapter = yield* CodexAdapter; - - const result = yield* adapter - .startSession({ - provider: ProviderDriverKind.make("codex"), - threadId: asThreadId("thread-fail"), - runtimeMode: "full-access", - }) - .pipe(Effect.result); - - NodeAssert.equal(result._tag, "Failure"); - NodeAssert.equal(result.failure._tag, "ProviderAdapterProcessError"); - NodeAssert.deepStrictEqual(scopedFailureRuntimeFactory.releasedThreadIds, [ - asThreadId("thread-fail"), - ]); - NodeAssert.equal(yield* adapter.hasSession(asThreadId("thread-fail")), false); - }), - ); -}); - -it.effect("flushes managed native logs when the adapter layer shuts down", () => - Effect.gen(function* () { - const tempDir = NodeFS.mkdtempSync( - NodePath.join(NodeOS.tmpdir(), "t3-codex-adapter-native-log-"), - ); - const basePath = NodePath.join(tempDir, "provider-native.ndjson"); - const runtimeFactory = makeRuntimeFactory(); - const scope = yield* Scope.make("sequential"); - let scopeClosed = false; - - try { - const layer = Layer.effect( - CodexAdapter, - Effect.gen(function* () { - const codexConfig = decodeCodexSettings({}); - return yield* makeCodexAdapter(codexConfig, { - makeRuntime: runtimeFactory.factory, - nativeEventLogPath: basePath, - }); - }), - ).pipe( - Layer.provideMerge(ServerConfig.layerTest(process.cwd(), process.cwd())), - Layer.provideMerge(ServerSettingsService.layerTest()), - Layer.provideMerge(providerSessionDirectoryTestLayer), - Layer.provideMerge(NodeServices.layer), - ); - const context = yield* Layer.buildWithScope(layer, scope); - const adapter = yield* Effect.service(CodexAdapter).pipe(Effect.provide(context)); - - yield* adapter.startSession({ - provider: ProviderDriverKind.make("codex"), - threadId: asThreadId("thread-logger"), - runtimeMode: "full-access", - }); - - const runtime = runtimeFactory.lastRuntime; - NodeAssert.ok(runtime); - - const firstEventFiber = yield* Stream.runHead(adapter.streamEvents).pipe(Effect.forkChild); - yield* runtime.emit({ - id: asEventId("evt-native-log"), - kind: "notification", - provider: ProviderDriverKind.make("codex"), - threadId: asThreadId("thread-logger"), - createdAt: "2026-01-01T00:00:00.000Z", - method: "process/stderr", - message: "native flush test", - } satisfies ProviderEvent); - yield* Fiber.join(firstEventFiber); - - yield* Scope.close(scope, Exit.void); - scopeClosed = true; - - const threadLogPath = NodePath.join(tempDir, "provider-native.thread-logger.log"); - NodeAssert.equal(NodeFS.existsSync(threadLogPath), true); - const contents = NodeFS.readFileSync(threadLogPath, "utf8"); - NodeAssert.match(contents, /NTIVE: .*"message":"native flush test"/); - } finally { - if (!scopeClosed) { - yield* Scope.close(scope, Exit.void); - } - NodeFS.rmSync(tempDir, { recursive: true, force: true }); - } - }), -); diff --git a/apps/server/src/provider/Layers/CodexAdapter.ts b/apps/server/src/provider/Layers/CodexAdapter.ts index 6b99bf52b1..4f1c835fd5 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.ts @@ -26,23 +26,11 @@ import { ThreadId, ProviderSendTurnInput, } from "@t3tools/contracts"; -import * as Effect from "effect/Effect"; -import * as Crypto from "effect/Crypto"; -import * as Exit from "effect/Exit"; -import * as Fiber from "effect/Fiber"; -import * as FileSystem from "effect/FileSystem"; -import * as Queue from "effect/Queue"; -import * as Schema from "effect/Schema"; -import * as Scope from "effect/Scope"; -import * as Stream from "effect/Stream"; +import { Effect, Fiber, FileSystem, Layer, Queue, Schema, Stream } from "effect"; import { ChildProcessSpawner } from "effect/unstable/process"; import * as CodexErrors from "effect-codex-app-server/errors"; import * as EffectCodexSchema from "effect-codex-app-server/schema"; -import { getModelSelectionStringOptionValue } from "@t3tools/shared/model"; -import { getCodexServiceTierOptionValue } from "../../codexModelOptions.ts"; -import * as McpProviderSession from "../../mcp/McpProviderSession.ts"; - import { ProviderAdapterRequestError, ProviderAdapterProcessError, @@ -51,9 +39,10 @@ import { ProviderAdapterValidationError, type ProviderAdapterError, } from "../Errors.ts"; -import { type CodexAdapterShape } from "../Services/CodexAdapter.ts"; +import { CodexAdapter, type CodexAdapterShape } from "../Services/CodexAdapter.ts"; import { resolveAttachmentPath } from "../../attachmentStore.ts"; import { ServerConfig } from "../../config.ts"; +import { ServerSettingsService } from "../../serverSettings.ts"; import { CodexResumeCursorSchema, CodexSessionRuntimeThreadIdMissingError, @@ -61,7 +50,7 @@ import { type CodexSessionRuntimeError, type CodexSessionRuntimeOptions, type CodexSessionRuntimeShape, -} from "./CodexSessionRuntime.ts"; +} from "../codex/CodexSessionRuntime.ts"; import { type EventNdjsonLogger, makeEventNdjsonLogger } from "./EventNdjsonLogger.ts"; import { resolveCodexLaunchArgs } from "./codexLaunchArgs.ts"; const isCodexAppServerProcessExitedError = Schema.is(CodexErrors.CodexAppServerProcessExitedError); @@ -74,14 +63,12 @@ const isCodexResumeCursorSchema = Schema.is(CodexResumeCursorSchema); const PROVIDER = ProviderDriverKind.make("codex"); export interface CodexAdapterLiveOptions { - readonly instanceId?: ProviderInstanceId; - readonly environment?: NodeJS.ProcessEnv; readonly makeRuntime?: ( options: CodexSessionRuntimeOptions, ) => Effect.Effect< CodexSessionRuntimeShape, CodexSessionRuntimeError, - ChildProcessSpawner.ChildProcessSpawner | Scope.Scope + ChildProcessSpawner.ChildProcessSpawner >; readonly nativeEventLogPath?: string; readonly nativeEventLogger?: EventNdjsonLogger; @@ -89,7 +76,6 @@ export interface CodexAdapterLiveOptions { interface CodexAdapterSessionContext { readonly threadId: ThreadId; - readonly scope: Scope.Closeable; readonly runtime: CodexSessionRuntimeShape; readonly eventFiber: Fiber.Fiber; stopped: boolean; @@ -100,7 +86,10 @@ function mapCodexRuntimeError( method: string, error: CodexSessionRuntimeError, ): ProviderAdapterError { - if (isCodexAppServerProcessExitedError(error) || isCodexAppServerTransportError(error)) { + if ( + Schema.is(CodexErrors.CodexAppServerProcessExitedError)(error) || + Schema.is(CodexErrors.CodexAppServerTransportError)(error) + ) { return new ProviderAdapterSessionClosedError({ provider: PROVIDER, threadId, @@ -108,7 +97,7 @@ function mapCodexRuntimeError( }); } - if (isCodexSessionRuntimeThreadIdMissingError(error)) { + if (Schema.is(CodexSessionRuntimeThreadIdMissingError)(error)) { return new ProviderAdapterSessionNotFoundError({ provider: PROVIDER, threadId, @@ -140,8 +129,7 @@ function readPayload( schema: Schema.Schema, payload: ProviderEvent["payload"], ): A | undefined { - const isPayload = Schema.is(schema); - return isPayload(payload) ? payload : undefined; + return Schema.is(schema)(payload) ? payload : undefined; } function trimText(value: string | undefined | null): string | undefined { @@ -193,12 +181,11 @@ function normalizeCodexTokenUsage( } function toTurnStatus( - value: EffectCodexSchema.V2TurnCompletedNotification["turn"]["status"] | "cancelled", + value: EffectCodexSchema.V2TurnCompletedNotification["turn"]["status"], ): "completed" | "failed" | "cancelled" | "interrupted" { switch (value) { case "completed": case "failed": - case "cancelled": case "interrupted": return value; default: @@ -270,14 +257,8 @@ function itemTitle(itemType: CanonicalItemType, item?: CodexLifecycleItem): stri } } -function itemDetail(itemType: CanonicalItemType, item: CodexLifecycleItem): string | undefined { - const itemRecord = item as Record; - const action = itemRecord.action as Record | undefined; - const actionQueries = Array.isArray(action?.queries) ? action.queries : []; +function itemDetail(item: CodexLifecycleItem): string | undefined { const candidates = [ - ...(itemType === "web_search" - ? [itemRecord.query, action?.query, ...actionQueries, action?.pattern, action?.url] - : []), "command" in item ? item.command : undefined, "title" in item ? item.title : undefined, "summary" in item ? item.summary : undefined, @@ -475,7 +456,7 @@ function mapItemLifecycle( return undefined; } - const detail = itemDetail(itemType, item); + const detail = itemDetail(item); const status = lifecycle === "item.started" ? "inProgress" @@ -1115,7 +1096,7 @@ function mapToRuntimeEvents( } const itemType = toCanonicalItemType(item.type); if (itemType === "plan") { - const detail = itemDetail(itemType, item); + const detail = itemDetail(item); if (!detail) { return []; } @@ -1441,7 +1422,7 @@ function mapToRuntimeEvents( type: "thread.realtime.started", ...runtimeEventBase(event, canonicalThreadId), payload: { - realtimeSessionId: payload.realtimeSessionId ?? undefined, + realtimeSessionId: payload.sessionId ?? undefined, }, }, ]; @@ -1628,7 +1609,6 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( const boundInstanceId = options?.instanceId ?? ProviderInstanceId.make("codex"); const fileSystem = yield* FileSystem.FileSystem; const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const crypto = yield* Crypto.Crypto; const serverConfig = yield* Effect.service(ServerConfig); const nativeEventLogger = options?.nativeEventLogger ?? @@ -1637,132 +1617,109 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( stream: "native", }) : undefined); - const managedNativeEventLogger = - options?.nativeEventLogger === undefined ? nativeEventLogger : undefined; + const serverSettingsService = yield* ServerSettingsService; const runtimeEventQueue = yield* Queue.unbounded(); const sessions = new Map(); - const startSession: CodexAdapterShape["startSession"] = (input) => - Effect.scoped( - Effect.gen(function* () { - if (input.provider !== undefined && input.provider !== PROVIDER) { - return yield* new ProviderAdapterValidationError({ - provider: PROVIDER, - operation: "startSession", - issue: `Expected provider '${PROVIDER}' but received '${input.provider}'.`, - }); - } - - const existing = sessions.get(input.threadId); - if (existing && !existing.stopped) { - yield* Effect.suspend(() => stopSessionInternal(existing)); - } - - const serviceTier = - input.modelSelection?.instanceId === boundInstanceId - ? getCodexServiceTierOptionValue(input.modelSelection) - : undefined; - const mcpSession = McpProviderSession.readMcpProviderSession(input.threadId); - const runtimeInput: CodexSessionRuntimeOptions = { - threadId: input.threadId, - providerInstanceId: boundInstanceId, - cwd: input.cwd ?? process.cwd(), - binaryPath: codexConfig.binaryPath, - launchArgs: resolveCodexLaunchArgs(codexConfig.launchArgs, options?.environment), - ...(options?.environment ? { environment: options.environment } : {}), - ...(codexConfig.homePath ? { homePath: codexConfig.homePath } : {}), - ...(isCodexResumeCursorSchema(input.resumeCursor) - ? { resumeCursor: input.resumeCursor } - : {}), - runtimeMode: input.runtimeMode, - ...(input.modelSelection?.instanceId === boundInstanceId - ? { model: input.modelSelection.model } - : {}), - ...(serviceTier ? { serviceTier } : {}), - ...(mcpSession - ? { - environment: { - ...(options?.environment ?? process.env), - T3_MCP_BEARER_TOKEN: mcpSession.authorizationHeader.replace(/^Bearer\s+/, ""), - }, - appServerArgs: [ - "-c", - `mcp_servers.t3-code.url=${mcpSession.endpoint}`, - "-c", - 'mcp_servers.t3-code.bearer_token_env_var="T3_MCP_BEARER_TOKEN"', - ], - } - : {}), - }; - const sessionScope = yield* Scope.make("sequential"); - let sessionScopeTransferred = false; - yield* Effect.addFinalizer(() => - sessionScopeTransferred ? Effect.void : Scope.close(sessionScope, Exit.void), - ); - const createRuntime = options?.makeRuntime ?? makeCodexSessionRuntime; - const runtime = yield* createRuntime(runtimeInput).pipe( - Effect.provideService(Scope.Scope, sessionScope), - Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, childProcessSpawner), - Effect.provideService(Crypto.Crypto, crypto), - Effect.mapError( - (cause) => - new ProviderAdapterProcessError({ - provider: PROVIDER, - threadId: input.threadId, - detail: cause.message, - cause, - }), - ), - ); - - const eventFiber = yield* Stream.runForEach(runtime.events, (event) => - Effect.gen(function* () { - yield* writeNativeEvent(event); - const runtimeEvents = mapToRuntimeEvents(event, event.threadId); - if (runtimeEvents.length === 0) { - yield* Effect.logDebug("ignoring unhandled Codex provider event", { - method: event.method, - threadId: event.threadId, - turnId: event.turnId, - itemId: event.itemId, - }); - return; - } - yield* Queue.offerAll(runtimeEventQueue, runtimeEvents); - }), - ).pipe(Effect.forkChild); - - const started = yield* runtime.start().pipe( - Effect.mapError( - (cause) => - new ProviderAdapterProcessError({ - provider: PROVIDER, - threadId: input.threadId, - detail: cause.message, - cause, - }), - ), - Effect.onError(() => - runtime.close.pipe( - Effect.andThen(Effect.ignore(Scope.close(sessionScope, Exit.void))), - Effect.andThen(Fiber.interrupt(eventFiber)), - Effect.ignore, - ), - ), - ); - - sessions.set(input.threadId, { - threadId: input.threadId, - scope: sessionScope, - runtime, - eventFiber, - stopped: false, + const startSession: CodexAdapterShape["startSession"] = Effect.fn("startSession")( + function* (input) { + if (input.provider !== undefined && input.provider !== PROVIDER) { + return yield* new ProviderAdapterValidationError({ + provider: PROVIDER, + operation: "startSession", + issue: `Expected provider '${PROVIDER}' but received '${input.provider}'.`, }); - sessionScopeTransferred = true; + } - return started; - }), - ); + const existing = sessions.get(input.threadId); + if (existing && !existing.stopped) { + yield* Effect.suspend(() => stopSessionInternal(existing)); + } + + const codexSettings = yield* serverSettingsService.getSettings.pipe( + Effect.map((settings) => settings.providers.codex), + Effect.mapError( + (error) => + new ProviderAdapterProcessError({ + provider: PROVIDER, + threadId: input.threadId, + detail: error.message, + cause: error, + }), + ), + ); + const runtimeInput: CodexSessionRuntimeOptions = { + threadId: input.threadId, + cwd: input.cwd ?? process.cwd(), + binaryPath: codexSettings.binaryPath, + ...(codexSettings.homePath ? { homePath: codexSettings.homePath } : {}), + ...(Schema.is(CodexResumeCursorSchema)(input.resumeCursor) + ? { resumeCursor: input.resumeCursor } + : {}), + runtimeMode: input.runtimeMode, + ...(input.modelSelection?.provider === "codex" + ? { model: input.modelSelection.model } + : {}), + ...(input.modelSelection?.provider === "codex" && input.modelSelection.options?.fastMode + ? { serviceTier: "fast" } + : {}), + }; + const createRuntime = options?.makeRuntime ?? makeCodexSessionRuntime; + const runtime = yield* createRuntime(runtimeInput).pipe( + Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, childProcessSpawner), + Effect.mapError( + (cause) => + new ProviderAdapterProcessError({ + provider: PROVIDER, + threadId: input.threadId, + detail: cause.message, + cause, + }), + ), + ); + + const eventFiber = yield* Stream.runForEach(runtime.events, (event) => + Effect.gen(function* () { + yield* writeNativeEvent(event); + const runtimeEvents = mapToRuntimeEvents(event, event.threadId); + if (runtimeEvents.length === 0) { + yield* Effect.logDebug("ignoring unhandled Codex provider event", { + method: event.method, + threadId: event.threadId, + turnId: event.turnId, + itemId: event.itemId, + }); + return; + } + yield* Queue.offerAll(runtimeEventQueue, runtimeEvents); + }), + ).pipe(Effect.forkChild); + + const started = yield* runtime.start().pipe( + Effect.mapError( + (cause) => + new ProviderAdapterProcessError({ + provider: PROVIDER, + threadId: input.threadId, + detail: cause.message, + cause, + }), + ), + Effect.onError(() => + runtime.close.pipe(Effect.andThen(Fiber.interrupt(eventFiber)), Effect.ignore), + ), + ); + + sessions.set(input.threadId, { + threadId: input.threadId, + runtime, + eventFiber, + stopped: false, + }); + + return started; + }, + ); const resolveAttachment = Effect.fn("resolveAttachment")(function* ( input: ProviderSendTurnInput, @@ -1804,26 +1761,19 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( ); const session = yield* requireSession(input.threadId); - const reasoningEffort = - input.modelSelection?.instanceId === boundInstanceId - ? getModelSelectionStringOptionValue(input.modelSelection, "reasoningEffort") - : undefined; - const serviceTier = - input.modelSelection?.instanceId === boundInstanceId - ? getCodexServiceTierOptionValue(input.modelSelection) - : undefined; return yield* session.runtime .sendTurn({ ...(input.input !== undefined ? { input: input.input } : {}), - ...(input.modelSelection?.instanceId === boundInstanceId + ...(input.modelSelection?.provider === "codex" ? { model: input.modelSelection.model } : {}), - ...(reasoningEffort - ? { - effort: reasoningEffort as EffectCodexSchema.V2TurnStartParams__ReasoningEffort, - } + ...(input.modelSelection?.provider === "codex" && + input.modelSelection.options?.reasoningEffort !== undefined + ? { effort: input.modelSelection.options.reasoningEffort } + : {}), + ...(input.modelSelection?.provider === "codex" && input.modelSelection.options?.fastMode + ? { serviceTier: "fast" } : {}), - ...(serviceTier ? { serviceTier } : {}), ...(input.interactionMode !== undefined ? { interactionMode: input.interactionMode } : {}), ...(codexAttachments.length > 0 ? { attachments: codexAttachments } : {}), }) @@ -1914,7 +1864,7 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( ), ); - const writeNativeEvent = Effect.fnUntraced(function* (event: ProviderEvent) { + const writeNativeEvent = Effect.fn("writeNativeEvent")(function* (event: ProviderEvent) { if (!nativeEventLogger) { return; } @@ -1930,7 +1880,6 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( session.stopped = true; sessions.delete(session.threadId); yield* session.runtime.close.pipe(Effect.ignore); - yield* Effect.ignore(Scope.close(session.scope, Exit.void)); yield* Fiber.interrupt(session.eventFiber).pipe(Effect.ignore); }); @@ -1960,11 +1909,7 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( }).pipe(Effect.asVoid); yield* Effect.acquireRelease(Effect.void, () => - stopAll().pipe( - Effect.andThen(Queue.shutdown(runtimeEventQueue)), - Effect.andThen(managedNativeEventLogger?.close() ?? Effect.void), - Effect.ignore, - ), + stopAll().pipe(Effect.andThen(Queue.shutdown(runtimeEventQueue)), Effect.ignore), ); return { diff --git a/apps/server/src/provider/Layers/CodexProvider.ts b/apps/server/src/provider/Layers/CodexProvider.ts index 5c0f76dff4..214cc6174a 100644 --- a/apps/server/src/provider/Layers/CodexProvider.ts +++ b/apps/server/src/provider/Layers/CodexProvider.ts @@ -16,13 +16,28 @@ import * as CodexErrors from "effect-codex-app-server/errors"; import type { CodexSettings, ServerProvider, + ServerProviderAuth, + ServerProviderSkill, ServerProviderState, ModelCapabilities, ProviderOptionDescriptor, ServerProviderModel, ServerProviderSkill, } from "@t3tools/contracts"; -import { PREFERRED_DEFAULT_CODEX_MODELS, ServerSettingsError } from "@t3tools/contracts"; +import { + Cache, + Data, + Duration, + Effect, + Equal, + FileSystem, + Layer, + Option, + Path, + Result, + Stream, +} from "effect"; +import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; import { createModelCapabilities } from "@t3tools/shared/model"; import { resolveSpawnCommand } from "@t3tools/shared/shell"; @@ -32,22 +47,73 @@ import { buildServerProvider, type ServerProviderDraft, } from "../providerSnapshot.ts"; -import { expandHomePath } from "../../pathExpansion.ts"; -import packageJson from "../../../package.json" with { type: "json" }; -const isCodexAppServerSpawnError = Schema.is(CodexErrors.CodexAppServerSpawnError); +import { makeManagedServerProvider } from "../makeManagedServerProvider.ts"; +import { + formatCodexCliUpgradeMessage, + isCodexCliVersionSupported, + parseCodexCliVersion, +} from "../codexCliVersion.ts"; +import { + adjustCodexModelsForAccount, + codexAuthSubLabel, + codexAuthSubType, + type CodexAccountSnapshot, +} from "../codexAccount.ts"; +import { type CodexDiscoverySnapshot, probeCodexDiscovery } from "../codexAppServer.ts"; +import { BUILT_IN_CODEX_MODELS, DEFAULT_CODEX_MODEL_CAPABILITIES } from "../codexModels.ts"; +import { CodexProvider } from "../Services/CodexProvider.ts"; +import { ServerSettingsService } from "../../serverSettings.ts"; +import { ServerSettingsError } from "@t3tools/contracts"; -const CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER = "2 seconds" as const; +const PROVIDER = "codex" as const; +const OPENAI_AUTH_PROVIDERS = new Set(["openai"]); -const CODEX_PRESENTATION = { - displayName: "Codex", - showInteractionModeToggle: true, -} as const; +class CodexDiscoveryCacheKey extends Data.Class<{ + readonly binaryPath: string; + readonly homePath?: string; + readonly cwd: string; +}> {} -export interface CodexAppServerProviderSnapshot { - readonly account: CodexSchema.V2GetAccountResponse; - readonly version: string | undefined; - readonly models: ReadonlyArray; - readonly skills: ReadonlyArray; +function buildInitialCodexProviderSnapshot(codexSettings: CodexSettings): ServerProvider { + const checkedAt = new Date().toISOString(); + const models = providerModelsFromSettings( + BUILT_IN_CODEX_MODELS, + PROVIDER, + codexSettings.customModels, + DEFAULT_CODEX_MODEL_CAPABILITIES, + ); + + if (!codexSettings.enabled) { + return buildServerProvider({ + provider: PROVIDER, + enabled: false, + checkedAt, + models, + skills: [], + probe: { + installed: false, + version: null, + status: "warning", + auth: { status: "unknown" }, + message: "Codex is disabled in T3 Code settings.", + }, + }); + } + + return buildServerProvider({ + provider: PROVIDER, + enabled: true, + checkedAt, + models, + skills: [], + probe: { + installed: true, + version: null, + status: "warning", + auth: { status: "unknown" }, + message: "Checking Codex CLI availability...", + }, + }); } const REASONING_EFFORT_LABELS: Readonly> = { @@ -324,49 +390,14 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun readonly homePath?: string; readonly launchArgs?: string; readonly cwd: string; - readonly customModels?: ReadonlyArray; - readonly environment?: NodeJS.ProcessEnv; -}) { - // `~` is not shell-expanded when env vars are set via `child_process.spawn`, - // so `CODEX_HOME=~/.codex_work` would reach codex verbatim and trip - // "CODEX_HOME points to '~/.codex_work', but that path does not exist". - // Expand here for parity with `CodexTextGeneration`/`CodexSessionRuntime`. - const resolvedHomePath = input.homePath ? expandHomePath(input.homePath) : undefined; - const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const environment = { - ...input.environment, - ...(resolvedHomePath ? { CODEX_HOME: resolvedHomePath } : {}), - }; - const spawnCommand = yield* resolveSpawnCommand( - input.binaryPath, - codexAppServerArgs(input.launchArgs), - { - env: environment, - extendEnv: true, - }, - ); - const child = yield* spawner - .spawn( - ChildProcess.make(spawnCommand.command, spawnCommand.args, { - cwd: input.cwd, - env: environment, - extendEnv: true, - forceKillAfter: CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER, - shell: spawnCommand.shell, - }), - ) - .pipe( - Effect.mapError( - (cause) => - new CodexErrors.CodexAppServerSpawnError({ - command: `${input.binaryPath} app-server`, - cause, - }), - ), - ); - const clientContext = yield* Layer.build(CodexClient.layerChildProcess(child)); - const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe( - Effect.provide(clientContext), +}) => + probeCodexDiscovery(input).pipe( + Effect.timeoutOption(CAPABILITIES_PROBE_TIMEOUT_MS), + Effect.result, + Effect.map((result) => { + if (Result.isFailure(result)) return undefined; + return Option.isSome(result.success) ? result.success.value : undefined; + }), ); const initialize = yield* client.request("initialize", { @@ -415,122 +446,42 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun } satisfies CodexAppServerProviderSnapshot; }); -const emptyCodexModelsFromSettings = (codexSettings: CodexSettings): ServerProvider["models"] => { - const models = new Set(); - for (const model of codexSettings.customModels) { - const trimmed = model.trim(); - if (trimmed.length > 0) { - models.add(trimmed); - } - } - return Array.from(models, (model) => ({ - slug: model, - name: model, - isCustom: true, - capabilities: null, - })); -}; - -const makePendingCodexProvider = ( - codexSettings: CodexSettings, -): Effect.Effect => - Effect.gen(function* () { - const checkedAt = yield* Effect.map(DateTime.now, DateTime.formatIso); - const models = emptyCodexModelsFromSettings(codexSettings); - - if (!codexSettings.enabled) { - return buildServerProvider({ - presentation: CODEX_PRESENTATION, - enabled: false, - checkedAt, - models, - skills: [], - probe: { - installed: false, - version: null, - status: "warning", - auth: { status: "unknown" }, - message: "Codex is disabled in T3 Code settings.", - }, - }); - } - - return buildServerProvider({ - presentation: CODEX_PRESENTATION, - enabled: true, - checkedAt, - models, - skills: [], - probe: { - installed: false, - version: null, - status: "warning", - auth: { status: "unknown" }, - message: "Codex provider status has not been checked in this session yet.", - }, - }); - }); - -function accountProbeStatus(account: CodexAppServerProviderSnapshot["account"]): { - readonly status: Exclude; - readonly auth: ServerProvider["auth"]; - readonly message?: string; -} { - const authLabel = codexAccountAuthLabel(account.account); - const authEmail = codexAccountEmail(account.account); - const auth = { - status: account.account ? ("authenticated" as const) : ("unknown" as const), - ...(account.account?.type ? { type: account.account?.type } : {}), - ...(authLabel ? { label: authLabel } : {}), - ...(authEmail ? { email: authEmail } : {}), - } satisfies ServerProvider["auth"]; - - if (account.account) { - return { status: "ready", auth }; - } - - if (account.requiresOpenaiAuth) { - return { - status: "error", - auth: { status: "unauthenticated" }, - message: "Codex CLI is not authenticated. Run `codex login` and try again.", - }; - } - - return { status: "ready", auth }; -} - export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(function* ( - codexSettings: CodexSettings, - probe: (input: { + resolveAccount?: (input: { + readonly binaryPath: string; + readonly homePath?: string; + }) => Effect.Effect, + resolveSkills?: (input: { readonly binaryPath: string; readonly homePath?: string; - readonly launchArgs?: string; readonly cwd: string; - readonly customModels: ReadonlyArray; - readonly environment?: NodeJS.ProcessEnv; - }) => Effect.Effect< - CodexAppServerProviderSnapshot, - CodexErrors.CodexAppServerError, - ChildProcessSpawner.ChildProcessSpawner | Scope.Scope - > = probeCodexAppServerProvider, - environment?: NodeJS.ProcessEnv, + }) => Effect.Effect | undefined>, ): Effect.fn.Return< - ServerProviderDraft, + ServerProvider, ServerSettingsError, - ChildProcessSpawner.ChildProcessSpawner + | ChildProcessSpawner.ChildProcessSpawner + | FileSystem.FileSystem + | Path.Path + | ServerSettingsService > { - const resolvedEnvironment = environment ?? process.env; - const checkedAt = DateTime.formatIso(yield* DateTime.now); - const emptyModels = emptyCodexModelsFromSettings(codexSettings); + const codexSettings = yield* Effect.service(ServerSettingsService).pipe( + Effect.flatMap((service) => service.getSettings), + Effect.map((settings) => settings.providers.codex), + ); + const checkedAt = new Date().toISOString(); + const models = providerModelsFromSettings( + BUILT_IN_CODEX_MODELS, + PROVIDER, + codexSettings.customModels, + DEFAULT_CODEX_MODEL_CAPABILITIES, + ); if (!codexSettings.enabled) { return buildServerProvider({ - presentation: CODEX_PRESENTATION, + provider: PROVIDER, enabled: false, checkedAt, - models: emptyModels, - skills: [], + models, probe: { installed: false, version: null, @@ -541,6 +492,282 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu }); } + const versionProbe = yield* runCodexCommand(["--version"]).pipe( + Effect.timeoutOption(DEFAULT_TIMEOUT_MS), + Effect.result, + ); + + if (Result.isFailure(versionProbe)) { + const error = versionProbe.failure; + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models, + probe: { + installed: !isCommandMissingCause(error), + version: null, + status: "error", + auth: { status: "unknown" }, + message: isCommandMissingCause(error) + ? "Codex CLI (`codex`) is not installed or not on PATH." + : `Failed to execute Codex CLI health check: ${error.message}.`, + }, + }); + } + + if (Option.isNone(versionProbe.success)) { + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models, + probe: { + installed: true, + version: null, + status: "error", + auth: { status: "unknown" }, + message: "Codex CLI is installed but failed to run. Timed out while running command.", + }, + }); + } + + const version = versionProbe.success.value; + const parsedVersion = + parseCodexCliVersion(`${version.stdout}\n${version.stderr}`) ?? + parseGenericCliVersion(`${version.stdout}\n${version.stderr}`); + if (version.code !== 0) { + const detail = detailFromResult(version); + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models, + probe: { + installed: true, + version: parsedVersion, + status: "error", + auth: { status: "unknown" }, + message: detail + ? `Codex CLI is installed but failed to run. ${detail}` + : "Codex CLI is installed but failed to run.", + }, + }); + } + + if (parsedVersion && !isCodexCliVersionSupported(parsedVersion)) { + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models, + probe: { + installed: true, + version: parsedVersion, + status: "error", + auth: { status: "unknown" }, + message: formatCodexCliUpgradeMessage(parsedVersion), + }, + }); + } + + const skills = + (resolveSkills + ? yield* resolveSkills({ + binaryPath: codexSettings.binaryPath, + homePath: codexSettings.homePath, + cwd: process.cwd(), + }).pipe(Effect.orElseSucceed(() => undefined)) + : undefined) ?? []; + + if (yield* hasCustomModelProvider) { + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models, + skills, + probe: { + installed: true, + version: parsedVersion, + status: "ready", + auth: { status: "unknown" }, + message: "Using a custom Codex model provider; OpenAI login check skipped.", + }, + }); + } + + const authProbe = yield* runCodexCommand(["login", "status"]).pipe( + Effect.timeoutOption(DEFAULT_TIMEOUT_MS), + Effect.result, + ); + const account = resolveAccount + ? yield* resolveAccount({ + binaryPath: codexSettings.binaryPath, + homePath: codexSettings.homePath, + }) + : undefined; + const resolvedModels = adjustCodexModelsForAccount(models, account); + + if (Result.isFailure(authProbe)) { + const error = authProbe.failure; + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models: resolvedModels, + skills, + probe: { + installed: true, + version: parsedVersion, + status: "warning", + auth: { status: "unknown" }, + message: `Could not verify Codex authentication status: ${error.message}.`, + }, + }); + } + + if (Option.isNone(authProbe.success)) { + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models: resolvedModels, + skills, + probe: { + installed: true, + version: parsedVersion, + status: "warning", + auth: { status: "unknown" }, + message: "Could not verify Codex authentication status. Timed out while running command.", + }, + }); + } + + const parsed = parseAuthStatusFromOutput(authProbe.success.value); + const authType = codexAuthSubType(account); + const authLabel = codexAuthSubLabel(account); + return buildServerProvider({ + provider: PROVIDER, + enabled: codexSettings.enabled, + checkedAt, + models: resolvedModels, + skills, + probe: { + installed: true, + version: parsedVersion, + status: parsed.status, + auth: { + ...parsed.auth, + ...(authType ? { type: authType } : {}), + ...(authLabel ? { label: authLabel } : {}), + }, + ...(parsed.message ? { message: parsed.message } : {}), + }, + }); +}); + +const applyCodexDiscoverySnapshot = ( + snapshot: ServerProvider, + discovery: CodexDiscoverySnapshot, +): ServerProvider => { + const authType = codexAuthSubType(discovery.account); + const authLabel = codexAuthSubLabel(discovery.account); + + return { + ...snapshot, + auth: { + ...snapshot.auth, + ...(authType ? { type: authType } : {}), + ...(authLabel ? { label: authLabel } : {}), + }, + models: adjustCodexModelsForAccount(snapshot.models, discovery.account), + skills: discovery.skills, + }; +}; + +const enrichCodexSnapshotViaDiscovery = (input: { + readonly settings: CodexSettings; + readonly snapshot: ServerProvider; + readonly publishSnapshot: (snapshot: ServerProvider) => Effect.Effect; + readonly getDiscovery: (input: { + readonly binaryPath: string; + readonly homePath?: string; + readonly cwd: string; + }) => Effect.Effect; +}) => + (input.settings.enabled && input.snapshot.installed + ? input + .getDiscovery({ + binaryPath: input.settings.binaryPath, + homePath: input.settings.homePath, + cwd: process.cwd(), + }) + .pipe( + Effect.flatMap((discovery) => + discovery + ? input.publishSnapshot(applyCodexDiscoverySnapshot(input.snapshot, discovery)) + : Effect.void, + ), + ) + : Effect.void + ).pipe(Effect.catchCause((cause) => Effect.logError(cause))); + +export const CodexProviderLive = Layer.effect( + CodexProvider, + Effect.gen(function* () { + const serverSettings = yield* ServerSettingsService; + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; + const accountProbeCache = yield* Cache.make({ + capacity: 4, + timeToLive: Duration.minutes(5), + lookup: (key: CodexDiscoveryCacheKey) => { + const { binaryPath, homePath, cwd } = key; + return probeCodexCapabilities({ + binaryPath, + cwd, + ...(homePath ? { homePath } : {}), + }); + }, + }); + }); + + const getDiscovery = (input: { + readonly binaryPath: string; + readonly homePath?: string; + readonly cwd: string; + }) => Cache.get(accountProbeCache, new CodexDiscoveryCacheKey(input)); + + const checkProvider = checkCodexProviderStatus().pipe( + Effect.provideService(ServerSettingsService, serverSettings), + Effect.provideService(FileSystem.FileSystem, fileSystem), + Effect.provideService(Path.Path, path), + Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner), + ); + + return yield* makeManagedServerProvider({ + getSettings: serverSettings.getSettings.pipe( + Effect.map((settings) => settings.providers.codex), + Effect.orDie, + ), + streamSettings: serverSettings.streamChanges.pipe( + Stream.map((settings) => settings.providers.codex), + ), + haveSettingsChanged: (previous, next) => !Equal.equals(previous, next), + buildInitialSnapshot: buildInitialCodexProviderSnapshot, + checkProvider, + enrichSnapshot: ({ settings, snapshot, publishSnapshot }) => + enrichCodexSnapshotViaDiscovery({ + settings, + snapshot, + publishSnapshot, + getDiscovery, + }), + }); + } + const probeResult = yield* probe({ binaryPath: codexSettings.binaryPath, homePath: codexSettings.homePath, diff --git a/apps/server/src/provider/Layers/CursorAdapter.test.ts b/apps/server/src/provider/Layers/CursorAdapter.test.ts index 491f718a97..a220b6d978 100644 --- a/apps/server/src/provider/Layers/CursorAdapter.test.ts +++ b/apps/server/src/provider/Layers/CursorAdapter.test.ts @@ -41,19 +41,15 @@ const mockAgentPath = NodePath.join(__dirname, "../../../scripts/acp-mock-agent. const mockAgentCommand = "node"; const mockAgentArgs = [mockAgentPath] as const; -async function makeMockAgentWrapper( - extraEnv?: Record, - options?: { initialDelaySeconds?: number }, -) { - const dir = await NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "cursor-acp-mock-")); - const wrapperPath = NodePath.join(dir, "fake-agent.sh"); +async function makeMockAgentWrapper(extraEnv?: Record) { + const dir = await mkdtemp(path.join(os.tmpdir(), "cursor-acp-mock-")); + const wrapperPath = path.join(dir, "fake-agent.sh"); const envExports = Object.entries(extraEnv ?? {}) .map(([key, value]) => `export ${key}=${JSON.stringify(value)}`) .join("\n"); const script = `#!/bin/sh ${envExports} -${options?.initialDelaySeconds ? `sleep ${JSON.stringify(String(options.initialDelaySeconds))}` : ""} -exec ${JSON.stringify(mockAgentCommand)} ${mockAgentArgs.map((arg) => JSON.stringify(arg)).join(" ")} "$@" +exec ${JSON.stringify(bunExe)} ${JSON.stringify(mockAgentPath)} "$@" `; await NodeFSP.writeFile(wrapperPath, script, "utf8"); await NodeFSP.chmod(wrapperPath, 0o755); @@ -100,54 +96,6 @@ async function readJsonLines(filePath: string) { .map((line) => JSON.parse(line) as Record); } -async function waitForFileContent(filePath: string, attempts = 40) { - for (let attempt = 0; attempt < attempts; attempt += 1) { - try { - const raw = await NodeFSP.readFile(filePath, "utf8"); - if (raw.trim().length > 0) { - return raw; - } - } catch {} - await Effect.runPromise(Effect.yieldNow); - } - throw new Error(`Timed out waiting for file content at ${filePath}`); -} - -function waitForJsonLogMatch( - filePath: string, - predicate: (entry: Record) => boolean, - attempts = 40, -) { - return Effect.gen(function* () { - for (let attempt = 0; attempt < attempts; attempt += 1) { - const requests = yield* Effect.promise(() => readJsonLines(filePath)); - if (requests.some(predicate)) { - return requests; - } - yield* Effect.yieldNow; - } - return yield* Effect.promise(() => readJsonLines(filePath)); - }); -} - -// Tests mutate `ServerSettingsService` mid-flight (e.g. setting -// `providers.cursor.binaryPath` to a mock ACP wrapper). The adapter -// captures `cursorSettings` once at construction, so without a resolver -// the mutation is invisible — sessions would spawn the constructor's -// (empty) binary path. Wiring `resolveSettings` through -// `ServerSettingsService.getSettings` makes each session read the latest -// snapshot, matching the old "always read live" behavior that these -// tests assumed. -const makeResolveCursorSettings = Effect.gen(function* () { - const serverSettings = yield* ServerSettingsService; - return yield* Effect.succeed( - serverSettings.getSettings.pipe( - Effect.map((snapshot) => snapshot.providers.cursor), - Effect.orDie, - ), - ); -}); - const cursorAdapterTestLayer = it.layer( Layer.effect( CursorAdapter, @@ -250,166 +198,6 @@ cursorAdapterTestLayer("CursorAdapterLive", (it) => { }), ); - it.effect("steers a running turn instead of opening a new one on mid-turn sendTurn", () => - Effect.gen(function* () { - const adapter = yield* CursorAdapter; - const settings = yield* ServerSettingsService; - const threadId = ThreadId.make("cursor-steer-thread"); - - // Keep the first prompt in flight long enough for the steer to land. - const wrapperPath = yield* Effect.promise(() => - makeMockAgentWrapper({ T3_ACP_PROMPT_DELAY_MS: "1500" }), - ); - yield* settings.updateSettings({ providers: { cursor: { binaryPath: wrapperPath } } }); - - const runtimeEventsFiber = yield* adapter.streamEvents.pipe( - Stream.filter((event) => event.threadId === threadId), - Stream.takeUntil((event) => event.type === "turn.completed"), - Stream.runCollect, - Effect.forkChild, - ); - - yield* adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection: { instanceId: ProviderInstanceId.make("cursor"), model: "default" }, - }); - - const firstTurnFiber = yield* adapter - .sendTurn({ - threadId, - input: "run 5 commands", - attachments: [], - }) - .pipe(Effect.forkChild); - - // Poll until the first prompt is in flight — sendTurn binds the active - // turn id before prompting. The mock agent runs on the real clock, so - // each TestClock.adjust just provides the scheduler hops for its stdio - // responses to land. - yield* Effect.gen(function* () { - for (let attempt = 0; attempt < 200; attempt += 1) { - const sessions = yield* adapter.listSessions(); - const session = sessions.find((entry) => entry.threadId === threadId); - if (session?.activeTurnId !== undefined) { - return; - } - yield* TestClock.adjust("10 millis"); - } - throw new Error("Timed out waiting for the first prompt to be in flight."); - }); - - // Steer: a second sendTurn while the first prompt is still in flight - // continues the same turn. - const steeredTurn = yield* adapter.sendTurn({ - threadId, - input: "actually run 15", - attachments: [], - }); - const firstTurn = yield* Fiber.join(firstTurnFiber); - assert.equal(String(steeredTurn.turnId), String(firstTurn.turnId)); - - const runtimeEvents = Array.from(yield* Fiber.join(runtimeEventsFiber)); - const turnStartedEvents = runtimeEvents.filter((event) => event.type === "turn.started"); - const turnCompletedEvents = runtimeEvents.filter((event) => event.type === "turn.completed"); - - // One turn boundary for the whole run: the superseded first prompt - // resolving must not settle the merged turn. - assert.equal(turnStartedEvents.length, 1); - assert.equal(String(turnStartedEvents[0]?.turnId), String(firstTurn.turnId)); - assert.equal(turnCompletedEvents.length, 1); - assert.equal(String(turnCompletedEvents[0]?.turnId), String(firstTurn.turnId)); - - yield* adapter.stopSession(threadId); - }), - ); - - it.effect("closes the ACP child process when a session stops", () => - Effect.gen(function* () { - const adapter = yield* CursorAdapter; - const settings = yield* ServerSettingsService; - const threadId = ThreadId.make("cursor-stop-session-close"); - const tempDir = yield* Effect.promise(() => - NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "cursor-adapter-exit-log-")), - ); - const exitLogPath = NodePath.join(tempDir, "exit.log"); - - const wrapperPath = yield* Effect.promise(() => - makeMockAgentWrapper({ - T3_ACP_EXIT_LOG_PATH: exitLogPath, - }), - ); - yield* settings.updateSettings({ providers: { cursor: { binaryPath: wrapperPath } } }); - - yield* adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection: { instanceId: ProviderInstanceId.make("cursor"), model: "default" }, - }); - - yield* adapter.stopSession(threadId); - - const exitLog = yield* Effect.promise(() => waitForFileContent(exitLogPath)); - assert.include(exitLog, "SIGTERM"); - }), - ); - - it.effect( - "serializes concurrent startSession calls for the same thread and closes the replaced ACP session", - () => - Effect.gen(function* () { - const adapter = yield* CursorAdapter; - const settings = yield* ServerSettingsService; - const threadId = ThreadId.make("cursor-concurrent-start-session"); - const tempDir = yield* Effect.promise(() => - NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "cursor-adapter-concurrent-exit-log-")), - ); - const exitLogPath = NodePath.join(tempDir, "exit.log"); - - const wrapperPath = yield* Effect.promise(() => - makeMockAgentWrapper( - { - T3_ACP_EXIT_LOG_PATH: exitLogPath, - }, - { initialDelaySeconds: 0.2 }, - ), - ); - yield* settings.updateSettings({ providers: { cursor: { binaryPath: wrapperPath } } }); - - const [firstSession, secondSession] = yield* Effect.all( - [ - adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection: { instanceId: ProviderInstanceId.make("cursor"), model: "default" }, - }), - adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection: { instanceId: ProviderInstanceId.make("cursor"), model: "default" }, - }), - ], - { concurrency: "unbounded" }, - ); - - assert.equal(firstSession.threadId, threadId); - assert.equal(secondSession.threadId, threadId); - - yield* adapter.stopSession(threadId); - - const exitLog = yield* Effect.promise(() => waitForFileContent(exitLogPath)); - assert.equal(exitLog.match(/SIGTERM/g)?.length ?? 0, 2); - }), - ); - it.effect("rejects startSession when provider mismatches", () => Effect.gen(function* () { const adapter = yield* CursorAdapter; @@ -459,14 +247,12 @@ cursorAdapterTestLayer("CursorAdapterLive", (it) => { yield* adapter.stopSession(threadId); const requests = yield* Effect.promise(() => readJsonLines(requestLogPath)); - const modeRequest = requests - .toReversed() - .find( - (entry) => - entry.method === "session/set_mode" || - (entry.method === "session/set_config_option" && - (entry.params as Record | undefined)?.configId === "mode"), - ); + const modeRequest = requests.find( + (entry) => + entry.method === "session/set_mode" || + (entry.method === "session/set_config_option" && + (entry.params as Record | undefined)?.configId === "mode"), + ); assert.isDefined(modeRequest); assert.equal( (modeRequest?.params as Record | undefined)?.sessionId, @@ -482,78 +268,6 @@ cursorAdapterTestLayer("CursorAdapterLive", (it) => { }), ); - it.effect( - "applies initial model and mode configuration during startSession and skips repeating it on first send", - () => - Effect.gen(function* () { - const adapter = yield* CursorAdapter; - const serverSettings = yield* ServerSettingsService; - const threadId = ThreadId.make("cursor-initial-config-probe"); - const tempDir = yield* Effect.promise(() => - NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "cursor-acp-")), - ); - const requestLogPath = NodePath.join(tempDir, "requests.ndjson"); - const argvLogPath = NodePath.join(tempDir, "argv.txt"); - yield* Effect.promise(() => NodeFSP.writeFile(requestLogPath, "", "utf8")); - const wrapperPath = yield* Effect.promise(() => - makeProbeWrapper(requestLogPath, argvLogPath), - ); - yield* serverSettings.updateSettings({ - providers: { cursor: { binaryPath: wrapperPath } }, - }); - - const modelSelection = createModelSelection(ProviderInstanceId.make("cursor"), "gpt-5.4", [ - { id: "reasoning", value: "xhigh" }, - { id: "contextWindow", value: "1m" }, - { id: "fastMode", value: true }, - ]); - - yield* adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection, - }); - - yield* Effect.promise(() => waitForFileContent(requestLogPath)); - - const requestsAfterStart = yield* Effect.promise(() => readJsonLines(requestLogPath)); - const configIdsAfterStart = requestsAfterStart.flatMap((entry) => - entry.method === "session/set_config_option" && - typeof (entry.params as Record | undefined)?.configId === "string" - ? [String((entry.params as Record).configId)] - : [], - ); - assert.deepStrictEqual(configIdsAfterStart, [ - "model", - "reasoning", - "context", - "fast", - "mode", - ]); - - yield* adapter.sendTurn({ - threadId, - input: "hello mock", - attachments: [], - modelSelection, - interactionMode: "default", - }); - yield* adapter.stopSession(threadId); - - const finalRequests = yield* Effect.promise(() => readJsonLines(requestLogPath)); - const finalConfigIds = finalRequests.flatMap((entry) => - entry.method === "session/set_config_option" && - typeof (entry.params as Record | undefined)?.configId === "string" - ? [String((entry.params as Record).configId)] - : [], - ); - assert.deepStrictEqual(finalConfigIds, ["model", "reasoning", "context", "fast", "mode"]); - assert.equal(finalRequests.filter((entry) => entry.method === "session/prompt").length, 1); - }), - ); - it.effect( "streams ACP tool calls and approvals on the active turn in approval-required mode", () => @@ -1133,92 +847,6 @@ cursorAdapterTestLayer("CursorAdapterLive", (it) => { }), ); - it.effect("interrupting a session settles pending user-input waits", () => - Effect.gen(function* () { - const adapter = yield* CursorAdapter; - const serverSettings = yield* ServerSettingsService; - const threadId = ThreadId.make("cursor-interrupt-pending-user-input"); - const userInputRequested = yield* Deferred.make(); - - const wrapperPath = yield* Effect.promise(() => - makeMockAgentWrapper({ T3_ACP_EMIT_ASK_QUESTION: "1" }), - ); - yield* serverSettings.updateSettings({ providers: { cursor: { binaryPath: wrapperPath } } }); - - yield* Stream.runForEach(adapter.streamEvents, (event) => { - if (String(event.threadId) !== String(threadId) || event.type !== "user-input.requested") { - return Effect.void; - } - return Deferred.succeed(userInputRequested, undefined).pipe(Effect.ignore); - }).pipe(Effect.forkChild); - - yield* adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection: { instanceId: ProviderInstanceId.make("cursor"), model: "default" }, - }); - - const sendTurnFiber = yield* adapter - .sendTurn({ - threadId, - input: "ask me a question and then interrupt", - attachments: [], - }) - .pipe(Effect.forkChild); - - yield* Deferred.await(userInputRequested); - yield* adapter.interruptTurn(threadId); - yield* Fiber.await(sendTurnFiber); - - assert.equal(yield* adapter.hasSession(threadId), true); - yield* adapter.stopSession(threadId); - }), - ); - - it.effect("broadcasts runtime events to multiple stream consumers", () => - Effect.gen(function* () { - const adapter = yield* CursorAdapter; - const settings = yield* ServerSettingsService; - const threadId = ThreadId.make("cursor-runtime-event-broadcast"); - - const wrapperPath = yield* Effect.promise(() => makeMockAgentWrapper()); - yield* settings.updateSettings({ providers: { cursor: { binaryPath: wrapperPath } } }); - - const firstConsumer = yield* Stream.take(adapter.streamEvents, 3).pipe( - Stream.runCollect, - Effect.forkChild, - ); - const secondConsumer = yield* Stream.take(adapter.streamEvents, 3).pipe( - Stream.runCollect, - Effect.forkChild, - ); - - yield* adapter.startSession({ - threadId, - provider: ProviderDriverKind.make("cursor"), - cwd: process.cwd(), - runtimeMode: "full-access", - modelSelection: { instanceId: ProviderInstanceId.make("cursor"), model: "default" }, - }); - - const firstEvents = Array.from(yield* Fiber.join(firstConsumer)); - const secondEvents = Array.from(yield* Fiber.join(secondConsumer)); - - assert.deepStrictEqual( - firstEvents.map((event) => event.type), - ["session.started", "session.state.changed", "thread.started"], - ); - assert.deepStrictEqual( - secondEvents.map((event) => event.type), - ["session.started", "session.state.changed", "thread.started"], - ); - - yield* adapter.stopSession(threadId); - }), - ); - it.effect("switches model in-session via session/set_config_option", () => Effect.gen(function* () { const adapter = yield* CursorAdapter; diff --git a/apps/server/src/provider/Layers/CursorAdapter.ts b/apps/server/src/provider/Layers/CursorAdapter.ts index 80475a5c26..d7d1c45ff2 100644 --- a/apps/server/src/provider/Layers/CursorAdapter.ts +++ b/apps/server/src/provider/Layers/CursorAdapter.ts @@ -6,8 +6,6 @@ import { ApprovalRequestId, - type CursorSettings, - type ProviderOptionSelection, EventId, type ProviderApprovalDecision, type ProviderInteractionMode, @@ -21,23 +19,18 @@ import { type ThreadId, TurnId, } from "@t3tools/contracts"; -import * as DateTime from "effect/DateTime"; -import * as Crypto from "effect/Crypto"; -import * as Deferred from "effect/Deferred"; -import * as Effect from "effect/Effect"; -import * as Exit from "effect/Exit"; -import * as Fiber from "effect/Fiber"; -import * as FileSystem from "effect/FileSystem"; -import * as Option from "effect/Option"; -import * as Path from "effect/Path"; -import * as PubSub from "effect/PubSub"; -import * as Schema from "effect/Schema"; -import * as Scope from "effect/Scope"; -import * as Semaphore from "effect/Semaphore"; -import * as Stream from "effect/Stream"; -import * as SynchronizedRef from "effect/SynchronizedRef"; -import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; -import * as EffectAcpErrors from "effect-acp/errors"; +import { + DateTime, + Deferred, + Effect, + Fiber, + FileSystem, + Layer, + Queue, + Random, + Stream, +} from "effect"; +import { ChildProcessSpawner } from "effect/unstable/process"; import type * as EffectAcpSchema from "effect-acp/schema"; import { resolveAttachmentPath } from "../../attachmentStore.ts"; @@ -125,8 +118,7 @@ interface PendingUserInput { interface CursorSessionContext { readonly threadId: ThreadId; session: ProviderSession; - readonly scope: Scope.Closeable; - readonly acp: AcpSessionRuntime.AcpSessionRuntime["Service"]; + readonly acp: AcpSessionRuntimeShape; notificationFiber: Fiber.Fiber | undefined; readonly pendingApprovals: Map; readonly pendingUserInputs: Map; @@ -245,55 +237,6 @@ function resolveRequestedModeId(input: { ); } -function applyRequestedSessionConfiguration(input: { - readonly runtime: AcpSessionRuntime.AcpSessionRuntime["Service"]; - readonly runtimeMode: RuntimeMode; - readonly interactionMode: ProviderInteractionMode | undefined; - readonly modelSelection: - | { - readonly model: string; - readonly options?: ReadonlyArray | null | undefined; - } - | undefined; - readonly mapError: (context: { - readonly cause: import("effect-acp/errors").AcpError; - readonly method: "session/set_config_option" | "session/set_mode"; - }) => E; -}): Effect.Effect { - return Effect.gen(function* () { - if (input.modelSelection) { - yield* applyCursorAcpModelSelection({ - runtime: input.runtime, - model: input.modelSelection.model, - selections: input.modelSelection.options, - mapError: ({ cause }) => - input.mapError({ - cause, - method: "session/set_config_option", - }), - }); - } - - const requestedModeId = resolveRequestedModeId({ - interactionMode: input.interactionMode, - runtimeMode: input.runtimeMode, - modeState: yield* input.runtime.getModeState, - }); - if (!requestedModeId) { - return; - } - - yield* input.runtime.setMode(requestedModeId).pipe( - Effect.mapError((cause) => - input.mapError({ - cause, - method: "session/set_mode", - }), - ), - ); - }); -} - function selectAutoApprovedPermissionOption( request: EffectAcpSchema.RequestPermissionRequest, ): string | undefined { @@ -328,13 +271,9 @@ export function makeCursorAdapter( stream: "native", }) : undefined); - const managedNativeEventLogger = - options?.nativeEventLogger === undefined ? nativeEventLogger : undefined; - const makeAcpNativeLoggers = yield* makeAcpNativeLoggerFactory(); const sessions = new Map(); - const threadLocksRef = yield* SynchronizedRef.make(new Map()); - const runtimeEventPubSub = yield* PubSub.unbounded(); + const runtimeEventQueue = yield* Queue.unbounded(); const nowIso = Effect.map(DateTime.now, DateTime.formatIso); const randomUUIDv4 = crypto.randomUUIDv4.pipe( @@ -362,28 +301,7 @@ export function makeCursorAdapter( ); const offerRuntimeEvent = (event: ProviderRuntimeEvent) => - PubSub.publish(runtimeEventPubSub, event).pipe(Effect.asVoid); - - const getThreadSemaphore = (threadId: string) => - SynchronizedRef.modifyEffect(threadLocksRef, (current) => { - const existing: Option.Option = Option.fromNullishOr( - current.get(threadId), - ); - return Option.match(existing, { - onNone: () => - Semaphore.make(1).pipe( - Effect.map((semaphore) => { - const next = new Map(current); - next.set(threadId, semaphore); - return [semaphore, next] as const; - }), - ), - onSome: (semaphore) => Effect.succeed([semaphore, current] as const), - }); - }); - - const withThreadLock = (threadId: string, effect: Effect.Effect) => - Effect.flatMap(getThreadSemaphore(threadId), (semaphore) => semaphore.withPermit(effect)); + Queue.offer(runtimeEventQueue, event).pipe(Effect.asVoid); const logNative = ( threadId: ThreadId, @@ -465,7 +383,7 @@ export function makeCursorAdapter( if (ctx.notificationFiber) { yield* Fiber.interrupt(ctx.notificationFiber); } - yield* Effect.ignore(Scope.close(ctx.scope, Exit.void)); + yield* Effect.ignore(ctx.acp.close); sessions.delete(ctx.threadId); yield* offerRuntimeEvent({ type: "session.exited", @@ -477,477 +395,404 @@ export function makeCursorAdapter( }); const startSession: CursorAdapterShape["startSession"] = (input) => - withThreadLock( - input.threadId, - Effect.gen(function* () { - if (input.provider !== undefined && input.provider !== PROVIDER) { - return yield* new ProviderAdapterValidationError({ - provider: PROVIDER, - operation: "startSession", - issue: `Expected provider '${PROVIDER}' but received '${input.provider}'.`, - }); - } - if (!input.cwd?.trim()) { - return yield* new ProviderAdapterValidationError({ - provider: PROVIDER, - operation: "startSession", - issue: "cwd is required and must be non-empty.", - }); - } - - const cwd = path.resolve(input.cwd.trim()); - const cursorModelSelection = - input.modelSelection?.instanceId === boundInstanceId ? input.modelSelection : undefined; - const existing = sessions.get(input.threadId); - if (existing && !existing.stopped) { - yield* stopSessionInternal(existing); - } - - const pendingApprovals = new Map(); - const pendingUserInputs = new Map(); - const sessionScope = yield* Scope.make("sequential"); - let sessionScopeTransferred = false; - yield* Effect.addFinalizer(() => - sessionScopeTransferred ? Effect.void : Scope.close(sessionScope, Exit.void), - ); - let ctx!: CursorSessionContext; - - const resumeSessionId = parseCursorResume(input.resumeCursor)?.sessionId; - const acpNativeLoggers = makeAcpNativeLoggers({ - nativeEventLogger, + Effect.gen(function* () { + if (input.provider !== undefined && input.provider !== PROVIDER) { + return yield* new ProviderAdapterValidationError({ provider: PROVIDER, - threadId: input.threadId, + operation: "startSession", + issue: `Expected provider '${PROVIDER}' but received '${input.provider}'.`, }); - - // Resolve the CursorSettings used to spawn the ACP child. Production - // leaves `options.resolveSettings` undefined so we use the value - // captured at adapter construction — per-instance isolation is - // enforced by the hydration layer rebuilding this adapter whenever - // its config changes. Tests set `resolveSettings` to pull the latest - // snapshot from `ServerSettingsService` so that mid-suite - // `updateSettings({ providers: { cursor: { binaryPath } } })` calls - // actually take effect when the next session spawns. - const effectiveCursorSettings = options?.resolveSettings - ? yield* options.resolveSettings - : cursorSettings; - - const mcpSession = McpProviderSession.readMcpProviderSession(input.threadId); - const acp = yield* makeCursorAcpRuntime({ - cursorSettings: effectiveCursorSettings, - ...(options?.environment ? { environment: options.environment } : {}), - childProcessSpawner, - cwd, - ...(resumeSessionId ? { resumeSessionId } : {}), - clientInfo: { name: "t3-code", version: "0.0.0" }, - ...(mcpSession - ? { - mcpServers: [ - { - type: "http" as const, - name: "t3-code", - url: mcpSession.endpoint, - headers: [ - { - name: "Authorization", - value: mcpSession.authorizationHeader, - }, - ], - }, - ], - } - : {}), - ...acpNativeLoggers, - }).pipe( - Effect.provideService(Crypto.Crypto, crypto), - Effect.provideService(Scope.Scope, sessionScope), - Effect.mapError( - (cause) => - new ProviderAdapterProcessError({ - provider: PROVIDER, - threadId: input.threadId, - detail: cause.message, - cause, - }), - ), - ); - const started = yield* Effect.gen(function* () { - yield* acp.handleExtRequest("cursor/ask_question", CursorAskQuestionRequest, (params) => - mapExtensionFailure( - Effect.gen(function* () { - yield* logNative( - input.threadId, - "cursor/ask_question", - params, - "acp.cursor.extension", - ); - const requestId = ApprovalRequestId.make(yield* randomUUIDv4); - const runtimeRequestId = RuntimeRequestId.make(requestId); - const answers = yield* Deferred.make(); - pendingUserInputs.set(requestId, { answers }); - yield* offerRuntimeEvent({ - type: "user-input.requested", - ...(yield* makeEventStamp()), - provider: PROVIDER, - threadId: input.threadId, - turnId: ctx?.activeTurnId, - requestId: runtimeRequestId, - payload: { questions: extractAskQuestions(params) }, - raw: { - source: "acp.cursor.extension", - method: "cursor/ask_question", - payload: params, - }, - }); - const resolved = yield* Deferred.await(answers); - pendingUserInputs.delete(requestId); - yield* offerRuntimeEvent({ - type: "user-input.resolved", - ...(yield* makeEventStamp()), - provider: PROVIDER, - threadId: input.threadId, - turnId: ctx?.activeTurnId, - requestId: runtimeRequestId, - payload: { answers: resolved }, - }); - return { answers: resolved }; - }), - ), - ); - yield* acp.handleExtRequest("cursor/create_plan", CursorCreatePlanRequest, (params) => - mapExtensionFailure( - Effect.gen(function* () { - yield* logNative( - input.threadId, - "cursor/create_plan", - params, - "acp.cursor.extension", - ); - yield* offerRuntimeEvent({ - type: "turn.proposed.completed", - ...(yield* makeEventStamp()), - provider: PROVIDER, - threadId: input.threadId, - turnId: ctx?.activeTurnId, - payload: { planMarkdown: extractPlanMarkdown(params) }, - raw: { - source: "acp.cursor.extension", - method: "cursor/create_plan", - payload: params, - }, - }); - return { accepted: true } as const; - }), - ), - ); - yield* acp.handleExtNotification( - "cursor/update_todos", - CursorUpdateTodosRequest, - (params) => - mapExtensionFailure( - Effect.gen(function* () { - yield* logNative( - input.threadId, - "cursor/update_todos", - params, - "acp.cursor.extension", - ); - if (ctx) { - yield* emitPlanUpdate( - ctx, - extractTodosAsPlan(params), - params, - "acp.cursor.extension", - "cursor/update_todos", - ); - } - }), - ), - ); - yield* acp.handleRequestPermission((params) => - mapExtensionFailure( - Effect.gen(function* () { - yield* logNative( - input.threadId, - "session/request_permission", - params, - "acp.jsonrpc", - ); - if (input.runtimeMode === "full-access") { - const autoApprovedOptionId = selectAutoApprovedPermissionOption(params); - if (autoApprovedOptionId !== undefined) { - return { - outcome: { - outcome: "selected" as const, - optionId: autoApprovedOptionId, - }, - }; - } - } - const permissionRequest = parsePermissionRequest(params); - const requestId = ApprovalRequestId.make(yield* randomUUIDv4); - const runtimeRequestId = RuntimeRequestId.make(requestId); - const decision = yield* Deferred.make(); - pendingApprovals.set(requestId, { - decision, - kind: permissionRequest.kind, - }); - yield* offerRuntimeEvent( - makeAcpRequestOpenedEvent({ - stamp: yield* makeEventStamp(), - provider: PROVIDER, - threadId: input.threadId, - turnId: ctx?.activeTurnId, - requestId: runtimeRequestId, - permissionRequest, - detail: - permissionRequest.detail ?? - encodeJsonStringForDiagnostics(params)?.slice(0, 2000) ?? - "[unserializable params]", - args: params, - source: "acp.jsonrpc", - method: "session/request_permission", - rawPayload: params, - }), - ); - const resolved = yield* Deferred.await(decision); - pendingApprovals.delete(requestId); - yield* offerRuntimeEvent( - makeAcpRequestResolvedEvent({ - stamp: yield* makeEventStamp(), - provider: PROVIDER, - threadId: input.threadId, - turnId: ctx?.activeTurnId, - requestId: runtimeRequestId, - permissionRequest, - decision: resolved, - }), - ); - return { - outcome: - resolved === "cancel" - ? ({ outcome: "cancelled" } as const) - : { - outcome: "selected" as const, - optionId: acpPermissionOutcome(resolved), - }, - }; - }), - ), - ); - return yield* acp.start(); - }).pipe( - Effect.mapError((error) => - mapAcpToAdapterError(PROVIDER, input.threadId, "session/start", error), - ), - ); - - yield* applyRequestedSessionConfiguration({ - runtime: acp, - runtimeMode: input.runtimeMode, - interactionMode: undefined, - modelSelection: cursorModelSelection, - mapError: ({ cause, method }) => - mapAcpToAdapterError(PROVIDER, input.threadId, method, cause), - }); - - const now = yield* nowIso; - const session: ProviderSession = { + } + if (!input.cwd?.trim()) { + return yield* new ProviderAdapterValidationError({ provider: PROVIDER, - providerInstanceId: boundInstanceId, - status: "ready", - runtimeMode: input.runtimeMode, - cwd, - model: cursorModelSelection?.model, - threadId: input.threadId, - resumeCursor: { - schemaVersion: CURSOR_RESUME_VERSION, - sessionId: started.sessionId, - }, - createdAt: now, - updatedAt: now, - }; + operation: "startSession", + issue: "cwd is required and must be non-empty.", + }); + } - ctx = { - threadId: input.threadId, - session, - scope: sessionScope, - acp, - notificationFiber: undefined, - pendingApprovals, - pendingUserInputs, - turns: [], - lastPlanFingerprint: undefined, - activeTurnId: undefined, - promptsInFlight: 0, - stopped: false, - }; + const cwd = nodePath.resolve(input.cwd.trim()); + const cursorModelSelection = + input.modelSelection?.provider === "cursor" ? input.modelSelection : undefined; + const existing = sessions.get(input.threadId); + if (existing && !existing.stopped) { + yield* stopSessionInternal(existing); + } - const nf = yield* Stream.runDrain( - Stream.mapEffect(acp.getEvents(), (event) => + const cursorSettings = yield* serverSettingsService.getSettings.pipe( + Effect.map((settings) => settings.providers.cursor), + Effect.mapError( + (error) => + new ProviderAdapterProcessError({ + provider: PROVIDER, + threadId: input.threadId, + detail: error.message, + cause: error, + }), + ), + ); + + const pendingApprovals = new Map(); + const pendingUserInputs = new Map(); + let ctx!: CursorSessionContext; + + const resumeSessionId = parseCursorResume(input.resumeCursor)?.sessionId; + const acpNativeLoggers = makeAcpNativeLoggers({ + nativeEventLogger, + provider: PROVIDER, + threadId: input.threadId, + }); + + const acp = yield* makeCursorAcpRuntime({ + cursorSettings, + childProcessSpawner, + cwd, + ...(resumeSessionId ? { resumeSessionId } : {}), + clientInfo: { name: "t3-code", version: "0.0.0" }, + ...acpNativeLoggers, + }).pipe( + Effect.mapError( + (cause) => + new ProviderAdapterProcessError({ + provider: PROVIDER, + threadId: input.threadId, + detail: cause.message, + cause, + }), + ), + ); + const started = yield* Effect.gen(function* () { + yield* acp.handleExtRequest("cursor/ask_question", CursorAskQuestionRequest, (params) => + Effect.gen(function* () { + yield* logNative( + input.threadId, + "cursor/ask_question", + params, + "acp.cursor.extension", + ); + const requestId = ApprovalRequestId.make(crypto.randomUUID()); + const runtimeRequestId = RuntimeRequestId.make(requestId); + const answers = yield* Deferred.make(); + pendingUserInputs.set(requestId, { answers }); + yield* offerRuntimeEvent({ + type: "user-input.requested", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + turnId: ctx?.activeTurnId, + requestId: runtimeRequestId, + payload: { questions: extractAskQuestions(params) }, + raw: { + source: "acp.cursor.extension", + method: "cursor/ask_question", + payload: params, + }, + }); + const resolved = yield* Deferred.await(answers); + pendingUserInputs.delete(requestId); + yield* offerRuntimeEvent({ + type: "user-input.resolved", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + turnId: ctx?.activeTurnId, + requestId: runtimeRequestId, + payload: { answers: resolved }, + }); + return { answers: resolved }; + }), + ); + yield* acp.handleExtRequest("cursor/create_plan", CursorCreatePlanRequest, (params) => + Effect.gen(function* () { + yield* logNative( + input.threadId, + "cursor/create_plan", + params, + "acp.cursor.extension", + ); + yield* offerRuntimeEvent({ + type: "turn.proposed.completed", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + turnId: ctx?.activeTurnId, + payload: { planMarkdown: extractPlanMarkdown(params) }, + raw: { + source: "acp.cursor.extension", + method: "cursor/create_plan", + payload: params, + }, + }); + return { accepted: true } as const; + }), + ); + yield* acp.handleExtNotification( + "cursor/update_todos", + CursorUpdateTodosRequest, + (params) => Effect.gen(function* () { - switch (event._tag) { - case "EventStreamBarrier": - yield* Deferred.succeed(event.acknowledge, undefined); - return; - case "ModeChanged": - return; - case "AssistantItemStarted": - yield* offerRuntimeEvent( - makeAcpAssistantItemEvent({ - stamp: yield* makeEventStamp(), - provider: PROVIDER, - threadId: ctx.threadId, - turnId: ctx.activeTurnId, - itemId: event.itemId, - lifecycle: "item.started", - }), - ); - return; - case "AssistantItemCompleted": - yield* offerRuntimeEvent( - makeAcpAssistantItemEvent({ - stamp: yield* makeEventStamp(), - provider: PROVIDER, - threadId: ctx.threadId, - turnId: ctx.activeTurnId, - itemId: event.itemId, - lifecycle: "item.completed", - }), - ); - return; - case "PlanUpdated": - yield* logNative( - ctx.threadId, - "session/update", - event.rawPayload, - "acp.jsonrpc", - ); - yield* emitPlanUpdate( - ctx, - event.payload, - event.rawPayload, - "acp.jsonrpc", - "session/update", - ); - return; - case "ToolCallUpdated": - yield* logNative( - ctx.threadId, - "session/update", - event.rawPayload, - "acp.jsonrpc", - ); - yield* offerRuntimeEvent( - makeAcpToolCallEvent({ - stamp: yield* makeEventStamp(), - provider: PROVIDER, - threadId: ctx.threadId, - turnId: ctx.activeTurnId, - toolCall: event.toolCall, - rawPayload: event.rawPayload, - }), - ); - return; - case "ContentDelta": - yield* logNative( - ctx.threadId, - "session/update", - event.rawPayload, - "acp.jsonrpc", - ); - yield* offerRuntimeEvent( - makeAcpContentDeltaEvent({ - stamp: yield* makeEventStamp(), - provider: PROVIDER, - threadId: ctx.threadId, - turnId: ctx.activeTurnId, - ...(event.itemId ? { itemId: event.itemId } : {}), - text: event.text, - rawPayload: event.rawPayload, - }), - ); - return; + yield* logNative( + input.threadId, + "cursor/update_todos", + params, + "acp.cursor.extension", + ); + if (ctx) { + yield* emitPlanUpdate( + ctx, + extractTodosAsPlan(params), + params, + "acp.cursor.extension", + "cursor/update_todos", + ); } }), - ), - ).pipe( - Effect.catch((cause) => - Effect.logError("Failed to process Cursor runtime notification.", { cause }), - ), - Effect.forkChild, ); + yield* acp.handleRequestPermission((params) => + Effect.gen(function* () { + yield* logNative(input.threadId, "session/request_permission", params, "acp.jsonrpc"); + if (ctx?.session.runtimeMode === "full-access") { + const autoApprovedOptionId = selectAutoApprovedPermissionOption(params); + if (autoApprovedOptionId !== undefined) { + return { + outcome: { + outcome: "selected" as const, + optionId: autoApprovedOptionId, + }, + }; + } + } + const permissionRequest = parsePermissionRequest(params); + const requestId = ApprovalRequestId.make(crypto.randomUUID()); + const runtimeRequestId = RuntimeRequestId.make(requestId); + const decision = yield* Deferred.make(); + pendingApprovals.set(requestId, { + decision, + kind: permissionRequest.kind, + }); + yield* offerRuntimeEvent( + makeAcpRequestOpenedEvent({ + stamp: yield* makeEventStamp(), + provider: PROVIDER, + threadId: input.threadId, + turnId: ctx?.activeTurnId, + requestId: runtimeRequestId, + permissionRequest, + detail: permissionRequest.detail ?? JSON.stringify(params).slice(0, 2000), + args: params, + source: "acp.jsonrpc", + method: "session/request_permission", + rawPayload: params, + }), + ); + const resolved = yield* Deferred.await(decision); + pendingApprovals.delete(requestId); + yield* offerRuntimeEvent( + makeAcpRequestResolvedEvent({ + stamp: yield* makeEventStamp(), + provider: PROVIDER, + threadId: input.threadId, + turnId: ctx?.activeTurnId, + requestId: runtimeRequestId, + permissionRequest, + decision: resolved, + }), + ); + return { + outcome: + resolved === "cancel" + ? ({ outcome: "cancelled" } as const) + : { + outcome: "selected" as const, + optionId: acpPermissionOutcome(resolved), + }, + }; + }), + ); + return yield* acp.start(); + }).pipe( + Effect.mapError((error) => + mapAcpToAdapterError(PROVIDER, input.threadId, "session/start", error), + ), + ); - ctx.notificationFiber = nf; - sessions.set(input.threadId, ctx); - sessionScopeTransferred = true; + const now = yield* nowIso; + const session: ProviderSession = { + provider: PROVIDER, + status: "ready", + runtimeMode: input.runtimeMode, + cwd, + model: cursorModelSelection?.model, + threadId: input.threadId, + resumeCursor: { + schemaVersion: CURSOR_RESUME_VERSION, + sessionId: started.sessionId, + }, + createdAt: now, + updatedAt: now, + }; - yield* offerRuntimeEvent({ - type: "session.started", - ...(yield* makeEventStamp()), - provider: PROVIDER, - threadId: input.threadId, - payload: { resume: started.initializeResult }, - }); - yield* offerRuntimeEvent({ - type: "session.state.changed", - ...(yield* makeEventStamp()), - provider: PROVIDER, - threadId: input.threadId, - payload: { state: "ready", reason: "Cursor ACP session ready" }, - }); - yield* offerRuntimeEvent({ - type: "thread.started", - ...(yield* makeEventStamp()), - provider: PROVIDER, - threadId: input.threadId, - payload: { providerThreadId: started.sessionId }, - }); + ctx = { + threadId: input.threadId, + session, + acp, + notificationFiber: undefined, + pendingApprovals, + pendingUserInputs, + turns: [], + lastPlanFingerprint: undefined, + activeTurnId: undefined, + stopped: false, + }; - return session; - }).pipe(Effect.scoped), - ); + const nf = yield* Stream.runDrain( + Stream.mapEffect(acp.events, (event) => + Effect.gen(function* () { + switch (event._tag) { + case "ModeChanged": + return; + case "AssistantItemStarted": + yield* offerRuntimeEvent( + makeAcpAssistantItemEvent({ + stamp: yield* makeEventStamp(), + provider: PROVIDER, + threadId: ctx.threadId, + turnId: ctx.activeTurnId, + itemId: event.itemId, + lifecycle: "item.started", + }), + ); + return; + case "AssistantItemCompleted": + yield* offerRuntimeEvent( + makeAcpAssistantItemEvent({ + stamp: yield* makeEventStamp(), + provider: PROVIDER, + threadId: ctx.threadId, + turnId: ctx.activeTurnId, + itemId: event.itemId, + lifecycle: "item.completed", + }), + ); + return; + case "PlanUpdated": + yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc"); + yield* emitPlanUpdate( + ctx, + event.payload, + event.rawPayload, + "acp.jsonrpc", + "session/update", + ); + return; + case "ToolCallUpdated": + yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc"); + yield* offerRuntimeEvent( + makeAcpToolCallEvent({ + stamp: yield* makeEventStamp(), + provider: PROVIDER, + threadId: ctx.threadId, + turnId: ctx.activeTurnId, + toolCall: event.toolCall, + rawPayload: event.rawPayload, + }), + ); + return; + case "ContentDelta": + yield* logNative(ctx.threadId, "session/update", event.rawPayload, "acp.jsonrpc"); + yield* offerRuntimeEvent( + makeAcpContentDeltaEvent({ + stamp: yield* makeEventStamp(), + provider: PROVIDER, + threadId: ctx.threadId, + turnId: ctx.activeTurnId, + ...(event.itemId ? { itemId: event.itemId } : {}), + text: event.text, + rawPayload: event.rawPayload, + }), + ); + return; + } + }), + ), + ).pipe(Effect.forkChild); + + ctx.notificationFiber = nf; + sessions.set(input.threadId, ctx); + + yield* offerRuntimeEvent({ + type: "session.started", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + payload: { resume: started.initializeResult }, + }); + yield* offerRuntimeEvent({ + type: "session.state.changed", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + payload: { state: "ready", reason: "Cursor ACP session ready" }, + }); + yield* offerRuntimeEvent({ + type: "thread.started", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + payload: { providerThreadId: started.sessionId }, + }); + + return session; + }); const sendTurn: CursorAdapterShape["sendTurn"] = (input) => Effect.gen(function* () { const ctx = yield* requireSession(input.threadId); - // A sendTurn while a prompt is in flight is a steer: the agent folds - // the new prompt into the ongoing work, so the active turn id is - // reused instead of opening a new turn. - const steeringTurnId = ctx.promptsInFlight > 0 ? ctx.activeTurnId : undefined; - const turnId = steeringTurnId ?? TurnId.make(yield* randomUUIDv4); - // Count this prompt immediately so a superseded in-flight prompt - // resolving from here on does not settle the turn; the matching - // decrement is the `ensuring` below. - ctx.promptsInFlight += 1; + const turnId = TurnId.make(crypto.randomUUID()); + const turnModelSelection = + input.modelSelection?.provider === "cursor" ? input.modelSelection : undefined; + const model = turnModelSelection?.model ?? ctx.session.model; + const resolvedModel = resolveCursorAcpBaseModelId(model); + yield* applyCursorAcpModelSelection({ + runtime: ctx.acp, + model, + modelOptions: turnModelSelection?.options, + mapError: ({ cause }) => + mapAcpToAdapterError(PROVIDER, input.threadId, "session/set_config_option", cause), + }); + ctx.activeTurnId = turnId; + ctx.lastPlanFingerprint = undefined; + ctx.session = { + ...ctx.session, + activeTurnId: turnId, + updatedAt: yield* nowIso, + }; - return yield* Effect.gen(function* () { - const turnModelSelection = - input.modelSelection?.instanceId === boundInstanceId ? input.modelSelection : undefined; - const model = turnModelSelection?.model ?? ctx.session.model; - const resolvedModel = resolveCursorAcpBaseModelId(model); - yield* applyRequestedSessionConfiguration({ - runtime: ctx.acp, - runtimeMode: ctx.session.runtimeMode, - interactionMode: input.interactionMode, - modelSelection: - model === undefined - ? undefined - : { - model, - options: turnModelSelection?.options, - }, - mapError: ({ cause, method }) => - mapAcpToAdapterError(PROVIDER, input.threadId, method, cause), - }); - ctx.activeTurnId = turnId; - if (steeringTurnId === undefined) { - ctx.lastPlanFingerprint = undefined; - } - ctx.session = { - ...ctx.session, - activeTurnId: turnId, - updatedAt: yield* nowIso, - }; + const requestedModeId = resolveRequestedModeId({ + interactionMode: input.interactionMode, + runtimeMode: ctx.session.runtimeMode, + modeState: yield* ctx.acp.getModeState, + }); + if (requestedModeId) { + yield* Effect.ignore( + ctx.acp + .setMode(requestedModeId) + .pipe( + Effect.mapError((error) => + mapAcpToAdapterError(PROVIDER, input.threadId, "session/set_mode", error), + ), + ), + ); + } + + yield* offerRuntimeEvent({ + type: "turn.started", + ...(yield* makeEventStamp()), + provider: PROVIDER, + threadId: input.threadId, + turnId, + payload: { model: resolvedModel }, + }); if (steeringTurnId === undefined) { yield* offerRuntimeEvent({ @@ -1062,7 +907,6 @@ export function makeCursorAdapter( Effect.gen(function* () { const ctx = yield* requireSession(threadId); yield* settlePendingApprovalsAsCancelled(ctx.pendingApprovals); - yield* settlePendingUserInputsAsEmptyAnswers(ctx.pendingUserInputs); yield* Effect.ignore( ctx.acp.cancel.pipe( Effect.mapError((error) => @@ -1130,13 +974,10 @@ export function makeCursorAdapter( }); const stopSession: CursorAdapterShape["stopSession"] = (threadId) => - withThreadLock( - threadId, - Effect.gen(function* () { - const ctx = yield* requireSession(threadId); - yield* stopSessionInternal(ctx); - }), - ); + Effect.gen(function* () { + const ctx = yield* requireSession(threadId); + yield* stopSessionInternal(ctx); + }); const listSessions: CursorAdapterShape["listSessions"] = () => Effect.sync(() => Array.from(sessions.values(), (c) => ({ ...c.session }))); @@ -1152,16 +993,10 @@ export function makeCursorAdapter( yield* Effect.addFinalizer(() => Effect.forEach(sessions.values(), stopSessionInternal, { discard: true }).pipe( - Effect.catch((cause) => - Effect.logError("Failed to emit Cursor session shutdown event.", { cause }), - ), - Effect.tap(() => PubSub.shutdown(runtimeEventPubSub)), - Effect.tap(() => managedNativeEventLogger?.close() ?? Effect.void), + Effect.tap(() => Queue.shutdown(runtimeEventQueue)), ), ); - const streamEvents = Stream.fromPubSub(runtimeEventPubSub); - return { provider: PROVIDER, capabilities: { sessionModelSwitch: "in-session" }, @@ -1176,7 +1011,9 @@ export function makeCursorAdapter( listSessions, hasSession, stopAll, - streamEvents, + get streamEvents() { + return Stream.fromQueue(runtimeEventQueue); + }, } satisfies CursorAdapterShape; }); } diff --git a/apps/server/src/provider/Layers/CursorProvider.test.ts b/apps/server/src/provider/Layers/CursorProvider.test.ts index e969a7beab..ee15bd2a52 100644 --- a/apps/server/src/provider/Layers/CursorProvider.test.ts +++ b/apps/server/src/provider/Layers/CursorProvider.test.ts @@ -1,21 +1,9 @@ -import * as NodeOS from "node:os"; - -import * as NodeServices from "@effect/platform-node/NodeServices"; -import type * as Crypto from "effect/Crypto"; -import * as Effect from "effect/Effect"; -import * as FileSystem from "effect/FileSystem"; -import * as Path from "effect/Path"; -import type * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; -import { describe, expect, it } from "vite-plus/test"; +import { describe, expect, it } from "vitest"; import type * as EffectAcpSchema from "effect-acp/schema"; -import type { CursorSettings } from "@t3tools/contracts"; -import { createModelCapabilities } from "@t3tools/shared/model"; import { - buildCursorProviderSnapshot, buildCursorCapabilitiesFromConfigOptions, - checkCursorProviderStatus, - discoverCursorModelsViaAcp, + buildCursorDiscoveredModelsFromConfigOptions, getCursorFallbackModels, getCursorParameterizedModelPickerUnsupportedMessage, parseCursorAboutOutput, @@ -25,139 +13,6 @@ import { resolveCursorAcpConfigUpdates, } from "./CursorProvider.ts"; -const runNode = ( - effect: Effect.Effect< - A, - E, - ChildProcessSpawner.ChildProcessSpawner | Crypto.Crypto | FileSystem.FileSystem | Path.Path - >, -): Promise => Effect.runPromise(effect.pipe(Effect.provide(NodeServices.layer))); - -const resolveMockAgentPath = Effect.fn("resolveMockAgentPath")(function* () { - const path = yield* Path.Path; - return yield* path.fromFileUrl(new URL("../../../scripts/acp-mock-agent.ts", import.meta.url)); -}); - -function selectDescriptor( - id: string, - label: string, - options: ReadonlyArray<{ id: string; label: string; isDefault?: boolean }>, -) { - return { - id, - label, - type: "select" as const, - options: [...options], - ...(options.find((option) => option.isDefault)?.id - ? { currentValue: options.find((option) => option.isDefault)?.id } - : {}), - }; -} - -function booleanDescriptor(id: string, label: string, currentValue?: boolean) { - return { - id, - label, - type: "boolean" as const, - ...(typeof currentValue === "boolean" ? { currentValue } : {}), - }; -} - -const makeMockAgentWrapper = Effect.fn("makeMockAgentWrapper")(function* ( - extraEnv?: Record, -) { - const fileSystem = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - const mockAgentPath = yield* resolveMockAgentPath(); - const dir = yield* fileSystem.makeTempDirectory({ - directory: NodeOS.tmpdir(), - prefix: "cursor-provider-mock-", - }); - const wrapperPath = path.join(dir, "fake-agent.sh"); - const mockAgentCommand = ["node", mockAgentPath].map((arg) => JSON.stringify(arg)).join(" "); - const envExports = Object.entries(extraEnv ?? {}) - .map(([key, value]) => `export ${key}=${JSON.stringify(value)}`) - .join("\n"); - const script = `#!/bin/sh -${envExports} -exec ${mockAgentCommand} "$@" -`; - yield* fileSystem.writeFileString(wrapperPath, script); - yield* fileSystem.chmod(wrapperPath, 0o755); - return wrapperPath; -}); - -const makeMockAgentWithAboutWrapper = Effect.fn("makeMockAgentWithAboutWrapper")(function* () { - const fileSystem = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - const mockAgentPath = yield* resolveMockAgentPath(); - const dir = yield* fileSystem.makeTempDirectory({ - directory: NodeOS.tmpdir(), - prefix: "cursor-provider-about-mock-", - }); - const wrapperPath = path.join(dir, "fake-agent.sh"); - const mockAgentCommand = ["node", mockAgentPath].map((arg) => JSON.stringify(arg)).join(" "); - const script = `#!/bin/sh -if [ "$1" = "about" ]; then - printf 'CLI Version 2026.04.09-f2b0fcd\\n' - printf 'User Email cursor@example.com\\n' - exit 0 -fi -exec ${mockAgentCommand} "$@" -`; - yield* fileSystem.writeFileString(wrapperPath, script); - yield* fileSystem.chmod(wrapperPath, 0o755); - return wrapperPath; -}); - -const waitForFileContent = Effect.fn("waitForFileContent")(function* ( - filePath: string, - attempts = 40, -) { - const fileSystem = yield* FileSystem.FileSystem; - for (let attempt = 0; attempt < attempts; attempt += 1) { - const content = yield* fileSystem - .readFileString(filePath) - .pipe(Effect.catch(() => Effect.void)); - if (content !== undefined) { - if (content.trim().length > 0) { - return content; - } - } - yield* Effect.sleep("50 millis"); - } - return yield* Effect.die(`Timed out waiting for file content at ${filePath}`); -}); - -const makeProviderStatusEnvFixture = Effect.fn("makeProviderStatusEnvFixture")(function* () { - const fileSystem = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - const tempDir = yield* fileSystem.makeTempDirectory({ - directory: NodeOS.tmpdir(), - prefix: "cursor-provider-status-env-", - }); - return { - requestLogPath: path.join(tempDir, "requests.ndjson"), - wrapperPath: yield* makeMockAgentWithAboutWrapper(), - }; -}); - -const makeExitLogFixture = Effect.fn("makeExitLogFixture")(function* (prefix: string) { - const fileSystem = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - const tempDir = yield* fileSystem.makeTempDirectory({ - directory: NodeOS.tmpdir(), - prefix, - }); - const exitLogPath = path.join(tempDir, "exit.log"); - return { - exitLogPath, - wrapperPath: yield* makeMockAgentWrapper({ - T3_ACP_EXIT_LOG_PATH: exitLogPath, - }), - }; -}); - const parameterizedGpt54ConfigOptions = [ { type: "select", @@ -235,39 +90,33 @@ const parameterizedClaudeConfigOptions = [ }, ] satisfies ReadonlyArray; -const parameterizedClaudeModelOptionConfigOptions = [ +const sessionNewCursorConfigOptions = [ { type: "select", - currentValue: "claude-opus-4-6", - options: [{ name: "Opus 4.6", value: "claude-opus-4-6" }], + currentValue: "agent", + options: [ + { name: "Agent", value: "agent", description: "Full agent capabilities with tool access" }, + ], + category: "mode", + id: "mode", + name: "Mode", + description: "Controls how the agent executes tasks", + }, + { + type: "select", + currentValue: "composer-2", + options: [ + { name: "Auto", value: "default" }, + { name: "Composer 2", value: "composer-2" }, + { name: "GPT-5.4", value: "gpt-5.4" }, + { name: "Sonnet 4.6", value: "claude-sonnet-4-6" }, + { name: "Opus 4.6", value: "claude-opus-4-6" }, + { name: "Codex 5.3 Spark", value: "gpt-5.3-codex-spark" }, + ], category: "model", id: "model", name: "Model", - }, - { - type: "select", - currentValue: "high", - options: [ - { name: "Low", value: "low" }, - { name: "Medium", value: "medium" }, - { name: "High", value: "high" }, - ], - category: "thought_level", - id: "reasoning", - name: "Reasoning", - }, - { - type: "select", - currentValue: "max", - options: [ - { name: "Low", value: "low" }, - { name: "Medium", value: "medium" }, - { name: "High", value: "high" }, - { name: "Max", value: "max" }, - ], - category: "model_option", - id: "effort", - name: "Effort", + description: "Controls which model is used for responses", }, { type: "select", @@ -279,39 +128,10 @@ const parameterizedClaudeModelOptionConfigOptions = [ category: "model_config", id: "fast", name: "Fast", - }, - { - type: "select", - currentValue: "true", - options: [ - { name: "Off", value: "false" }, - { name: ":icon-brain:", value: "true" }, - ], - category: "model_config", - id: "thinking", - name: "Thinking", + description: "Faster speeds.", }, ] satisfies ReadonlyArray; -const baseCursorSettings: CursorSettings = { - enabled: true, - binaryPath: "cursor-agent", - apiEndpoint: "", - customModels: [], -}; -const cursorAcpDiscoveryFailedMessage = [ - "Cursor ACP model discovery failed.", - "Cursor CLI setup may be incomplete; install or enable the Cursor CLI, restart T3 Code, and try again.", - "See https://cursor.com/docs/cli/installation.", - "Check server logs for ACP details.", -].join(" "); -const missingCursorBinaryPath = "/definitely/not/installed/t3-cursor-agent"; -const cursorCliCommandMissingMessage = [ - `Cursor CLI command \`${missingCursorBinaryPath}\` was not found.`, - `Install or enable the Cursor CLI, make sure \`${missingCursorBinaryPath}\` is on PATH, then restart T3 Code.`, - "See https://cursor.com/docs/cli/installation.", -].join(" "); - describe("getCursorFallbackModels", () => { it("does not publish any built-in cursor models before ACP discovery", () => { expect( @@ -322,55 +142,6 @@ describe("getCursorFallbackModels", () => { }); }); -describe("buildCursorProviderSnapshot", () => { - it("downgrades ready status to warning when ACP model discovery times out", () => { - expect( - buildCursorProviderSnapshot({ - checkedAt: "2026-01-01T00:00:00.000Z", - cursorSettings: baseCursorSettings, - parsed: { - version: "2026.04.09-f2b0fcd", - status: "ready", - auth: { status: "authenticated", type: "Team", label: "Cursor Team Subscription" }, - }, - discoveryWarning: "Cursor ACP model discovery timed out after 15000ms.", - }), - ).toMatchObject({ - status: "warning", - message: "Cursor ACP model discovery timed out after 15000ms.", - models: [], - }); - }); - - it("preserves provider error state while appending discovery warnings", () => { - expect( - buildCursorProviderSnapshot({ - checkedAt: "2026-01-01T00:00:00.000Z", - cursorSettings: { - ...baseCursorSettings, - customModels: ["claude-sonnet-4-6"], - }, - parsed: { - version: "2026.04.09-f2b0fcd", - status: "error", - auth: { status: "unauthenticated" }, - message: "Cursor Agent is not authenticated. Run `agent login` and try again.", - }, - discoveryWarning: cursorAcpDiscoveryFailedMessage, - }), - ).toMatchObject({ - status: "error", - message: `Cursor Agent is not authenticated. Run \`agent login\` and try again. ${cursorAcpDiscoveryFailedMessage}`, - models: [ - { - slug: "claude-sonnet-4-6", - isCustom: true, - }, - ], - }); - }); -}); - describe("buildCursorCapabilitiesFromConfigOptions", () => { it("derives model capabilities from parameterized Cursor ACP config options", () => { expect(buildCursorCapabilitiesFromConfigOptions(parameterizedGpt54ConfigOptions)).toEqual( @@ -406,25 +177,6 @@ describe("buildCursorCapabilitiesFromConfigOptions", () => { }), ); }); - - it("prefers the newer model_option effort control over legacy thought_level", () => { - expect( - buildCursorCapabilitiesFromConfigOptions(parameterizedClaudeModelOptionConfigOptions), - ).toEqual( - createModelCapabilities({ - optionDescriptors: [ - selectDescriptor("reasoning", "Effort", [ - { id: "low", label: "Low" }, - { id: "medium", label: "Medium" }, - { id: "high", label: "High" }, - { id: "max", label: "Max", isDefault: true }, - ]), - booleanDescriptor("fastMode", "Fast", true), - booleanDescriptor("thinking", "Thinking", true), - ], - }), - ); - }); }); describe("checkCursorProviderStatus", () => { @@ -474,46 +226,6 @@ describe("checkCursorProviderStatus", () => { }); }); -describe("discoverCursorModelsViaAcp", () => { - it("keeps the ACP probe runtime alive long enough to discover models", async () => { - const wrapperPath = await runNode(makeMockAgentWrapper()); - - const models = await runNode( - discoverCursorModelsViaAcp({ - enabled: true, - binaryPath: wrapperPath, - apiEndpoint: "", - customModels: [], - }).pipe(Effect.scoped), - ); - - expect(models.map((model) => model.slug)).toEqual([ - "default", - "composer-2", - "gpt-5.4", - "claude-opus-4-6", - ]); - }); - - it("closes the ACP probe runtime after discovery completes", async () => { - const { exitLogPath, wrapperPath } = await runNode( - makeExitLogFixture("cursor-provider-exit-log-"), - ); - - await runNode( - discoverCursorModelsViaAcp({ - enabled: true, - binaryPath: wrapperPath, - apiEndpoint: "", - customModels: [], - }), - ); - - const exitLog = await runNode(waitForFileContent(exitLogPath)); - expect(exitLog).toContain("SIGTERM"); - }); -}); - describe("parseCursorAboutOutput", () => { it("parses json about output and forwards subscription metadata", () => { expect( @@ -665,16 +377,4 @@ describe("resolveCursorAcpConfigUpdates", () => { ]), ).toEqual([{ configId: "fast", value: "false" }]); }); - - it("writes Cursor effort changes through the newer model_option config when available", () => { - expect( - resolveCursorAcpConfigUpdates(parameterizedClaudeModelOptionConfigOptions, [ - { id: "reasoning", value: "max" }, - { id: "thinking", value: false }, - ]), - ).toEqual([ - { configId: "effort", value: "max" }, - { configId: "thinking", value: "false" }, - ]); - }); }); diff --git a/apps/server/src/provider/Layers/OpenCodeAdapter.ts b/apps/server/src/provider/Layers/OpenCodeAdapter.ts index 73c23b77e6..ae54bd2f20 100644 --- a/apps/server/src/provider/Layers/OpenCodeAdapter.ts +++ b/apps/server/src/provider/Layers/OpenCodeAdapter.ts @@ -281,7 +281,28 @@ type EventBaseInput = { readonly requestId?: string | undefined; readonly createdAt?: string | undefined; readonly raw?: unknown; -}; +}): Pick< + ProviderRuntimeEvent, + "eventId" | "provider" | "threadId" | "createdAt" | "turnId" | "itemId" | "requestId" | "raw" +> { + return { + eventId: EventId.make(randomUUID()), + provider: PROVIDER, + threadId: input.threadId, + createdAt: input.createdAt ?? nowIso(), + ...(input.turnId ? { turnId: input.turnId } : {}), + ...(input.itemId ? { itemId: RuntimeItemId.make(input.itemId) } : {}), + ...(input.requestId ? { requestId: RuntimeRequestId.make(input.requestId) } : {}), + ...(input.raw !== undefined + ? { + raw: { + source: "opencode.sdk.event", + payload: input.raw, + } as unknown as ProviderRuntimeEvent["raw"], + } + : {}), + }; +} function toToolLifecycleItemType(toolName: string): ToolLifecycleItemType { const normalized = toolName.toLowerCase(); diff --git a/apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts b/apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts index c4145ecf1a..55e5cf5274 100644 --- a/apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts +++ b/apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts @@ -10,16 +10,12 @@ import * as Layer from "effect/Layer"; import * as PubSub from "effect/PubSub"; import * as Stream from "effect/Stream"; -import type * as ClaudeAdapter from "../Services/ClaudeAdapter.ts"; -import type * as CodexAdapter from "../Services/CodexAdapter.ts"; -import type * as CursorAdapter from "../Services/CursorAdapter.ts"; -import type * as OpenCodeAdapter from "../Services/OpenCodeAdapter.ts"; -import * as ProviderAdapterRegistry from "../Services/ProviderAdapterRegistry.ts"; -import * as ProviderInstanceRegistry from "../Services/ProviderInstanceRegistry.ts"; -import type { ProviderInstance } from "../ProviderDriver.ts"; -import { makeManualOnlyProviderMaintenanceCapabilities } from "../providerMaintenance.ts"; -import type * as TextGeneration from "../../textGeneration/TextGeneration.ts"; -import * as ProviderAdapterRegistryLayer from "./ProviderAdapterRegistry.ts"; +import { ClaudeAdapter, type ClaudeAdapterShape } from "../Services/ClaudeAdapter.ts"; +import { CodexAdapter, type CodexAdapterShape } from "../Services/CodexAdapter.ts"; +import { CursorAdapter, type CursorAdapterShape } from "../Services/CursorAdapter.ts"; +import { ProviderAdapterRegistry } from "../Services/ProviderAdapterRegistry.ts"; +import { ProviderAdapterRegistryLive } from "./ProviderAdapterRegistry.ts"; +import { ProviderUnsupportedError } from "../Errors.ts"; import * as NodeServices from "@effect/platform-node/NodeServices"; const CODEX_DRIVER = ProviderDriverKind.make("codex"); @@ -61,8 +57,8 @@ const fakeClaudeAdapter: ClaudeAdapter.ClaudeAdapterShape = { streamEvents: Stream.empty, }; -const fakeOpenCodeAdapter: OpenCodeAdapter.OpenCodeAdapterShape = { - provider: OPENCODE_DRIVER, +const fakeCursorAdapter: CursorAdapterShape = { + provider: "cursor", capabilities: { sessionModelSwitch: "in-session" }, startSession: vi.fn(), sendTurn: vi.fn(), @@ -78,78 +74,17 @@ const fakeOpenCodeAdapter: OpenCodeAdapter.OpenCodeAdapterShape = { streamEvents: Stream.empty, }; -const fakeCursorAdapter: CursorAdapter.CursorAdapterShape = { - provider: CURSOR_DRIVER, - capabilities: { sessionModelSwitch: "in-session" }, - startSession: vi.fn(), - sendTurn: vi.fn(), - interruptTurn: vi.fn(), - respondToRequest: vi.fn(), - respondToUserInput: vi.fn(), - stopSession: vi.fn(), - listSessions: vi.fn(), - hasSession: vi.fn(), - readThread: vi.fn(), - rollbackThread: vi.fn(), - stopAll: vi.fn(), - streamEvents: Stream.empty, -}; - -// ProviderAdapterRegistryLive is now a facade over ProviderInstanceRegistry — -// it walks `listInstances` once at boot and surfaces the default-instance -// adapter keyed by its driver kind. To test the facade we supply four fake -// instances whose `instanceId === defaultInstanceIdForDriver(driverKind)` so -// they pass the default-instance filter. -const makeFakeInstance = ( - driverKindString: "codex" | "claudeAgent" | "cursor" | "opencode", - adapter: ProviderInstance["adapter"], -): ProviderInstance => { - const driverKind = ProviderDriverKind.make(driverKindString); - return { - instanceId: defaultInstanceIdForDriver(driverKind), - driverKind, - continuationIdentity: { - driverKind, - continuationKey: `${driverKind}:instance:${defaultInstanceIdForDriver(driverKind)}`, - }, - displayName: undefined, - enabled: true, - snapshot: { - maintenanceCapabilities: makeManualOnlyProviderMaintenanceCapabilities({ - provider: driverKind, - packageName: null, - }), - getSnapshot: Effect.succeed({} as unknown as ServerProvider), - refresh: Effect.succeed({} as unknown as ServerProvider), - streamChanges: Stream.empty, - }, - adapter, - textGeneration: {} as unknown as TextGeneration.TextGeneration["Service"], - }; -}; - -const fakeInstances: ReadonlyArray = [ - makeFakeInstance("codex", fakeCodexAdapter), - makeFakeInstance("claudeAgent", fakeClaudeAdapter), - makeFakeInstance("opencode", fakeOpenCodeAdapter), - makeFakeInstance("cursor", fakeCursorAdapter), -]; - -const fakeInstanceRegistryLayer = Layer.succeed(ProviderInstanceRegistry.ProviderInstanceRegistry, { - getInstance: (instanceId) => - Effect.succeed(fakeInstances.find((instance) => instance.instanceId === instanceId)), - listInstances: Effect.succeed(fakeInstances), - listUnavailable: Effect.succeed([]), - streamChanges: Stream.empty, - // Tests never drive changes through this fake; acquire a throwaway - // subscription on an unused PubSub so the shape is satisfied. - subscribeChanges: Effect.flatMap(PubSub.unbounded(), (pubsub) => PubSub.subscribe(pubsub)), -}); - -const layer = Layer.mergeAll( - Layer.provide( - ProviderAdapterRegistryLayer.ProviderAdapterRegistryLive, - fakeInstanceRegistryLayer, +const layer = it.layer( + Layer.mergeAll( + Layer.provide( + ProviderAdapterRegistryLive, + Layer.mergeAll( + Layer.succeed(CodexAdapter, fakeCodexAdapter), + Layer.succeed(ClaudeAdapter, fakeClaudeAdapter), + Layer.succeed(CursorAdapter, fakeCursorAdapter), + ), + ), + NodeServices.layer, ), NodeServices.layer, ); @@ -157,39 +92,24 @@ const layer = Layer.mergeAll( it.layer(layer)("ProviderAdapterRegistryLive", (it) => { it("resolves adapters and routing metadata from provider instances", () => Effect.gen(function* () { - const registry = yield* ProviderAdapterRegistry.ProviderAdapterRegistry; - const claudeInstanceId = defaultInstanceIdForDriver(CLAUDE_AGENT_DRIVER); - - const adapter = yield* registry.getByInstance(claudeInstanceId); - assert.strictEqual(adapter, fakeClaudeAdapter); - - const info = yield* registry.getInstanceInfo(claudeInstanceId); - assert.deepStrictEqual(info, { - instanceId: claudeInstanceId, - driverKind: CLAUDE_AGENT_DRIVER, - displayName: undefined, - accentColor: undefined, - enabled: true, - continuationIdentity: { - driverKind: CLAUDE_AGENT_DRIVER, - continuationKey: "claudeAgent:instance:claudeAgent", - }, - }); - - const instances = yield* registry.listInstances(); - assert.deepStrictEqual(instances, [ - defaultInstanceIdForDriver(CODEX_DRIVER), - claudeInstanceId, - defaultInstanceIdForDriver(OPENCODE_DRIVER), - defaultInstanceIdForDriver(CURSOR_DRIVER), - ]); + const registry = yield* ProviderAdapterRegistry; + const codex = yield* registry.getByProvider("codex"); + const claude = yield* registry.getByProvider("claudeAgent"); + const cursor = yield* registry.getByProvider("cursor"); + assert.equal(codex, fakeCodexAdapter); + assert.equal(claude, fakeClaudeAdapter); + assert.equal(cursor, fakeCursorAdapter); const providers = yield* registry.listProviders(); - assert.deepStrictEqual(providers, [ - CODEX_DRIVER, - CLAUDE_AGENT_DRIVER, - OPENCODE_DRIVER, - CURSOR_DRIVER, - ]); - })); + assert.deepEqual(providers, ["codex", "claudeAgent", "cursor"]); + }), + ); + + it.effect("fails with ProviderUnsupportedError for unknown providers", () => + Effect.gen(function* () { + const registry = yield* ProviderAdapterRegistry; + const adapter = yield* registry.getByProvider("unknown" as ProviderKind).pipe(Effect.result); + assertFailure(adapter, new ProviderUnsupportedError({ provider: "unknown" })); + }), + ); }); diff --git a/apps/server/src/provider/Layers/ProviderAdapterRegistry.ts b/apps/server/src/provider/Layers/ProviderAdapterRegistry.ts index b492399b10..afa28432bd 100644 --- a/apps/server/src/provider/Layers/ProviderAdapterRegistry.ts +++ b/apps/server/src/provider/Layers/ProviderAdapterRegistry.ts @@ -29,22 +29,22 @@ import { ProviderAdapterRegistry, type ProviderAdapterRegistryShape, } from "../Services/ProviderAdapterRegistry.ts"; +import { ClaudeAdapter } from "../Services/ClaudeAdapter.ts"; +import { CodexAdapter } from "../Services/CodexAdapter.ts"; +import { CursorAdapter } from "../Services/CursorAdapter.ts"; const makeProviderAdapterRegistry = Effect.fn("makeProviderAdapterRegistry")(function* () { const registry = yield* ProviderInstanceRegistry; - const getByInstance: ProviderAdapterRegistryShape["getByInstance"] = (instanceId) => - registry.getInstance(instanceId).pipe( - Effect.flatMap((instance) => - instance === undefined - ? Effect.fail( - new ProviderUnsupportedError({ - provider: instanceId, - }), - ) - : Effect.succeed(instance.adapter), - ), - ); +const makeProviderAdapterRegistry = Effect.fn("makeProviderAdapterRegistry")(function* ( + options?: ProviderAdapterRegistryLiveOptions, +) { + const cursorAdapterOption = yield* Effect.serviceOption(CursorAdapter); + const adapters = + options?.adapters !== undefined + ? options.adapters + : [yield* CodexAdapter, yield* ClaudeAdapter, yield* CursorAdapter]; + const byProvider = new Map(adapters.map((adapter) => [adapter.provider, adapter])); const getInstanceInfo: ProviderAdapterRegistryShape["getInstanceInfo"] = (instanceId) => registry.getInstance(instanceId).pipe( diff --git a/apps/server/src/provider/Layers/ProviderRegistry.test.ts b/apps/server/src/provider/Layers/ProviderRegistry.test.ts index c78ecb3952..94b98f8440 100644 --- a/apps/server/src/provider/Layers/ProviderRegistry.test.ts +++ b/apps/server/src/provider/Layers/ProviderRegistry.test.ts @@ -1498,20 +1498,23 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te ); yield* Effect.gen(function* () { - const registry = yield* ProviderRegistry.ProviderRegistry; - let providers = yield* registry.getProviders; - for ( - let attempts = 0; - attempts < 50 && - providers.find((provider) => provider.instanceId === "codex_personal")?.status !== - "error"; - attempts += 1 - ) { - yield* Effect.yieldNow; - providers = yield* registry.getProviders; + const registry = yield* ProviderRegistry; + + const initial = yield* registry.getProviders; + assert.deepStrictEqual(Array.isArray(initial), true); + + for (let attempt = 0; attempt < 100; attempt += 1) { + const refreshed = yield* registry.getProviders; + if (refreshed.find((status) => status.provider === "codex")?.status === "ready") { + break; + } + yield* Effect.promise(() => new Promise((resolve) => setTimeout(resolve, 5))); } - const codexPersonal = providers.find( - (provider) => provider.instanceId === "codex_personal", + + const ready = yield* registry.getProviders; + assert.strictEqual( + ready.find((status) => status.provider === "codex")?.status, + "ready", ); assert.notStrictEqual( codexPersonal, diff --git a/apps/server/src/provider/acp/AcpJsonRpcConnection.test.ts b/apps/server/src/provider/acp/AcpJsonRpcConnection.test.ts index b1ef0d3e59..9998947bf8 100644 --- a/apps/server/src/provider/acp/AcpJsonRpcConnection.test.ts +++ b/apps/server/src/provider/acp/AcpJsonRpcConnection.test.ts @@ -39,6 +39,8 @@ describe("AcpSessionRuntime", () => { _meta: { parameterizedModelPicker: true }, }, }); + + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -78,7 +80,7 @@ describe("AcpSessionRuntime", () => { }); expect(promptResult).toMatchObject({ stopReason: "end_turn" }); - const notes = Array.from(yield* Stream.runCollect(Stream.take(runtime.getEvents(), 4))); + const notes = Array.from(yield* Stream.runCollect(Stream.take(runtime.events, 4))); expect(notes).toHaveLength(4); expect(notes.map((note) => note._tag)).toEqual([ "PlanUpdated", @@ -99,6 +101,8 @@ describe("AcpSessionRuntime", () => { ) { expect(assistantDelta.itemId).toBe(assistantStart.itemId); } + + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -279,7 +283,7 @@ describe("AcpSessionRuntime", () => { }); expect(promptResult).toMatchObject({ stopReason: "end_turn" }); - const notes = Array.from(yield* Stream.runCollect(Stream.take(runtime.getEvents(), 7))); + const notes = Array.from(yield* Stream.runCollect(Stream.take(runtime.events, 7))); expect(notes.map((note) => note._tag)).toEqual([ "AssistantItemStarted", "ContentDelta", @@ -310,6 +314,8 @@ describe("AcpSessionRuntime", () => { expect(secondStarted.itemId).not.toBe(firstStarted.itemId); expect(secondDelta.itemId).toBe(secondStarted.itemId); } + + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -340,7 +346,7 @@ describe("AcpSessionRuntime", () => { }); expect(promptResult).toMatchObject({ stopReason: "end_turn" }); - const notes = Array.from(yield* Stream.runCollect(Stream.take(runtime.getEvents(), 1))); + const notes = Array.from(yield* Stream.runCollect(Stream.take(runtime.events, 1))); expect(notes.map((note) => note._tag)).toEqual(["ToolCallUpdated"]); const toolCall = notes[0]; expect(toolCall?._tag).toBe("ToolCallUpdated"); @@ -348,6 +354,8 @@ describe("AcpSessionRuntime", () => { expect(toolCall.toolCall.status).toBe("completed"); expect(toolCall.toolCall.title).toBe("Read file"); } + + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -399,41 +407,8 @@ describe("AcpSessionRuntime", () => { (event) => event.method === "session/prompt" && event.status === "succeeded", ), ).toBe(true); - }).pipe( - Effect.provide( - AcpSessionRuntime.layer({ - authMethodId: "test", - spawn: { - command: mockAgentCommand, - args: mockAgentArgs, - }, - cwd: process.cwd(), - clientInfo: { name: "t3-test", version: "0.0.0" }, - requestLogger: (event) => - Effect.sync(() => { - requestEvents.push(event); - }), - }), - ), - Effect.scoped, - Effect.provide(NodeServices.layer), - ); - }); - it.effect("skips no-op session config writes when the requested value is already active", () => { - const requestEvents: Array = []; - return Effect.gen(function* () { - const runtime = yield* AcpSessionRuntime.AcpSessionRuntime; - yield* runtime.start(); - - yield* runtime.setConfigOption("model", "default"); - yield* runtime.setMode("ask"); - - expect( - requestEvents.some( - (event) => event.method === "session/set_config_option" && event.status === "started", - ), - ).toBe(false); + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -477,6 +452,8 @@ describe("AcpSessionRuntime", () => { expect( protocolEvents.some((event) => event.direction === "incoming" && event.stage === "decoded"), ).toBe(true); + + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -622,7 +599,9 @@ describe("AcpSessionRuntime", () => { expect(error.message).toContain("composer-2[fast=true]"); } - const recordedRequests = NodeFS.readFileSync(requestLogPath, "utf8") + yield* runtime.close; + + const recordedRequests = readFileSync(requestLogPath, "utf8") .trim() .split("\n") .filter((line) => line.length > 0) @@ -634,6 +613,8 @@ describe("AcpSessionRuntime", () => { message.params?.value === "composer-2[fast=false]", ), ).toBe(false); + + rmSync(tempDir, { recursive: true, force: true }); }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -651,7 +632,6 @@ describe("AcpSessionRuntime", () => { ), Effect.scoped, Effect.provide(NodeServices.layer), - Effect.ensuring(Effect.sync(() => NodeFS.rmSync(tempDir, { recursive: true, force: true }))), ); }); }); diff --git a/apps/server/src/provider/acp/AcpRuntimeModel.test.ts b/apps/server/src/provider/acp/AcpRuntimeModel.test.ts index 7682c5f5f9..9697d7102a 100644 --- a/apps/server/src/provider/acp/AcpRuntimeModel.test.ts +++ b/apps/server/src/provider/acp/AcpRuntimeModel.test.ts @@ -255,24 +255,6 @@ describe("AcpRuntimeModel", () => { } }); - it("trims padded current mode updates before emitting a mode change", () => { - const result = parseSessionUpdateEvent({ - sessionId: "session-1", - update: { - sessionUpdate: "current_mode_update", - currentModeId: " code ", - }, - } satisfies EffectAcpSchema.SessionNotification); - - expect(result.modeId).toBe("code"); - expect(result.events).toEqual([ - { - _tag: "ModeChanged", - modeId: "code", - }, - ]); - }); - it("projects typed ACP plan and content updates", () => { const planResult = parseSessionUpdateEvent({ sessionId: "session-1", diff --git a/apps/server/src/provider/acp/AcpRuntimeModel.ts b/apps/server/src/provider/acp/AcpRuntimeModel.ts index e6bfc127e6..b2ab198ba9 100644 --- a/apps/server/src/provider/acp/AcpRuntimeModel.ts +++ b/apps/server/src/provider/acp/AcpRuntimeModel.ts @@ -515,13 +515,11 @@ export function parseSessionUpdateEvent(params: EffectAcpSchema.SessionNotificat switch (upd.sessionUpdate) { case "current_mode_update": { - modeId = upd.currentModeId.trim(); - if (modeId) { - events.push({ - _tag: "ModeChanged", - modeId, - }); - } + modeId = upd.currentModeId; + events.push({ + _tag: "ModeChanged", + modeId, + }); break; } case "plan": { diff --git a/apps/server/src/provider/acp/AcpSessionRuntime.ts b/apps/server/src/provider/acp/AcpSessionRuntime.ts index 09fce6d56f..894e3ab40c 100644 --- a/apps/server/src/provider/acp/AcpSessionRuntime.ts +++ b/apps/server/src/provider/acp/AcpSessionRuntime.ts @@ -96,155 +96,48 @@ export interface AcpSessionRuntimeStartResult { readonly modelConfigId: string | undefined; } -export class AcpSessionRuntime extends Context.Service< - AcpSessionRuntime, - { - /** - * Registers a handler for `session/request_permission`. - * @see https://agentclientprotocol.com/protocol/schema#session/request_permission - */ - readonly handleRequestPermission: EffectAcpClient.AcpClient["Service"]["handleRequestPermission"]; - /** - * Registers a handler for `session/elicitation`. - * @see https://agentclientprotocol.com/protocol/schema#session/elicitation - */ - readonly handleElicitation: EffectAcpClient.AcpClient["Service"]["handleElicitation"]; - /** - * Registers a handler for `fs/read_text_file`. - * @see https://agentclientprotocol.com/protocol/schema#fs/read_text_file - */ - readonly handleReadTextFile: EffectAcpClient.AcpClient["Service"]["handleReadTextFile"]; - /** - * Registers a handler for `fs/write_text_file`. - * @see https://agentclientprotocol.com/protocol/schema#fs/write_text_file - */ - readonly handleWriteTextFile: EffectAcpClient.AcpClient["Service"]["handleWriteTextFile"]; - /** - * Registers a handler for `terminal/create`. - * @see https://agentclientprotocol.com/protocol/schema#terminal/create - */ - readonly handleCreateTerminal: EffectAcpClient.AcpClient["Service"]["handleCreateTerminal"]; - /** - * Registers a handler for `terminal/output`. - * @see https://agentclientprotocol.com/protocol/schema#terminal/output - */ - readonly handleTerminalOutput: EffectAcpClient.AcpClient["Service"]["handleTerminalOutput"]; - /** - * Registers a handler for `terminal/wait_for_exit`. - * @see https://agentclientprotocol.com/protocol/schema#terminal/wait_for_exit - */ - readonly handleTerminalWaitForExit: EffectAcpClient.AcpClient["Service"]["handleTerminalWaitForExit"]; - /** - * Registers a handler for `terminal/kill`. - * @see https://agentclientprotocol.com/protocol/schema#terminal/kill - */ - readonly handleTerminalKill: EffectAcpClient.AcpClient["Service"]["handleTerminalKill"]; - /** - * Registers a handler for `terminal/release`. - * @see https://agentclientprotocol.com/protocol/schema#terminal/release - */ - readonly handleTerminalRelease: EffectAcpClient.AcpClient["Service"]["handleTerminalRelease"]; - /** - * Registers a handler for `session/update`. - * @see https://agentclientprotocol.com/protocol/schema#session/update - */ - readonly handleSessionUpdate: EffectAcpClient.AcpClient["Service"]["handleSessionUpdate"]; - /** - * Registers a handler for `session/elicitation/complete`. - * @see https://agentclientprotocol.com/protocol/schema#session/elicitation/complete - */ - readonly handleElicitationComplete: EffectAcpClient.AcpClient["Service"]["handleElicitationComplete"]; - /** - * Registers a fallback extension request handler. - * @see https://agentclientprotocol.com/protocol/extensibility - */ - readonly handleUnknownExtRequest: EffectAcpClient.AcpClient["Service"]["handleUnknownExtRequest"]; - /** - * Registers a fallback extension notification handler. - * @see https://agentclientprotocol.com/protocol/extensibility - */ - readonly handleUnknownExtNotification: EffectAcpClient.AcpClient["Service"]["handleUnknownExtNotification"]; - /** - * Registers a typed extension request handler. - * @see https://agentclientprotocol.com/protocol/extensibility - */ - readonly handleExtRequest: EffectAcpClient.AcpClient["Service"]["handleExtRequest"]; - /** - * Registers a typed extension notification handler. - * @see https://agentclientprotocol.com/protocol/extensibility - */ - readonly handleExtNotification: EffectAcpClient.AcpClient["Service"]["handleExtNotification"]; - /** - * Initializes the ACP connection, authenticates, and loads, resumes, or creates the session. - * Concurrent calls share the same in-flight startup and a failed startup may be retried. - */ - readonly start: () => Effect.Effect; - /** Stream of parsed ACP session events emitted after startup. */ - readonly getEvents: () => Stream.Stream; - /** Waits until the current event consumer has processed every queued event. */ - readonly drainEvents: Effect.Effect; - /** Latest mode state observed from session setup and `session/update` notifications. */ - readonly getModeState: Effect.Effect; - /** Latest configuration options observed from session setup and configuration writes. */ - readonly getConfigOptions: Effect.Effect>; - /** - * Sends a prompt turn to the active session. - * @see https://agentclientprotocol.com/protocol/schema#session/prompt - */ - readonly prompt: ( - payload: Omit, - ) => Effect.Effect; - /** - * Sends a real ACP `session/cancel` notification for the active session. - * @see https://agentclientprotocol.com/protocol/schema#session/cancel - */ - readonly cancel: Effect.Effect; - /** - * Selects the active mode through the negotiated `mode` configuration option. - * This is a no-op when the requested mode is already active. - * @see https://agentclientprotocol.com/protocol/schema#session/set_config_option - */ - readonly setMode: ( - modeId: string, - ) => Effect.Effect; - /** - * Updates a session configuration option and the runtime configuration snapshot. - * @see https://agentclientprotocol.com/protocol/schema#session/set_config_option - */ - readonly setConfigOption: ( - configId: string, - value: string | boolean, - ) => Effect.Effect; - /** - * Selects the base model through the negotiated model configuration option. - * @see https://agentclientprotocol.com/protocol/schema#session/set_config_option - */ - readonly setModel: (model: string) => Effect.Effect; - /** - * Selects the active model through the unstable ACP `session/set_model` capability. - * @see https://agentclientprotocol.com/protocol/schema#session/set_model - */ - readonly setSessionModel: ( - modelId: string, - ) => Effect.Effect; - /** - * Sends a generic ACP extension request and records it through the request logger. - * @see https://agentclientprotocol.com/protocol/extensibility - */ - readonly request: ( - method: string, - payload: unknown, - ) => Effect.Effect; - /** - * Sends a generic ACP extension notification. - * @see https://agentclientprotocol.com/protocol/extensibility - */ - readonly notify: ( - method: string, - payload: unknown, - ) => Effect.Effect; - } ->()("t3/provider/acp/AcpSessionRuntime") {} +export interface AcpSessionRuntimeShape { + readonly handleRequestPermission: EffectAcpClient.AcpClientShape["handleRequestPermission"]; + readonly handleElicitation: EffectAcpClient.AcpClientShape["handleElicitation"]; + readonly handleReadTextFile: EffectAcpClient.AcpClientShape["handleReadTextFile"]; + readonly handleWriteTextFile: EffectAcpClient.AcpClientShape["handleWriteTextFile"]; + readonly handleCreateTerminal: EffectAcpClient.AcpClientShape["handleCreateTerminal"]; + readonly handleTerminalOutput: EffectAcpClient.AcpClientShape["handleTerminalOutput"]; + readonly handleTerminalWaitForExit: EffectAcpClient.AcpClientShape["handleTerminalWaitForExit"]; + readonly handleTerminalKill: EffectAcpClient.AcpClientShape["handleTerminalKill"]; + readonly handleTerminalRelease: EffectAcpClient.AcpClientShape["handleTerminalRelease"]; + readonly handleSessionUpdate: EffectAcpClient.AcpClientShape["handleSessionUpdate"]; + readonly handleElicitationComplete: EffectAcpClient.AcpClientShape["handleElicitationComplete"]; + readonly handleUnknownExtRequest: EffectAcpClient.AcpClientShape["handleUnknownExtRequest"]; + readonly handleUnknownExtNotification: EffectAcpClient.AcpClientShape["handleUnknownExtNotification"]; + readonly handleExtRequest: EffectAcpClient.AcpClientShape["handleExtRequest"]; + readonly handleExtNotification: EffectAcpClient.AcpClientShape["handleExtNotification"]; + readonly start: () => Effect.Effect; + readonly events: Stream.Stream; + readonly getModeState: Effect.Effect; + readonly getConfigOptions: Effect.Effect>; + readonly prompt: ( + payload: Omit, + ) => Effect.Effect; + readonly cancel: Effect.Effect; + readonly setMode: ( + modeId: string, + ) => Effect.Effect; + readonly setConfigOption: ( + configId: string, + value: string | boolean, + ) => Effect.Effect; + readonly setModel: (model: string) => Effect.Effect; + readonly request: ( + method: string, + payload: unknown, + ) => Effect.Effect; + readonly notify: ( + method: string, + payload: unknown, + ) => Effect.Effect; + readonly close: Effect.Effect; +} interface AcpStartedState extends AcpSessionRuntimeStartResult {} @@ -271,13 +164,13 @@ export const make = ( ): Effect.Effect< AcpSessionRuntime["Service"], EffectAcpErrors.AcpError, - ChildProcessSpawner.ChildProcessSpawner | Crypto.Crypto | Scope.Scope + ChildProcessSpawner.ChildProcessSpawner > => Effect.gen(function* () { const crypto = yield* Crypto.Crypto; const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const runtimeScope = yield* Scope.Scope; - const eventQueue = yield* Queue.unbounded(); + const runtimeScope = yield* Scope.make("sequential"); + const eventQueue = yield* Queue.unbounded(); const modeStateRef = yield* Ref.make(undefined); const toolCallsRef = yield* Ref.make(new Map()); const assistantItemRuntimeId = yield* crypto.randomUUIDv4.pipe( @@ -403,6 +296,8 @@ export const make = ( }); }), ); + const close = Scope.close(runtimeScope, Exit.void).pipe(Effect.asVoid); + const initializeClientCapabilities = { fs: { readTextFile: false, @@ -485,47 +380,32 @@ export const make = ( | EffectAcpSchema.ResumeSessionResponse, ): Effect.Effect => Ref.set(configOptionsRef, sessionConfigOptionsFromSetup(response)); - const updateCurrentModeId = (modeId: string): Effect.Effect => - Ref.update(modeStateRef, (current) => - current ? { ...current, currentModeId: modeId } : current, - ); - const setConfigOption = ( configId: string, value: string | boolean, ): Effect.Effect => validateConfigOptionValue(configId, value).pipe( Effect.flatMap(() => getStartedState), - Effect.flatMap((started) => - Ref.get(configOptionsRef).pipe( - Effect.flatMap((configOptions) => { - const existing = findSessionConfigOption(configOptions, configId); - if (existing && configOptionCurrentValueMatches(existing, value)) { - return Effect.succeed({ - configOptions, - } satisfies EffectAcpSchema.SetSessionConfigOptionResponse); - } - const requestPayload = - typeof value === "boolean" - ? ({ - sessionId: started.sessionId, - configId, - type: "boolean", - value, - } satisfies EffectAcpSchema.SetSessionConfigOptionRequest) - : ({ - sessionId: started.sessionId, - configId, - value: String(value), - } satisfies EffectAcpSchema.SetSessionConfigOptionRequest); - return runLoggedRequest( - "session/set_config_option", - requestPayload, - acp.agent.setSessionConfigOption(requestPayload), - ).pipe(Effect.tap((response) => updateConfigOptions(response))); - }), - ), - ), + Effect.flatMap((started) => { + const requestPayload = + typeof value === "boolean" + ? ({ + sessionId: started.sessionId, + configId, + type: "boolean", + value, + } satisfies EffectAcpSchema.SetSessionConfigOptionRequest) + : ({ + sessionId: started.sessionId, + configId, + value: String(value), + } satisfies EffectAcpSchema.SetSessionConfigOptionRequest); + return runLoggedRequest( + "session/set_config_option", + requestPayload, + acp.agent.setSessionConfigOption(requestPayload), + ).pipe(Effect.tap((response) => updateConfigOptions(response))); + }), ); const startOnce = Effect.gen(function* () { @@ -705,15 +585,7 @@ export const make = ( handleExtRequest: acp.handleExtRequest, handleExtNotification: acp.handleExtNotification, start: () => start, - getEvents: () => Stream.fromQueue(eventQueue), - drainEvents: Effect.gen(function* () { - const acknowledge = yield* Deferred.make(); - yield* Queue.offer(eventQueue, { - _tag: "EventStreamBarrier", - acknowledge, - }); - yield* Deferred.await(acknowledge); - }), + events: Stream.fromQueue(eventQueue), getModeState: Ref.get(modeStateRef), getConfigOptions: Ref.get(configOptionsRef), prompt: (payload) => @@ -772,17 +644,7 @@ export const make = ( ), ), setMode: (modeId) => - Ref.get(modeStateRef).pipe( - Effect.flatMap((modeState) => { - if (modeState?.currentModeId === modeId) { - return Effect.succeed({} satisfies EffectAcpSchema.SetSessionModeResponse); - } - return setConfigOption("mode", modeId).pipe( - Effect.tap(() => updateCurrentModeId(modeId)), - Effect.as({} satisfies EffectAcpSchema.SetSessionModeResponse), - ); - }), - ), + getStartedState.pipe(Effect.flatMap(() => setConfigOption("mode", modeId))), setConfigOption, setModel: (model) => getStartedState.pipe( @@ -806,7 +668,8 @@ export const make = ( request: (method, payload) => runLoggedRequest(method, payload, acp.raw.request(method, payload)), notify: acp.raw.notify, - } satisfies AcpSessionRuntime["Service"]; + close, + } satisfies AcpSessionRuntimeShape; }); export const layer = ( @@ -827,20 +690,6 @@ function sessionConfigOptionsFromSetup( return response?.configOptions ?? []; } -function configOptionCurrentValueMatches( - configOption: EffectAcpSchema.SessionConfigOption, - value: string | boolean, -): boolean { - const currentValue = configOption.currentValue; - if (configOption.type === "boolean") { - return currentValue === value; - } - if (typeof currentValue !== "string") { - return false; - } - return currentValue.trim() === String(value).trim(); -} - const handleSessionUpdate = ({ queue, modeStateRef, diff --git a/apps/server/src/provider/acp/CursorAcpCliProbe.test.ts b/apps/server/src/provider/acp/CursorAcpCliProbe.test.ts index 6be4faf967..24fca244a1 100644 --- a/apps/server/src/provider/acp/CursorAcpCliProbe.test.ts +++ b/apps/server/src/provider/acp/CursorAcpCliProbe.test.ts @@ -17,6 +17,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", const runtime = yield* AcpSessionRuntime.AcpSessionRuntime; const started = yield* runtime.start(); expect(started.initializeResult).toBeDefined(); + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -57,10 +58,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", if (Array.isArray(configOptions)) { const modelConfig = configOptions.find((opt) => opt.category === "model"); const parameterizedOptions = configOptions.filter( - (opt) => - opt.category === "thought_level" || - opt.category === "model_option" || - opt.category === "model_config", + (opt) => opt.category === "thought_level" || opt.category === "model_config", ); // @effect-diagnostics-next-line preferSchemaOverJson:off yield* Console.log("Model config option:", JSON.stringify(modelConfig, null, 2)); @@ -72,6 +70,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", expect(modelConfig).toBeDefined(); expect(typeof modelConfig?.id).toBe("string"); } + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ @@ -118,16 +117,14 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", if (Array.isArray(setResult.configOptions)) { const modelConfig = setResult.configOptions.find((opt) => opt.category === "model"); const parameterizedOptions = setResult.configOptions.filter( - (opt) => - opt.category === "thought_level" || - opt.category === "model_option" || - opt.category === "model_config", + (opt) => opt.category === "thought_level" || opt.category === "model_config", ); if (modelConfig?.type === "select") { expect(modelConfig.currentValue).toBe("gpt-5.4"); } expect(parameterizedOptions.length).toBeGreaterThan(0); } + yield* runtime.close; }).pipe( Effect.provide( AcpSessionRuntime.layer({ diff --git a/apps/server/src/provider/acp/CursorAcpSupport.ts b/apps/server/src/provider/acp/CursorAcpSupport.ts index 30203ad77b..cdbe0c6bd3 100644 --- a/apps/server/src/provider/acp/CursorAcpSupport.ts +++ b/apps/server/src/provider/acp/CursorAcpSupport.ts @@ -1,9 +1,6 @@ -import { type CursorSettings, type ProviderOptionSelection } from "@t3tools/contracts"; -import * as Crypto from "effect/Crypto"; -import * as Effect from "effect/Effect"; -import * as Layer from "effect/Layer"; -import * as Scope from "effect/Scope"; -import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; +import { type CursorModelOptions, type CursorSettings } from "@t3tools/contracts"; +import { Effect, Layer } from "effect"; +import { ChildProcessSpawner } from "effect/unstable/process"; import type * as EffectAcpErrors from "effect-acp/errors"; import { @@ -48,11 +45,7 @@ export function buildCursorAcpSpawnInput( export const makeCursorAcpRuntime = ( input: CursorAcpRuntimeInput, -): Effect.Effect< - AcpSessionRuntime.AcpSessionRuntime["Service"], - EffectAcpErrors.AcpError, - Crypto.Crypto | Scope.Scope -> => +): Effect.Effect => Effect.gen(function* () { const acpContext = yield* Layer.build( AcpSessionRuntime.layer({ @@ -66,10 +59,8 @@ export const makeCursorAcpRuntime = ( ), ), ); - return yield* Effect.service(AcpSessionRuntime.AcpSessionRuntime).pipe( - Effect.provide(acpContext), - ); - }); + return yield* Effect.service(AcpSessionRuntime).pipe(Effect.provide(acpContext)); + }).pipe(Effect.scoped); interface CursorAcpModelSelectionRuntime { readonly getConfigOptions: AcpSessionRuntime.AcpSessionRuntime["Service"]["getConfigOptions"]; diff --git a/apps/server/src/provider/codex/CodexDeveloperInstructions.ts b/apps/server/src/provider/codex/CodexDeveloperInstructions.ts new file mode 100644 index 0000000000..76055f8b8b --- /dev/null +++ b/apps/server/src/provider/codex/CodexDeveloperInstructions.ts @@ -0,0 +1,134 @@ +export const CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS = `# Plan Mode (Conversational) + +You work in 3 phases, and you should *chat your way* to a great plan before finalizing it. A great plan is very detailed-intent- and implementation-wise-so that it can be handed to another engineer or agent to be implemented right away. It must be **decision complete**, where the implementer does not need to make any decisions. + +## Mode rules (strict) + +You are in **Plan Mode** until a developer message explicitly ends it. + +Plan Mode is not changed by user intent, tone, or imperative language. If a user asks for execution while still in Plan Mode, treat it as a request to **plan the execution**, not perform it. + +## Plan Mode vs update_plan tool + +Plan Mode is a collaboration mode that can involve requesting user input and eventually issuing a \`\` block. + +Separately, \`update_plan\` is a checklist/progress/TODOs tool; it does not enter or exit Plan Mode. Do not confuse it with Plan mode or try to use it while in Plan mode. If you try to use \`update_plan\` in Plan mode, it will return an error. + +## Execution vs. mutation in Plan Mode + +You may explore and execute **non-mutating** actions that improve the plan. You must not perform **mutating** actions. + +### Allowed (non-mutating, plan-improving) + +Actions that gather truth, reduce ambiguity, or validate feasibility without changing repo-tracked state. Examples: + +* Reading or searching files, configs, schemas, types, manifests, and docs +* Static analysis, inspection, and repo exploration +* Dry-run style commands when they do not edit repo-tracked files +* Tests, builds, or checks that may write to caches or build artifacts (for example, \`target/\`, \`.cache/\`, or snapshots) so long as they do not edit repo-tracked files + +### Not allowed (mutating, plan-executing) + +Actions that implement the plan or change repo-tracked state. Examples: + +* Editing or writing files +* Running formatters or linters that rewrite files +* Applying patches, migrations, or codegen that updates repo-tracked files +* Side-effectful commands whose purpose is to carry out the plan rather than refine it + +When in doubt: if the action would reasonably be described as "doing the work" rather than "planning the work," do not do it. + +## PHASE 1 - Ground in the environment (explore first, ask second) + +Begin by grounding yourself in the actual environment. Eliminate unknowns in the prompt by discovering facts, not by asking the user. Resolve all questions that can be answered through exploration or inspection. Identify missing or ambiguous details only if they cannot be derived from the environment. Silent exploration between turns is allowed and encouraged. + +Before asking the user any question, perform at least one targeted non-mutating exploration pass (for example: search relevant files, inspect likely entrypoints/configs, confirm current implementation shape), unless no local environment/repo is available. + +Exception: you may ask clarifying questions about the user's prompt before exploring, ONLY if there are obvious ambiguities or contradictions in the prompt itself. However, if ambiguity might be resolved by exploring, always prefer exploring first. + +Do not ask questions that can be answered from the repo or system (for example, "where is this struct?" or "which UI component should we use?" when exploration can make it clear). Only ask once you have exhausted reasonable non-mutating exploration. + +## PHASE 2 - Intent chat (what they actually want) + +* Keep asking until you can clearly state: goal + success criteria, audience, in/out of scope, constraints, current state, and the key preferences/tradeoffs. +* Bias toward questions over guessing: if any high-impact ambiguity remains, do NOT plan yet-ask. + +## PHASE 3 - Implementation chat (what/how we'll build) + +* Once intent is stable, keep asking until the spec is decision complete: approach, interfaces (APIs/schemas/I/O), data flow, edge cases/failure modes, testing + acceptance criteria, rollout/monitoring, and any migrations/compat constraints. + +## Asking questions + +Critical rules: + +* Strongly prefer using the \`request_user_input\` tool to ask any questions. +* Offer only meaningful multiple-choice options; don't include filler choices that are obviously wrong or irrelevant. +* In rare cases where an unavoidable, important question can't be expressed with reasonable multiple-choice options (due to extreme ambiguity), you may ask it directly without the tool. + +You SHOULD ask many questions, but each question must: + +* materially change the spec/plan, OR +* confirm/lock an assumption, OR +* choose between meaningful tradeoffs. +* not be answerable by non-mutating commands. + +Use the \`request_user_input\` tool only for decisions that materially change the plan, for confirming important assumptions, or for information that cannot be discovered via non-mutating exploration. + +## Two kinds of unknowns (treat differently) + +1. **Discoverable facts** (repo/system truth): explore first. + + * Before asking, run targeted searches and check likely sources of truth (configs/manifests/entrypoints/schemas/types/constants). + * Ask only if: multiple plausible candidates; nothing found but you need a missing identifier/context; or ambiguity is actually product intent. + * If asking, present concrete candidates (paths/service names) + recommend one. + * Never ask questions you can answer from your environment (e.g., "where is this struct"). + +2. **Preferences/tradeoffs** (not discoverable): ask early. + + * These are intent or implementation preferences that cannot be derived from exploration. + * Provide 2-4 mutually exclusive options + a recommended default. + * If unanswered, proceed with the recommended option and record it as an assumption in the final plan. + +## Finalization rule + +Only output the final plan when it is decision complete and leaves no decisions to the implementer. + +When you present the official plan, wrap it in a \`\` block so the client can render it specially: + +1) The opening tag must be on its own line. +2) Start the plan content on the next line (no text on the same line as the tag). +3) The closing tag must be on its own line. +4) Use Markdown inside the block. +5) Keep the tags exactly as \`\` and \`\` (do not translate or rename them), even if the plan content is in another language. + +Example: + + +plan content + + +plan content should be human and agent digestible. The final plan must be plan-only and include: + +* A clear title +* A brief summary section +* Important changes or additions to public APIs/interfaces/types +* Test cases and scenarios +* Explicit assumptions and defaults chosen where needed + +Do not ask "should I proceed?" in the final output. The user can easily switch out of Plan mode and request implementation if you have included a \`\` block in your response. Alternatively, they can decide to stay in Plan mode and continue refining the plan. + +Only produce at most one \`\` block per turn, and only when you are presenting a complete spec. +`; + +export const CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS = `# Collaboration Mode: Default + +You are now in Default mode. Any previous instructions for other modes (e.g. Plan mode) are no longer active. + +Your active mode changes only when new developer instructions with a different \`...\` change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default and Plan. + +## request_user_input availability + +The \`request_user_input\` tool is unavailable in Default mode. If you call it while in Default mode, it will return an error. + +In Default mode, strongly prefer making reasonable assumptions and executing the user's request rather than stopping to ask questions. If you absolutely must ask a question because the answer cannot be discovered from local context and a reasonable assumption would be risky, ask the user directly with a concise plain-text question. Never write a multiple choice question as a textual assistant message. +`; diff --git a/apps/server/src/provider/codex/CodexSessionRuntime.test.ts b/apps/server/src/provider/codex/CodexSessionRuntime.test.ts new file mode 100644 index 0000000000..eb8e5471b1 --- /dev/null +++ b/apps/server/src/provider/codex/CodexSessionRuntime.test.ts @@ -0,0 +1,118 @@ +import assert from "node:assert/strict"; + +import { Effect } from "effect"; +import { describe, it } from "vitest"; + +import { + CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, + CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS, +} from "./CodexDeveloperInstructions.ts"; +import { buildTurnStartParams } from "./CodexSessionRuntime.ts"; + +describe("buildTurnStartParams", () => { + it("includes plan collaboration mode when requested", () => { + const params = Effect.runSync( + buildTurnStartParams({ + threadId: "provider-thread-1", + runtimeMode: "full-access", + prompt: "Make a plan", + model: "gpt-5.3-codex", + effort: "medium", + interactionMode: "plan", + }), + ); + + assert.deepStrictEqual(params, { + threadId: "provider-thread-1", + approvalPolicy: "never", + sandboxPolicy: { + type: "dangerFullAccess", + }, + input: [ + { + type: "text", + text: "Make a plan", + }, + ], + model: "gpt-5.3-codex", + effort: "medium", + collaborationMode: { + mode: "plan", + settings: { + model: "gpt-5.3-codex", + reasoning_effort: "medium", + developer_instructions: CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS, + }, + }, + }); + }); + + it("includes default collaboration mode and image attachments", () => { + const params = Effect.runSync( + buildTurnStartParams({ + threadId: "provider-thread-1", + runtimeMode: "auto-accept-edits", + prompt: "Implement it", + model: "gpt-5.3-codex", + interactionMode: "default", + attachments: [ + { + type: "image", + url: "data:image/png;base64,abc", + }, + ], + }), + ); + + assert.deepStrictEqual(params, { + threadId: "provider-thread-1", + approvalPolicy: "on-request", + sandboxPolicy: { + type: "workspaceWrite", + }, + input: [ + { + type: "text", + text: "Implement it", + }, + { + type: "image", + url: "data:image/png;base64,abc", + }, + ], + model: "gpt-5.3-codex", + collaborationMode: { + mode: "default", + settings: { + model: "gpt-5.3-codex", + reasoning_effort: "medium", + developer_instructions: CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, + }, + }, + }); + }); + + it("omits collaboration mode when interaction mode is absent", () => { + const params = Effect.runSync( + buildTurnStartParams({ + threadId: "provider-thread-1", + runtimeMode: "approval-required", + prompt: "Review", + }), + ); + + assert.deepStrictEqual(params, { + threadId: "provider-thread-1", + approvalPolicy: "untrusted", + sandboxPolicy: { + type: "readOnly", + }, + input: [ + { + type: "text", + text: "Review", + }, + ], + }); + }); +}); diff --git a/apps/server/src/provider/codex/CodexSessionRuntime.ts b/apps/server/src/provider/codex/CodexSessionRuntime.ts new file mode 100644 index 0000000000..5a355d9615 --- /dev/null +++ b/apps/server/src/provider/codex/CodexSessionRuntime.ts @@ -0,0 +1,1299 @@ +import { randomUUID } from "node:crypto"; + +import { + ApprovalRequestId, + EventId, + ProviderItemId, + type ProviderApprovalDecision, + type ProviderEvent, + type ProviderInteractionMode, + type ProviderRequestKind, + type ProviderSession, + type ProviderTurnStartResult, + type ProviderUserInputAnswers, + RuntimeMode, + ThreadId, + TurnId, +} from "@t3tools/contracts"; +import { normalizeModelSlug } from "@t3tools/shared/model"; +import { Deferred, Effect, Exit, Layer, Queue, Ref, Scope, Schema, Stream } from "effect"; +import * as SchemaIssue from "effect/SchemaIssue"; +import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; +import * as CodexClient from "effect-codex-app-server/client"; +import * as CodexErrors from "effect-codex-app-server/errors"; +import * as CodexRpc from "effect-codex-app-server/rpc"; +import * as EffectCodexSchema from "effect-codex-app-server/schema"; + +import { buildCodexInitializeParams } from "../codexAppServer.ts"; +import { + CODEX_DEFAULT_MODEL, + readCodexAccountSnapshotResponse, + resolveCodexModelForAccount, + type CodexAccountSnapshot, +} from "../codexAccount.ts"; +import { + CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, + CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS, +} from "./CodexDeveloperInstructions.ts"; + +const PROVIDER = "codex" as const; + +const ANSI_ESCAPE_CHAR = String.fromCharCode(27); +const ANSI_ESCAPE_REGEX = new RegExp(`${ANSI_ESCAPE_CHAR}\\[[0-9;]*m`, "g"); +const CODEX_STDERR_LOG_REGEX = + /^\d{4}-\d{2}-\d{2}T\S+\s+(TRACE|DEBUG|INFO|WARN|ERROR)\s+\S+:\s+(.*)$/; +const BENIGN_ERROR_LOG_SNIPPETS = [ + "state db missing rollout path for thread", + "state db record_discrepancy: find_thread_path_by_id_str_in_subdir, falling_back", +]; + +export const CodexResumeCursorSchema = Schema.Struct({ + threadId: Schema.String, +}); +const CodexUserInputAnswerObject = Schema.Struct({ + answers: Schema.Array(Schema.String), +}); + +// TODO: Verify `packages/effect-codex-app-server/scripts/generate.ts` so the generated +// `V2TurnStartParams` schema includes `collaborationMode` directly. +const CodexTurnStartParamsWithCollaborationMode = EffectCodexSchema.V2TurnStartParams.pipe( + Schema.fieldsAssign({ + collaborationMode: Schema.optionalKey(EffectCodexSchema.V2TurnStartParams__CollaborationMode), + }), +); + +export type CodexTurnStartParamsWithCollaborationMode = + typeof CodexTurnStartParamsWithCollaborationMode.Type; +const formatSchemaIssue = SchemaIssue.makeFormatterDefault(); + +export type CodexResumeCursor = typeof CodexResumeCursorSchema.Type; +type CodexThreadItem = + | EffectCodexSchema.V2ThreadReadResponse["thread"]["turns"][number]["items"][number] + | EffectCodexSchema.V2ThreadRollbackResponse["thread"]["turns"][number]["items"][number]; + +export interface CodexSessionRuntimeOptions { + readonly threadId: ThreadId; + readonly binaryPath: string; + readonly homePath?: string; + readonly cwd: string; + readonly runtimeMode: RuntimeMode; + readonly model?: string; + readonly serviceTier?: EffectCodexSchema.V2ThreadStartParams__ServiceTier | undefined; + readonly resumeCursor?: CodexResumeCursor; +} + +export interface CodexSessionRuntimeSendTurnInput { + readonly input?: string; + readonly attachments?: ReadonlyArray<{ readonly type: "image"; readonly url: string }>; + readonly model?: string; + readonly serviceTier?: EffectCodexSchema.V2TurnStartParams__ServiceTier | undefined; + readonly effort?: EffectCodexSchema.V2TurnStartParams__ReasoningEffort | undefined; + readonly interactionMode?: ProviderInteractionMode; +} + +export interface CodexThreadTurnSnapshot { + readonly id: TurnId; + readonly items: ReadonlyArray; +} + +export interface CodexThreadSnapshot { + readonly threadId: string; + readonly turns: ReadonlyArray; +} + +export interface CodexSessionRuntimeShape { + readonly start: () => Effect.Effect; + readonly getSession: Effect.Effect; + readonly sendTurn: ( + input: CodexSessionRuntimeSendTurnInput, + ) => Effect.Effect; + readonly interruptTurn: (turnId?: TurnId) => Effect.Effect; + readonly readThread: Effect.Effect; + readonly rollbackThread: ( + numTurns: number, + ) => Effect.Effect; + readonly respondToRequest: ( + requestId: ApprovalRequestId, + decision: ProviderApprovalDecision, + ) => Effect.Effect; + readonly respondToUserInput: ( + requestId: ApprovalRequestId, + answers: ProviderUserInputAnswers, + ) => Effect.Effect; + readonly events: Stream.Stream; + readonly close: Effect.Effect; +} + +export type CodexSessionRuntimeError = + | CodexErrors.CodexAppServerError + | CodexSessionRuntimePendingApprovalNotFoundError + | CodexSessionRuntimePendingUserInputNotFoundError + | CodexSessionRuntimeInvalidUserInputAnswersError + | CodexSessionRuntimeThreadIdMissingError; + +export class CodexSessionRuntimePendingApprovalNotFoundError extends Schema.TaggedErrorClass()( + "CodexSessionRuntimePendingApprovalNotFoundError", + { + requestId: Schema.String, + }, +) { + override get message(): string { + return `Unknown pending Codex approval request: ${this.requestId}`; + } +} + +export class CodexSessionRuntimePendingUserInputNotFoundError extends Schema.TaggedErrorClass()( + "CodexSessionRuntimePendingUserInputNotFoundError", + { + requestId: Schema.String, + }, +) { + override get message(): string { + return `Unknown pending Codex user input request: ${this.requestId}`; + } +} + +export class CodexSessionRuntimeInvalidUserInputAnswersError extends Schema.TaggedErrorClass()( + "CodexSessionRuntimeInvalidUserInputAnswersError", + { + questionId: Schema.String, + }, +) { + override get message(): string { + return `Invalid Codex user input answers for question '${this.questionId}'`; + } +} + +export class CodexSessionRuntimeThreadIdMissingError extends Schema.TaggedErrorClass()( + "CodexSessionRuntimeThreadIdMissingError", + { + threadId: Schema.String, + }, +) { + override get message(): string { + return `Codex session is missing a provider thread id for ${this.threadId}`; + } +} + +interface PendingApproval { + readonly requestId: ApprovalRequestId; + readonly jsonRpcId: string; + readonly requestKind: ProviderRequestKind; + readonly turnId: TurnId | undefined; + readonly itemId: ProviderItemId | undefined; + readonly decision: Deferred.Deferred; +} + +interface ApprovalCorrelation { + readonly requestId: ApprovalRequestId; + readonly requestKind: ProviderRequestKind; + readonly turnId: TurnId | undefined; + readonly itemId: ProviderItemId | undefined; +} + +interface PendingUserInput { + readonly requestId: ApprovalRequestId; + readonly turnId: TurnId | undefined; + readonly itemId: ProviderItemId | undefined; + readonly answers: Deferred.Deferred; +} + +type CodexServerNotification = { + readonly [M in CodexRpc.ServerNotificationMethod]: { + readonly method: M; + readonly params: CodexRpc.ServerNotificationParamsByMethod[M]; + }; +}[CodexRpc.ServerNotificationMethod]; + +function makeCodexServerNotification( + method: M, + params: CodexRpc.ServerNotificationParamsByMethod[M], +): CodexServerNotification { + return { method, params } as CodexServerNotification; +} + +function normalizeCodexModelSlug( + model: string | undefined | null, + preferredId?: string, +): string | undefined { + const normalized = normalizeModelSlug(model); + if (!normalized) { + return undefined; + } + if (preferredId?.endsWith("-codex") && preferredId !== normalized) { + return preferredId; + } + return normalized; +} + +function readResumeCursorThreadId( + resumeCursor: ProviderSession["resumeCursor"], +): string | undefined { + return Schema.is(CodexResumeCursorSchema)(resumeCursor) ? resumeCursor.threadId : undefined; +} + +function runtimeModeToThreadConfig(input: RuntimeMode): { + readonly approvalPolicy: EffectCodexSchema.V2ThreadStartParams__AskForApproval; + readonly sandbox: EffectCodexSchema.V2ThreadStartParams__SandboxMode; +} { + switch (input) { + case "approval-required": + return { + approvalPolicy: "untrusted", + sandbox: "read-only", + }; + case "auto-accept-edits": + return { + approvalPolicy: "on-request", + sandbox: "workspace-write", + }; + case "full-access": + default: + return { + approvalPolicy: "never", + sandbox: "danger-full-access", + }; + } +} + +function buildThreadStartParams(input: { + readonly cwd: string; + readonly runtimeMode: RuntimeMode; + readonly model: string | undefined; + readonly serviceTier: EffectCodexSchema.V2ThreadStartParams__ServiceTier | undefined; +}): EffectCodexSchema.V2ThreadStartParams { + const config = runtimeModeToThreadConfig(input.runtimeMode); + return { + cwd: input.cwd, + approvalPolicy: config.approvalPolicy, + sandbox: config.sandbox, + ...(input.model ? { model: input.model } : {}), + ...(input.serviceTier ? { serviceTier: input.serviceTier } : {}), + }; +} + +function runtimeModeToTurnSandboxPolicy( + input: RuntimeMode, +): EffectCodexSchema.V2TurnStartParams__SandboxPolicy { + switch (input) { + case "approval-required": + return { + type: "readOnly", + }; + case "auto-accept-edits": + return { + type: "workspaceWrite", + }; + case "full-access": + default: + return { + type: "dangerFullAccess", + }; + } +} + +function buildCodexCollaborationMode(input: { + readonly interactionMode?: ProviderInteractionMode; + readonly model?: string; + readonly effort?: EffectCodexSchema.V2TurnStartParams__ReasoningEffort; +}): EffectCodexSchema.V2TurnStartParams__CollaborationMode | undefined { + if (input.interactionMode === undefined) { + return undefined; + } + const model = normalizeCodexModelSlug(input.model) ?? CODEX_DEFAULT_MODEL; + return { + mode: input.interactionMode, + settings: { + model, + reasoning_effort: input.effort ?? "medium", + developer_instructions: + input.interactionMode === "plan" + ? CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS + : CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS, + }, + }; +} + +export function buildTurnStartParams(input: { + readonly threadId: string; + readonly runtimeMode: RuntimeMode; + readonly prompt?: string; + readonly attachments?: ReadonlyArray<{ readonly type: "image"; readonly url: string }>; + readonly model?: string; + readonly serviceTier?: EffectCodexSchema.V2TurnStartParams__ServiceTier; + readonly effort?: EffectCodexSchema.V2TurnStartParams__ReasoningEffort; + readonly interactionMode?: ProviderInteractionMode; +}): Effect.Effect< + CodexTurnStartParamsWithCollaborationMode, + CodexErrors.CodexAppServerProtocolParseError +> { + const turnInput: Array = []; + if (input.prompt) { + turnInput.push({ + type: "text", + text: input.prompt, + }); + } + for (const attachment of input.attachments ?? []) { + turnInput.push(attachment); + } + + const config = runtimeModeToThreadConfig(input.runtimeMode); + const collaborationMode = buildCodexCollaborationMode({ + ...(input.interactionMode ? { interactionMode: input.interactionMode } : {}), + ...(input.model ? { model: input.model } : {}), + ...(input.effort ? { effort: input.effort } : {}), + }); + + return Schema.decodeUnknownEffect(CodexTurnStartParamsWithCollaborationMode)({ + threadId: input.threadId, + input: turnInput, + approvalPolicy: config.approvalPolicy, + sandboxPolicy: runtimeModeToTurnSandboxPolicy(input.runtimeMode), + ...(input.model ? { model: input.model } : {}), + ...(input.serviceTier ? { serviceTier: input.serviceTier } : {}), + ...(input.effort ? { effort: input.effort } : {}), + ...(collaborationMode ? { collaborationMode } : {}), + }).pipe( + Effect.mapError((error) => toProtocolParseError("Invalid turn/start request payload", error)), + ); +} + +function classifyCodexStderrLine(rawLine: string): { readonly message: string } | null { + const line = rawLine.replaceAll(ANSI_ESCAPE_REGEX, "").trim(); + if (!line) { + return null; + } + + const match = line.match(CODEX_STDERR_LOG_REGEX); + if (match) { + const level = match[1]; + if (level && level !== "ERROR") { + return null; + } + if (BENIGN_ERROR_LOG_SNIPPETS.some((snippet) => line.includes(snippet))) { + return null; + } + } + + return { message: line }; +} + +function toTurnId(value: string | null | undefined): TurnId | undefined { + return value?.trim() ? TurnId.make(value) : undefined; +} + +function toItemId(value: string | null | undefined): ProviderItemId | undefined { + return value?.trim() ? ProviderItemId.make(value) : undefined; +} + +function readNotificationThreadId(notification: CodexServerNotification): string | undefined { + switch (notification.method) { + case "thread/started": + return notification.params.thread.id; + case "error": + case "thread/status/changed": + case "thread/archived": + case "thread/unarchived": + case "thread/closed": + case "thread/name/updated": + case "thread/tokenUsage/updated": + case "turn/started": + case "hook/started": + case "turn/completed": + case "hook/completed": + case "turn/diff/updated": + case "turn/plan/updated": + case "item/started": + case "item/autoApprovalReview/started": + case "item/autoApprovalReview/completed": + case "item/completed": + case "rawResponseItem/completed": + case "item/agentMessage/delta": + case "item/plan/delta": + case "item/commandExecution/outputDelta": + case "item/commandExecution/terminalInteraction": + case "item/fileChange/outputDelta": + case "serverRequest/resolved": + case "item/mcpToolCall/progress": + case "item/reasoning/summaryTextDelta": + case "item/reasoning/summaryPartAdded": + case "item/reasoning/textDelta": + case "thread/compacted": + case "thread/realtime/started": + case "thread/realtime/itemAdded": + case "thread/realtime/transcriptUpdated": + case "thread/realtime/outputAudio/delta": + case "thread/realtime/sdp": + case "thread/realtime/error": + case "thread/realtime/closed": + return notification.params.threadId; + default: + return undefined; + } +} + +function readRouteFields(notification: CodexServerNotification): { + readonly turnId: TurnId | undefined; + readonly itemId: ProviderItemId | undefined; +} { + switch (notification.method) { + case "thread/started": + return { + turnId: undefined, + itemId: undefined, + }; + case "turn/started": + case "turn/completed": + return { + turnId: toTurnId(notification.params.turn.id), + itemId: undefined, + }; + case "error": + return { + turnId: toTurnId(notification.params.turnId), + itemId: undefined, + }; + case "turn/diff/updated": + case "turn/plan/updated": + return { + turnId: toTurnId(notification.params.turnId), + itemId: undefined, + }; + case "serverRequest/resolved": + return { + turnId: undefined, + itemId: undefined, + }; + case "item/started": + case "item/completed": + return { + turnId: toTurnId(notification.params.turnId), + itemId: toItemId(notification.params.item.id), + }; + case "item/agentMessage/delta": + case "item/plan/delta": + case "item/commandExecution/outputDelta": + case "item/commandExecution/terminalInteraction": + case "item/fileChange/outputDelta": + case "item/reasoning/summaryTextDelta": + case "item/reasoning/summaryPartAdded": + case "item/reasoning/textDelta": + return { + turnId: toTurnId(notification.params.turnId), + itemId: toItemId(notification.params.itemId), + }; + default: + return { + turnId: undefined, + itemId: undefined, + }; + } +} + +function rememberCollabReceiverTurns( + collabReceiverTurns: Map, + notification: CodexServerNotification, + parentTurnId: TurnId | undefined, +): void { + if (!parentTurnId) { + return; + } + + if (notification.method !== "item/started" && notification.method !== "item/completed") { + return; + } + + if (notification.params.item.type !== "collabAgentToolCall") { + return; + } + + for (const receiverThreadId of notification.params.item.receiverThreadIds) { + collabReceiverTurns.set(receiverThreadId, parentTurnId); + } +} + +function shouldSuppressChildConversationNotification( + method: CodexRpc.ServerNotificationMethod, +): boolean { + return ( + method === "thread/started" || + method === "thread/status/changed" || + method === "thread/archived" || + method === "thread/unarchived" || + method === "thread/closed" || + method === "thread/compacted" || + method === "thread/name/updated" || + method === "thread/tokenUsage/updated" || + method === "turn/started" || + method === "turn/completed" || + method === "turn/plan/updated" || + method === "item/plan/delta" + ); +} + +function toCodexUserInputAnswer( + questionId: string, + value: ProviderUserInputAnswers[string], +): Effect.Effect< + EffectCodexSchema.ToolRequestUserInputResponse__ToolRequestUserInputAnswer, + CodexSessionRuntimeInvalidUserInputAnswersError +> { + if (typeof value === "string") { + return Effect.succeed({ answers: [value] }); + } + if (Array.isArray(value)) { + const answers = value.filter((entry): entry is string => typeof entry === "string"); + return Effect.succeed({ answers }); + } + if (Schema.is(CodexUserInputAnswerObject)(value)) { + return Effect.succeed({ answers: value.answers }); + } + return Effect.fail(new CodexSessionRuntimeInvalidUserInputAnswersError({ questionId })); +} + +function toCodexUserInputAnswers( + answers: ProviderUserInputAnswers, +): Effect.Effect< + EffectCodexSchema.ToolRequestUserInputResponse["answers"], + CodexSessionRuntimeInvalidUserInputAnswersError +> { + return Effect.forEach( + Object.entries(answers), + ([questionId, value]) => + toCodexUserInputAnswer(questionId, value).pipe( + Effect.map((answer) => [questionId, answer] as const), + ), + { concurrency: 1 }, + ).pipe(Effect.map((entries) => Object.fromEntries(entries))); +} + +function toProtocolParseError( + detail: string, + cause: Schema.SchemaError, +): CodexErrors.CodexAppServerProtocolParseError { + return new CodexErrors.CodexAppServerProtocolParseError({ + detail: `${detail}: ${formatSchemaIssue(cause.issue)}`, + cause, + }); +} + +function currentProviderThreadId(session: ProviderSession): string | undefined { + return readResumeCursorThreadId(session.resumeCursor); +} + +function updateSession( + sessionRef: Ref.Ref, + updates: Partial, +): Effect.Effect { + return Ref.update(sessionRef, (session) => ({ + ...session, + ...updates, + updatedAt: new Date().toISOString(), + })); +} + +function parseThreadSnapshot( + response: EffectCodexSchema.V2ThreadReadResponse | EffectCodexSchema.V2ThreadRollbackResponse, +): CodexThreadSnapshot { + return { + threadId: response.thread.id, + turns: response.thread.turns.map((turn) => ({ + id: TurnId.make(turn.id), + items: turn.items, + })), + }; +} + +export const makeCodexSessionRuntime = ( + options: CodexSessionRuntimeOptions, +): Effect.Effect< + CodexSessionRuntimeShape, + CodexErrors.CodexAppServerError, + ChildProcessSpawner.ChildProcessSpawner +> => + Effect.gen(function* () { + const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; + const runtimeScope = yield* Scope.make("sequential"); + const events = yield* Queue.unbounded(); + const pendingApprovalsRef = yield* Ref.make(new Map()); + const approvalCorrelationsRef = yield* Ref.make(new Map()); + const pendingUserInputsRef = yield* Ref.make(new Map()); + const collabReceiverTurnsRef = yield* Ref.make(new Map()); + const closedRef = yield* Ref.make(false); + + const child = yield* spawner + .spawn( + ChildProcess.make(options.binaryPath, ["app-server"], { + cwd: options.cwd, + ...(options.homePath ? { env: { ...process.env, CODEX_HOME: options.homePath } } : {}), + shell: process.platform === "win32", + }), + ) + .pipe( + Effect.provideService(Scope.Scope, runtimeScope), + Effect.mapError( + (cause) => + new CodexErrors.CodexAppServerSpawnError({ + command: `${options.binaryPath} app-server`, + cause, + }), + ), + ); + + const clientContext = yield* CodexClient.layerChildProcess(child).pipe( + Layer.build, + Effect.provideService(Scope.Scope, runtimeScope), + ); + const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe( + Effect.provide(clientContext), + ); + const serverNotifications = yield* Queue.unbounded(); + + const initialSession = { + provider: PROVIDER, + status: "connecting", + runtimeMode: options.runtimeMode, + cwd: options.cwd, + ...(options.model ? { model: options.model } : {}), + threadId: options.threadId, + ...(options.resumeCursor !== undefined ? { resumeCursor: options.resumeCursor } : {}), + createdAt: new Date().toISOString(), + updatedAt: new Date().toISOString(), + } satisfies ProviderSession; + const sessionRef = yield* Ref.make(initialSession); + const accountRef = yield* Ref.make({ + type: "unknown", + planType: null, + sparkEnabled: false, + }); + + const offerEvent = (event: ProviderEvent) => Queue.offer(events, event).pipe(Effect.asVoid); + + const emitEvent = (event: Omit) => + offerEvent({ + id: EventId.make(randomUUID()), + provider: PROVIDER, + createdAt: new Date().toISOString(), + ...event, + }); + + const emitSessionEvent = (method: string, message: string) => + emitEvent({ + kind: "session", + threadId: options.threadId, + method, + message, + }); + + const settlePendingApprovals = (decision: ProviderApprovalDecision) => + Ref.get(pendingApprovalsRef).pipe( + Effect.flatMap((pendingApprovals) => + Effect.forEach( + Array.from(pendingApprovals.values()), + (pendingApproval) => + Deferred.succeed(pendingApproval.decision, decision).pipe(Effect.ignore), + { discard: true }, + ), + ), + ); + + const settlePendingUserInputs = (answers: ProviderUserInputAnswers) => + Ref.get(pendingUserInputsRef).pipe( + Effect.flatMap((pendingUserInputs) => + Effect.forEach( + Array.from(pendingUserInputs.values()), + (pendingUserInput) => + Deferred.succeed(pendingUserInput.answers, answers).pipe(Effect.ignore), + { discard: true }, + ), + ), + ); + + const handleRawNotification = (notification: CodexServerNotification) => + Effect.gen(function* () { + const payload = notification.params; + const route = readRouteFields(notification); + const collabReceiverTurns = yield* Ref.get(collabReceiverTurnsRef); + const childParentTurnId = (() => { + const providerConversationId = readNotificationThreadId(notification); + return providerConversationId + ? collabReceiverTurns.get(providerConversationId) + : undefined; + })(); + + rememberCollabReceiverTurns(collabReceiverTurns, notification, route.turnId); + if (childParentTurnId && shouldSuppressChildConversationNotification(notification.method)) { + yield* Ref.set(collabReceiverTurnsRef, collabReceiverTurns); + return; + } + + let requestId: ApprovalRequestId | undefined; + let requestKind: ProviderRequestKind | undefined; + let turnId = childParentTurnId ?? route.turnId; + let itemId = route.itemId; + + if (notification.method === "serverRequest/resolved") { + const rawRequestId = + typeof notification.params.requestId === "string" + ? notification.params.requestId + : String(notification.params.requestId); + const correlation = rawRequestId + ? (yield* Ref.get(approvalCorrelationsRef)).get(rawRequestId) + : undefined; + if (correlation) { + requestId = correlation.requestId; + requestKind = correlation.requestKind; + turnId = correlation.turnId ?? turnId; + itemId = correlation.itemId ?? itemId; + yield* Ref.update(approvalCorrelationsRef, (current) => { + const next = new Map(current); + next.delete(rawRequestId); + return next; + }); + } + } + + yield* Ref.set(collabReceiverTurnsRef, collabReceiverTurns); + yield* emitEvent({ + kind: "notification", + threadId: options.threadId, + method: notification.method, + ...(turnId ? { turnId } : {}), + ...(itemId ? { itemId } : {}), + ...(requestId ? { requestId } : {}), + ...(requestKind ? { requestKind } : {}), + ...(notification.method === "item/agentMessage/delta" + ? { textDelta: notification.params.delta } + : {}), + ...(payload !== undefined ? { payload } : {}), + }); + }); + + const currentSessionProviderThreadId = Effect.map(Ref.get(sessionRef), currentProviderThreadId); + + yield* client.handleServerNotification("thread/started", (payload) => + currentSessionProviderThreadId.pipe( + Effect.flatMap((providerThreadId) => { + if (providerThreadId && payload.thread.id !== providerThreadId) { + return Effect.void; + } + return updateSession(sessionRef, { + resumeCursor: { threadId: payload.thread.id }, + }); + }), + ), + ); + + yield* client.handleServerNotification("turn/started", (payload) => + currentSessionProviderThreadId.pipe( + Effect.flatMap((providerThreadId) => { + if (providerThreadId && payload.threadId !== providerThreadId) { + return Effect.void; + } + return updateSession(sessionRef, { + status: "running", + activeTurnId: TurnId.make(payload.turn.id), + }); + }), + ), + ); + + yield* client.handleServerNotification("turn/completed", (payload) => + currentSessionProviderThreadId.pipe( + Effect.flatMap((providerThreadId) => { + if (providerThreadId && payload.threadId !== providerThreadId) { + return Effect.void; + } + const lastError = + payload.turn.status === "failed" && "error" in payload.turn && payload.turn.error + ? payload.turn.error.message + : undefined; + return updateSession(sessionRef, { + status: payload.turn.status === "failed" ? "error" : "ready", + activeTurnId: undefined, + ...(lastError ? { lastError } : {}), + }); + }), + ), + ); + + yield* client.handleServerNotification("error", (payload) => + currentSessionProviderThreadId.pipe( + Effect.flatMap((providerThreadId) => { + const payloadThreadId = payload.threadId; + if (providerThreadId && payloadThreadId && payloadThreadId !== providerThreadId) { + return Effect.void; + } + const errorMessage = payload.error.message; + const willRetry = payload.willRetry; + return updateSession(sessionRef, { + status: willRetry ? "running" : "error", + ...(errorMessage ? { lastError: errorMessage } : {}), + }); + }), + ), + ); + + yield* client.handleServerRequest("item/commandExecution/requestApproval", (payload) => + Effect.gen(function* () { + const requestId = ApprovalRequestId.make(randomUUID()); + const turnId = toTurnId(payload.turnId); + const itemId = toItemId(payload.itemId); + const decision = yield* Deferred.make(); + + yield* Ref.update(pendingApprovalsRef, (current) => { + const next = new Map(current); + next.set(requestId, { + requestId, + jsonRpcId: payload.approvalId ?? payload.itemId, + requestKind: "command", + turnId, + itemId, + decision, + }); + return next; + }); + yield* Ref.update(approvalCorrelationsRef, (current) => { + const next = new Map(current); + next.set(payload.approvalId ?? payload.itemId, { + requestId, + requestKind: "command", + turnId, + itemId, + }); + return next; + }); + + yield* emitEvent({ + kind: "request", + threadId: options.threadId, + method: "item/commandExecution/requestApproval", + requestId, + requestKind: "command", + ...(turnId ? { turnId } : {}), + ...(itemId ? { itemId } : {}), + payload, + }); + + const resolved = yield* Deferred.await(decision).pipe( + Effect.ensuring( + Ref.update(pendingApprovalsRef, (current) => { + const next = new Map(current); + next.delete(requestId); + return next; + }), + ), + ); + return { + decision: resolved, + } satisfies EffectCodexSchema.CommandExecutionRequestApprovalResponse; + }), + ); + + yield* client.handleServerRequest("item/fileChange/requestApproval", (payload) => + Effect.gen(function* () { + const requestId = ApprovalRequestId.make(randomUUID()); + const turnId = toTurnId(payload.turnId); + const itemId = toItemId(payload.itemId); + const decision = yield* Deferred.make(); + + yield* Ref.update(pendingApprovalsRef, (current) => { + const next = new Map(current); + next.set(requestId, { + requestId, + jsonRpcId: payload.itemId, + requestKind: "file-change", + turnId, + itemId, + decision, + }); + return next; + }); + yield* Ref.update(approvalCorrelationsRef, (current) => { + const next = new Map(current); + next.set(payload.itemId, { + requestId, + requestKind: "file-change", + turnId, + itemId, + }); + return next; + }); + + yield* emitEvent({ + kind: "request", + threadId: options.threadId, + method: "item/fileChange/requestApproval", + requestId, + requestKind: "file-change", + ...(turnId ? { turnId } : {}), + ...(itemId ? { itemId } : {}), + payload, + }); + + const resolved = yield* Deferred.await(decision).pipe( + Effect.ensuring( + Ref.update(pendingApprovalsRef, (current) => { + const next = new Map(current); + next.delete(requestId); + return next; + }), + ), + ); + return { + decision: resolved, + } satisfies EffectCodexSchema.FileChangeRequestApprovalResponse; + }), + ); + + yield* client.handleServerRequest("item/tool/requestUserInput", (payload) => + Effect.gen(function* () { + const requestId = ApprovalRequestId.make(randomUUID()); + const turnId = toTurnId(payload.turnId); + const itemId = toItemId(payload.itemId); + const answers = yield* Deferred.make(); + + yield* Ref.update(pendingUserInputsRef, (current) => { + const next = new Map(current); + next.set(requestId, { + requestId, + turnId, + itemId, + answers, + }); + return next; + }); + + yield* emitEvent({ + kind: "request", + threadId: options.threadId, + method: "item/tool/requestUserInput", + requestId, + ...(turnId ? { turnId } : {}), + ...(itemId ? { itemId } : {}), + payload, + }); + + const resolvedAnswers = yield* Deferred.await(answers).pipe( + Effect.ensuring( + Ref.update(pendingUserInputsRef, (current) => { + const next = new Map(current); + next.delete(requestId); + return next; + }), + ), + ); + + return { + answers: yield* toCodexUserInputAnswers(resolvedAnswers).pipe( + Effect.mapError((error) => + CodexErrors.CodexAppServerRequestError.invalidParams(error.message, { + questionId: error.questionId, + }), + ), + ), + } satisfies EffectCodexSchema.ToolRequestUserInputResponse; + }), + ); + + yield* client.handleUnknownServerRequest((method) => + Effect.fail(CodexErrors.CodexAppServerRequestError.methodNotFound(method)), + ); + + const registerServerNotification = (method: M) => + client.handleServerNotification(method, (params) => + Queue.offer(serverNotifications, makeCodexServerNotification(method, params)).pipe( + Effect.asVoid, + ), + ); + + yield* Effect.forEach( + Object.values( + CodexRpc.SERVER_NOTIFICATION_METHODS, + ) as ReadonlyArray, + registerServerNotification, + { concurrency: 1, discard: true }, + ); + + yield* Stream.fromQueue(serverNotifications).pipe( + Stream.runForEach(handleRawNotification), + Effect.forkIn(runtimeScope), + ); + + const stderrRemainderRef = yield* Ref.make(""); + yield* child.stderr.pipe( + Stream.decodeText(), + Stream.runForEach((chunk) => + Ref.modify(stderrRemainderRef, (current) => { + const combined = current + chunk; + const lines = combined.split("\n"); + const remainder = lines.pop() ?? ""; + return [lines.map((line) => line.replace(/\r$/, "")), remainder] as const; + }).pipe( + Effect.flatMap((lines) => + Effect.forEach( + lines, + (line) => { + const classified = classifyCodexStderrLine(line); + if (!classified) { + return Effect.void; + } + return emitEvent({ + kind: "notification", + threadId: options.threadId, + method: "process/stderr", + message: classified.message, + }); + }, + { discard: true }, + ), + ), + ), + ), + Effect.forkIn(runtimeScope), + ); + + yield* child.exitCode.pipe( + Effect.flatMap((exitCode) => + Ref.get(closedRef).pipe( + Effect.flatMap((closed) => { + if (closed) { + return Effect.void; + } + const nextStatus = exitCode === 0 ? "closed" : "error"; + return updateSession(sessionRef, { + status: nextStatus, + activeTurnId: undefined, + }).pipe( + Effect.andThen( + emitSessionEvent( + "session/exited", + exitCode === 0 + ? "Codex App Server exited." + : `Codex App Server exited with code ${exitCode}.`, + ), + ), + ); + }), + ), + ), + Effect.forkIn(runtimeScope), + ); + + const start = Effect.fn("CodexSessionRuntime.start")(function* () { + yield* emitSessionEvent("session/connecting", "Starting Codex App Server session."); + yield* client.request("initialize", buildCodexInitializeParams()); + yield* client.notify("initialized", undefined); + + const accountSnapshot = readCodexAccountSnapshotResponse( + yield* client.request("account/read", {}), + ); + yield* Ref.set(accountRef, accountSnapshot); + + const requestedModel = resolveCodexModelForAccount( + normalizeCodexModelSlug(options.model), + accountSnapshot, + ); + + const resumedThreadId = readResumeCursorThreadId(options.resumeCursor); + const opened = + resumedThreadId !== undefined + ? yield* client.request("thread/resume", { + threadId: resumedThreadId, + ...buildThreadStartParams({ + cwd: options.cwd, + runtimeMode: options.runtimeMode, + model: requestedModel, + serviceTier: options.serviceTier, + }), + }) + : yield* client.request( + "thread/start", + buildThreadStartParams({ + cwd: options.cwd, + runtimeMode: options.runtimeMode, + model: requestedModel, + serviceTier: options.serviceTier, + }), + ); + + const providerThreadId = opened.thread.id; + const session = { + ...(yield* Ref.get(sessionRef)), + status: "ready", + cwd: opened.cwd, + model: opened.model, + resumeCursor: { threadId: providerThreadId }, + updatedAt: new Date().toISOString(), + } satisfies ProviderSession; + yield* Ref.set(sessionRef, session); + yield* emitSessionEvent("session/ready", "Codex App Server session ready."); + return session; + }); + + const readProviderThreadId = Effect.gen(function* () { + const providerThreadId = currentProviderThreadId(yield* Ref.get(sessionRef)); + if (!providerThreadId) { + return yield* new CodexSessionRuntimeThreadIdMissingError({ + threadId: options.threadId, + }); + } + return providerThreadId; + }); + + const close = Effect.gen(function* () { + const alreadyClosed = yield* Ref.get(closedRef); + if (alreadyClosed) { + return; + } + yield* Ref.set(closedRef, true); + yield* settlePendingApprovals("cancel"); + yield* settlePendingUserInputs({}); + yield* updateSession(sessionRef, { + status: "closed", + activeTurnId: undefined, + }); + yield* emitSessionEvent("session/closed", "Session stopped"); + yield* Scope.close(runtimeScope, Exit.void); + yield* Queue.shutdown(serverNotifications); + yield* Queue.shutdown(events); + }); + + return { + start, + getSession: Ref.get(sessionRef), + sendTurn: (input) => + Effect.gen(function* () { + const providerThreadId = yield* readProviderThreadId; + const account = yield* Ref.get(accountRef); + const normalizedModel = resolveCodexModelForAccount( + normalizeCodexModelSlug(input.model ?? (yield* Ref.get(sessionRef)).model), + account, + ); + const params = yield* buildTurnStartParams({ + threadId: providerThreadId, + runtimeMode: options.runtimeMode, + ...(input.input ? { prompt: input.input } : {}), + ...(input.attachments ? { attachments: input.attachments } : {}), + ...(normalizedModel ? { model: normalizedModel } : {}), + ...(input.serviceTier ? { serviceTier: input.serviceTier } : {}), + ...(input.effort ? { effort: input.effort } : {}), + ...(input.interactionMode ? { interactionMode: input.interactionMode } : {}), + }); + const rawResponse = yield* client.raw.request("turn/start", params); + const response = yield* Schema.decodeUnknownEffect(EffectCodexSchema.V2TurnStartResponse)( + rawResponse, + ).pipe( + Effect.mapError((error) => + toProtocolParseError("Invalid turn/start response payload", error), + ), + ); + const turnId = TurnId.make(response.turn.id); + yield* updateSession(sessionRef, { + status: "running", + activeTurnId: turnId, + ...(normalizedModel ? { model: normalizedModel } : {}), + }); + const resumedProviderThreadId = currentProviderThreadId(yield* Ref.get(sessionRef)); + return { + threadId: options.threadId, + turnId, + ...(resumedProviderThreadId + ? { resumeCursor: { threadId: resumedProviderThreadId } } + : {}), + } satisfies ProviderTurnStartResult; + }), + interruptTurn: (turnId) => + Effect.gen(function* () { + const providerThreadId = yield* readProviderThreadId; + const session = yield* Ref.get(sessionRef); + const effectiveTurnId = turnId ?? session.activeTurnId; + if (!effectiveTurnId) { + return; + } + yield* client.request("turn/interrupt", { + threadId: providerThreadId, + turnId: effectiveTurnId, + }); + }), + readThread: Effect.gen(function* () { + const providerThreadId = yield* readProviderThreadId; + const response = yield* client.request("thread/read", { + threadId: providerThreadId, + includeTurns: true, + }); + return parseThreadSnapshot(response); + }), + rollbackThread: (numTurns) => + Effect.gen(function* () { + const providerThreadId = yield* readProviderThreadId; + const response = yield* client.request("thread/rollback", { + threadId: providerThreadId, + numTurns, + }); + yield* updateSession(sessionRef, { + status: "ready", + activeTurnId: undefined, + }); + return parseThreadSnapshot(response); + }), + respondToRequest: (requestId, decision) => + Effect.gen(function* () { + const pending = (yield* Ref.get(pendingApprovalsRef)).get(requestId); + if (!pending) { + return yield* new CodexSessionRuntimePendingApprovalNotFoundError({ + requestId, + }); + } + yield* Ref.update(pendingApprovalsRef, (current) => { + const next = new Map(current); + next.delete(requestId); + return next; + }); + yield* Deferred.succeed(pending.decision, decision); + yield* emitEvent({ + kind: "notification", + threadId: options.threadId, + method: "item/requestApproval/decision", + requestId: pending.requestId, + requestKind: pending.requestKind, + ...(pending.turnId ? { turnId: pending.turnId } : {}), + ...(pending.itemId ? { itemId: pending.itemId } : {}), + payload: { + requestId: pending.requestId, + requestKind: pending.requestKind, + decision, + }, + }); + }), + respondToUserInput: (requestId, answers) => + Effect.gen(function* () { + const pending = (yield* Ref.get(pendingUserInputsRef)).get(requestId); + if (!pending) { + return yield* new CodexSessionRuntimePendingUserInputNotFoundError({ + requestId, + }); + } + yield* Ref.update(pendingUserInputsRef, (current) => { + const next = new Map(current); + next.delete(requestId); + return next; + }); + yield* Deferred.succeed(pending.answers, answers); + yield* emitEvent({ + kind: "notification", + threadId: options.threadId, + method: "item/tool/requestUserInput/answered", + requestId: pending.requestId, + ...(pending.turnId ? { turnId: pending.turnId } : {}), + ...(pending.itemId ? { itemId: pending.itemId } : {}), + payload: { + answers: yield* toCodexUserInputAnswers(answers), + }, + }); + }), + events: Stream.fromQueue(events), + close, + } satisfies CodexSessionRuntimeShape; + }); diff --git a/apps/server/src/provider/codexAccount.ts b/apps/server/src/provider/codexAccount.ts new file mode 100644 index 0000000000..7bae1a3602 --- /dev/null +++ b/apps/server/src/provider/codexAccount.ts @@ -0,0 +1,111 @@ +import type * as EffectCodexSchema from "effect-codex-app-server/schema"; +import type { ServerProviderModel } from "@t3tools/contracts"; + +export type CodexPlanType = + | "free" + | "go" + | "plus" + | "pro" + | "team" + | "business" + | "enterprise" + | "edu" + | "unknown"; + +export interface CodexAccountSnapshot { + readonly type: "apiKey" | "chatgpt" | "unknown"; + readonly planType: CodexPlanType | null; + readonly sparkEnabled: boolean; +} + +export const CODEX_DEFAULT_MODEL = "gpt-5.3-codex"; +export const CODEX_SPARK_MODEL = "gpt-5.3-codex-spark"; +const CODEX_SPARK_ENABLED_PLAN_TYPES = new Set(["pro"]); + +export function readCodexAccountSnapshotResponse( + response: EffectCodexSchema.V2GetAccountResponse, +): CodexAccountSnapshot { + const account = response.account; + if (!account) { + return { + type: "unknown", + planType: null, + sparkEnabled: false, + }; + } + + if (account.type === "apiKey") { + return { + type: "apiKey", + planType: null, + sparkEnabled: false, + }; + } + + return { + type: "chatgpt", + planType: account.planType as CodexPlanType, + sparkEnabled: CODEX_SPARK_ENABLED_PLAN_TYPES.has(account.planType as CodexPlanType), + }; +} + +export function codexAuthSubType(account: CodexAccountSnapshot | undefined): string | undefined { + if (account?.type === "apiKey") { + return "apiKey"; + } + + if (account?.type !== "chatgpt") { + return undefined; + } + + return account.planType && account.planType !== "unknown" ? account.planType : "chatgpt"; +} + +export function codexAuthSubLabel(account: CodexAccountSnapshot | undefined): string | undefined { + switch (codexAuthSubType(account)) { + case "apiKey": + return "OpenAI API Key"; + case "chatgpt": + return "ChatGPT Subscription"; + case "free": + return "ChatGPT Free Subscription"; + case "go": + return "ChatGPT Go Subscription"; + case "plus": + return "ChatGPT Plus Subscription"; + case "pro": + return "ChatGPT Pro Subscription"; + case "team": + return "ChatGPT Team Subscription"; + case "business": + return "ChatGPT Business Subscription"; + case "enterprise": + return "ChatGPT Enterprise Subscription"; + case "edu": + return "ChatGPT Edu Subscription"; + default: + return undefined; + } +} + +export function adjustCodexModelsForAccount( + baseModels: ReadonlyArray, + account: CodexAccountSnapshot | undefined, +): ReadonlyArray { + if (account?.sparkEnabled !== false) { + return baseModels; + } + + return baseModels.filter((model) => model.isCustom || model.slug !== CODEX_SPARK_MODEL); +} + +export function resolveCodexModelForAccount( + model: string | undefined, + account: CodexAccountSnapshot, +): string | undefined { + if (model !== CODEX_SPARK_MODEL || account.sparkEnabled) { + return model; + } + + return CODEX_DEFAULT_MODEL; +} diff --git a/apps/server/src/provider/codexAppServer.test.ts b/apps/server/src/provider/codexAppServer.test.ts new file mode 100644 index 0000000000..1abe4bc3f6 --- /dev/null +++ b/apps/server/src/provider/codexAppServer.test.ts @@ -0,0 +1,91 @@ +import { describe, expect, it } from "vitest"; +import type * as EffectCodexSchema from "effect-codex-app-server/schema"; + +import { readCodexAccountSnapshotResponse } from "./codexAccount.ts"; +import { buildCodexInitializeParams, parseCodexSkillsListResponse } from "./codexAppServer.ts"; + +describe("buildCodexInitializeParams", () => { + it("returns the typed Codex initialize payload", () => { + expect(buildCodexInitializeParams()).toEqual({ + clientInfo: { + name: "t3code_desktop", + title: "T3 Code Desktop", + version: "0.1.0", + }, + capabilities: { + experimentalApi: true, + }, + }); + }); +}); + +describe("readCodexAccountSnapshotResponse", () => { + it("maps chatgpt responses without lossy unknown parsing", () => { + const response = { + account: { + type: "chatgpt", + email: "julius@example.com", + planType: "pro", + }, + requiresOpenaiAuth: false, + } satisfies EffectCodexSchema.V2GetAccountResponse; + + expect(readCodexAccountSnapshotResponse(response)).toEqual({ + type: "chatgpt", + planType: "pro", + sparkEnabled: true, + }); + }); +}); + +describe("parseCodexSkillsListResponse", () => { + it("prefers the matching cwd bucket and keeps typed skill metadata", () => { + const response = { + data: [ + { + cwd: "/tmp/other", + errors: [], + skills: [ + { + name: "other", + path: "/tmp/other/SKILL.md", + description: "Other skill", + enabled: true, + scope: "repo", + }, + ], + }, + { + cwd: "/work/project", + errors: [], + skills: [ + { + name: "planner", + path: "/work/project/.skills/planner/SKILL.md", + description: "Plans work", + enabled: true, + scope: "repo", + shortDescription: "Plan steps", + interface: { + displayName: "Planner", + shortDescription: "Plan work", + }, + }, + ], + }, + ], + } satisfies EffectCodexSchema.V2SkillsListResponse; + + expect(parseCodexSkillsListResponse(response, "/work/project")).toEqual([ + { + name: "planner", + path: "/work/project/.skills/planner/SKILL.md", + enabled: true, + description: "Plans work", + scope: "repo", + displayName: "Planner", + shortDescription: "Plan steps", + }, + ]); + }); +}); diff --git a/apps/server/src/provider/codexAppServer.ts b/apps/server/src/provider/codexAppServer.ts new file mode 100644 index 0000000000..f8fd60fd5f --- /dev/null +++ b/apps/server/src/provider/codexAppServer.ts @@ -0,0 +1,155 @@ +import { spawnSync, type ChildProcessWithoutNullStreams } from "node:child_process"; + +import type { ServerProviderSkill } from "@t3tools/contracts"; +import { Effect, Layer, Schema } from "effect"; +import * as CodexClient from "effect-codex-app-server/client"; +import type * as EffectCodexSchema from "effect-codex-app-server/schema"; +import type { Mutable } from "effect/Types"; + +import { readCodexAccountSnapshotResponse, type CodexAccountSnapshot } from "./codexAccount.ts"; + +export interface CodexDiscoverySnapshot { + readonly account: CodexAccountSnapshot; + readonly skills: ReadonlyArray; +} + +export class CodexDiscoveryProbeError extends Schema.TaggedErrorClass()( + "CodexDiscoveryProbeError", + { + detail: Schema.String, + cause: Schema.optional(Schema.Defect), + }, +) { + override get message(): string { + return this.detail; + } +} + +export function parseCodexSkillsListResponse( + response: EffectCodexSchema.V2SkillsListResponse, + cwd: string, +): ReadonlyArray { + const matchingEntry = response.data.find((entry) => entry.cwd === cwd); + const skills = matchingEntry + ? matchingEntry.skills + : response.data.flatMap((entry) => entry.skills); + + return skills.map((skill) => { + const shortDescription = + skill.shortDescription ?? skill.interface?.shortDescription ?? undefined; + + const parsedSkill: Mutable = { + name: skill.name, + path: skill.path, + enabled: skill.enabled, + }; + + if (skill.description) { + parsedSkill.description = skill.description; + } + if (skill.scope) { + parsedSkill.scope = skill.scope; + } + if (skill.interface?.displayName) { + parsedSkill.displayName = skill.interface.displayName; + } + if (shortDescription) { + parsedSkill.shortDescription = shortDescription; + } + + return parsedSkill; + }); +} + +export function buildCodexInitializeParams(): EffectCodexSchema.V1InitializeParams { + return { + clientInfo: { + name: "t3code_desktop", + title: "T3 Code Desktop", + version: "0.1.0", + }, + capabilities: { + experimentalApi: true, + }, + }; +} + +export function killCodexChildProcess(child: ChildProcessWithoutNullStreams): void { + if (process.platform === "win32" && child.pid !== undefined) { + try { + spawnSync("taskkill", ["/pid", String(child.pid), "/T", "/F"], { stdio: "ignore" }); + return; + } catch { + // Fall through to direct kill when taskkill is unavailable. + } + } + + child.kill(); +} + +export const probeCodexDiscovery = Effect.fn("probeCodexDiscovery")(function* (input: { + readonly binaryPath: string; + readonly homePath?: string; + readonly cwd: string; +}) { + const clientContext = yield* Layer.build( + CodexClient.layerCommand({ + command: input.binaryPath, + args: ["app-server"], + ...(input.homePath ? { env: { CODEX_HOME: input.homePath } } : {}), + }), + ).pipe( + Effect.mapError( + (cause) => + new CodexDiscoveryProbeError({ + detail: `Codex discovery probe spawn failed: ${cause.message}`, + cause, + }), + ), + ); + const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe( + Effect.provide(clientContext), + ); + + yield* client.request("initialize", buildCodexInitializeParams()).pipe( + Effect.mapError( + (cause) => + new CodexDiscoveryProbeError({ + detail: `Codex discovery probe initialize failed: ${cause.message}`, + cause, + }), + ), + ); + yield* client.notify("initialized", undefined).pipe( + Effect.mapError( + (cause) => + new CodexDiscoveryProbeError({ + detail: `Codex discovery probe initialized notification failed: ${cause.message}`, + cause, + }), + ), + ); + + const [skillsResponse, accountResponse] = yield* Effect.all( + [ + client.request("skills/list", { + cwds: [input.cwd], + }), + client.request("account/read", {}), + ], + { concurrency: "unbounded" }, + ).pipe( + Effect.mapError( + (cause) => + new CodexDiscoveryProbeError({ + detail: `Codex discovery probe request failed: ${cause.message}`, + cause, + }), + ), + ); + + return { + account: readCodexAccountSnapshotResponse(accountResponse), + skills: parseCodexSkillsListResponse(skillsResponse, input.cwd), + } satisfies CodexDiscoverySnapshot; +}, Effect.scoped); diff --git a/apps/server/src/provider/codexModels.ts b/apps/server/src/provider/codexModels.ts new file mode 100644 index 0000000000..a29fa90cc5 --- /dev/null +++ b/apps/server/src/provider/codexModels.ts @@ -0,0 +1,127 @@ +import type { ModelCapabilities, ServerProviderModel } from "@t3tools/contracts"; + +export const DEFAULT_CODEX_MODEL_CAPABILITIES: ModelCapabilities = { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], +}; + +export const BUILT_IN_CODEX_MODELS: ReadonlyArray = [ + { + slug: "gpt-5.4", + name: "GPT-5.4", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.4-mini", + name: "GPT-5.4 Mini", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.3-codex", + name: "GPT-5.3 Codex", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.3-codex-spark", + name: "GPT-5.3 Codex Spark", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.2-codex", + name: "GPT-5.2 Codex", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.2", + name: "GPT-5.2", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, +]; + +export function getCodexModelCapabilities(model: string | null | undefined): ModelCapabilities { + const slug = model?.trim(); + return ( + BUILT_IN_CODEX_MODELS.find((candidate) => candidate.slug === slug)?.capabilities ?? + DEFAULT_CODEX_MODEL_CAPABILITIES + ); +} diff --git a/apps/server/src/provider/makeManagedServerProvider.ts b/apps/server/src/provider/makeManagedServerProvider.ts index d2b6b52e8f..ed9f2713cf 100644 --- a/apps/server/src/provider/makeManagedServerProvider.ts +++ b/apps/server/src/provider/makeManagedServerProvider.ts @@ -31,7 +31,8 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")( readonly getSettings: Effect.Effect; readonly streamSettings: Stream.Stream; readonly haveSettingsChanged: (previous: Settings, next: Settings) => boolean; - readonly initialSnapshot: (settings: Settings) => Effect.Effect; + readonly buildInitialSnapshot?: ((settings: Settings) => ServerProvider) | undefined; + readonly initialSnapshot?: ((settings: Settings) => ServerProvider) | undefined; readonly checkProvider: Effect.Effect; readonly enrichSnapshot?: (input: { readonly settings: Settings; @@ -40,25 +41,27 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")( readonly publishSnapshot: (snapshot: ServerProvider) => Effect.Effect; }) => Effect.Effect; readonly refreshInterval?: Duration.Input; -}): Effect.fn.Return< - ServerProviderShape, - ServerSettingsError, - Scope.Scope | BackgroundPolicy.BackgroundPolicy | ServerSettingsService -> { - const backgroundPolicy = yield* BackgroundPolicy.BackgroundPolicy; - const serverSettings = yield* ServerSettingsService; +}): Effect.fn.Return { + type InitialRefreshState = "idle" | "running" | "done"; const refreshSemaphore = yield* Semaphore.make(1); const changesPubSub = yield* Effect.acquireRelease( PubSub.unbounded(), PubSub.shutdown, ); const initialSettings = yield* input.getSettings; - const initialSnapshot = yield* input.initialSnapshot(initialSettings); + const initialSnapshotFactory = input.buildInitialSnapshot ?? input.initialSnapshot; + if (!initialSnapshotFactory) { + return yield* Effect.die( + new Error("makeManagedServerProvider requires an initial snapshot factory."), + ); + } + const initialSnapshot = initialSnapshotFactory(initialSettings); const snapshotStateRef = yield* Ref.make({ snapshot: initialSnapshot, enrichmentGeneration: 0, }); const settingsRef = yield* Ref.make(initialSettings); + const initialRefreshStateRef = yield* Ref.make("idle"); const enrichmentFiberRef = yield* Ref.make | null>(null); const scope = yield* Effect.scope; @@ -70,6 +73,7 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")( if (state.enrichmentGeneration !== generation || Equal.equals(state.snapshot, nextSnapshot)) { return [null, state] as const; } + return [ nextSnapshot, { @@ -135,6 +139,7 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")( ] as const; }); yield* Ref.set(settingsRef, nextSettings); + yield* Ref.set(initialRefreshStateRef, "done"); yield* PubSub.publish(changesPubSub, nextSnapshot); yield* restartSnapshotEnrichment(nextSettings, nextSnapshot, nextGeneration); return nextSnapshot; @@ -147,41 +152,27 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")( return yield* applySnapshot(nextSettings, { forceRefresh: true }); }); - const hasProviderStatusDemand = Effect.gen(function* () { - const state = yield* Ref.get(snapshotStateRef); - const instanceId = state.snapshot.instanceId; - const [genericDemand, instanceDemand] = yield* Effect.all([ - backgroundPolicy.shouldRunScopeWork({ type: "provider-status" }), - backgroundPolicy.shouldRunScopeWork({ type: "provider-status", instanceId }), - ]); - return genericDemand || instanceDemand; - }); - - const getRefreshInterval = - input.refreshInterval !== undefined - ? Effect.succeed(input.refreshInterval) - : serverSettings.getSettings.pipe( - Effect.map( - (settings) => - resolveServerBackgroundActivitySettings(settings).providerHealthRefreshInterval, - ), - Effect.orElseSucceed(() => DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL), - ); - - const refreshIntervalChanges = yield* Queue.sliding(1); - if (input.refreshInterval === undefined) { - const serverSettingsChanges = yield* serverSettings.subscribeChanges; - yield* serverSettingsChanges.pipe( - Stream.map((settings) => - Duration.toMillis( - resolveServerBackgroundActivitySettings(settings).providerHealthRefreshInterval, - ), - ), - Stream.changes, - Stream.runForEach(() => Queue.offer(refreshIntervalChanges, undefined).pipe(Effect.asVoid)), - Effect.forkScoped, + const startInitialRefreshIfNeeded = Effect.fn("startInitialRefreshIfNeeded")(function* () { + const shouldStart = yield* Ref.modify( + initialRefreshStateRef, + (state): readonly [boolean, InitialRefreshState] => + state === "idle" ? [true, "running"] : [false, state], ); - } + + if (!shouldStart) { + return; + } + + yield* refreshSnapshot().pipe( + Effect.onExit((exit) => + exit._tag === "Failure" + ? Ref.update(initialRefreshStateRef, (state) => (state === "running" ? "idle" : state)) + : Effect.void, + ), + Effect.ignoreCause({ log: true }), + Effect.forkIn(scope), + ); + }); yield* Stream.runForEach(input.streamSettings, (nextSettings) => Effect.asVoid(applySnapshot(nextSettings)), @@ -212,15 +203,18 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")( Effect.ignoreCause({ log: true }), ), ).pipe(Effect.forkScoped); - - yield* applySnapshot(initialSettings, { forceRefresh: true }).pipe( - Effect.ignoreCause({ log: true }), - Effect.forkScoped, - ); + yield* startInitialRefreshIfNeeded(); return { - maintenanceCapabilities: input.maintenanceCapabilities, - getSnapshot: Ref.get(snapshotStateRef).pipe(Effect.map((state) => state.snapshot)), + getSnapshot: startInitialRefreshIfNeeded().pipe( + Effect.flatMap(() => + input.getSettings.pipe( + Effect.flatMap(applySnapshot), + Effect.tapError(Effect.logError), + Effect.orDie, + ), + ), + ), refresh: refreshSnapshot().pipe(Effect.tapError(Effect.logError), Effect.orDie), get streamChanges() { return Stream.fromPubSub(changesPubSub); diff --git a/apps/server/src/serverSettings.ts b/apps/server/src/serverSettings.ts index 2798faf6f0..cd1eb3a281 100644 --- a/apps/server/src/serverSettings.ts +++ b/apps/server/src/serverSettings.ts @@ -182,6 +182,14 @@ export const layerTest = (overrides: DeepPartial = {}) => const ServerSettingsJson = fromLenientJson(ServerSettings); const decodeServerSettingsJsonExit = Schema.decodeUnknownExit(ServerSettingsJson); +const PROVIDER_ORDER: readonly ProviderKind[] = ["codex", "claudeAgent", "cursor"]; + +/** + * Ensure the `textGenerationModelSelection` points to an enabled provider. + * If the selected provider is disabled, fall back to the first enabled + * provider with its default model. This is applied at read-time so the + * persisted preference is preserved for when a provider is re-enabled. + */ function resolveTextGenerationProvider(settings: ServerSettings): ServerSettings { return isModelSelectionProviderEnabled(settings, settings.textGenerationModelSelection) ? settings diff --git a/apps/web/src/components/chat/CompactComposerControlsMenu.browser.tsx b/apps/web/src/components/chat/CompactComposerControlsMenu.browser.tsx new file mode 100644 index 0000000000..4d4269330c --- /dev/null +++ b/apps/web/src/components/chat/CompactComposerControlsMenu.browser.tsx @@ -0,0 +1,307 @@ +import { + DEFAULT_MODEL_BY_PROVIDER, + EnvironmentId, + ModelSelection, + ThreadId, +} from "@t3tools/contracts"; +import { scopedThreadKey, scopeThreadRef } from "@t3tools/client-runtime"; +import "../../index.css"; + +import { page } from "vitest/browser"; +import { afterEach, describe, expect, it, vi } from "vitest"; +import { render } from "vitest-browser-react"; + +import { CompactComposerControlsMenu } from "./CompactComposerControlsMenu"; +import { TraitsMenuContent } from "./TraitsPicker"; +import { useComposerDraftStore } from "../../composerDraftStore"; + +const LOCAL_ENVIRONMENT_ID = EnvironmentId.make("environment-local"); + +async function mountMenu(props?: { modelSelection?: ModelSelection; prompt?: string }) { + const threadId = ThreadId.make("thread-compact-menu"); + const threadRef = scopeThreadRef(LOCAL_ENVIRONMENT_ID, threadId); + const threadKey = scopedThreadKey(threadRef); + const provider = props?.modelSelection?.provider ?? "claudeAgent"; + const model = props?.modelSelection?.model ?? DEFAULT_MODEL_BY_PROVIDER[provider]; + + useComposerDraftStore.setState({ + draftsByThreadKey: { + [threadKey]: { + prompt: props?.prompt ?? "", + images: [], + nonPersistedImageIds: [], + persistedAttachments: [], + terminalContexts: [], + modelSelectionByProvider: { + [provider]: { + provider, + model, + ...(props?.modelSelection?.options ? { options: props.modelSelection.options } : {}), + }, + }, + activeProvider: provider, + runtimeMode: null, + interactionMode: null, + }, + }, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + }); + const host = document.createElement("div"); + document.body.append(host); + const onPromptChange = vi.fn(); + const providerOptions = props?.modelSelection?.options; + const models = + provider === "claudeAgent" + ? [ + { + slug: "claude-opus-4-6", + name: "Claude Opus 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "max", label: "Max" }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + { + slug: "claude-haiku-4-5", + name: "Claude Haiku 4.5", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: true, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "claude-sonnet-4-6", + name: "Claude Sonnet 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: false, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + ] + : provider === "codex" + ? [ + { + slug: "gpt-5.4", + name: "GPT-5.4", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + ] + : []; + const screen = await render( + + } + onToggleInteractionMode={vi.fn()} + onTogglePlanSidebar={vi.fn()} + onRuntimeModeChange={vi.fn()} + />, + { container: host }, + ); + + const cleanup = async () => { + await screen.unmount(); + host.remove(); + }; + + return { + [Symbol.asyncDispose]: cleanup, + cleanup, + }; +} + +describe("CompactComposerControlsMenu", () => { + afterEach(() => { + document.body.innerHTML = ""; + useComposerDraftStore.setState({ + draftsByThreadKey: {}, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + stickyModelSelectionByProvider: {}, + }); + }); + + it("shows fast mode controls for Opus", async () => { + await using _ = await mountMenu({ + modelSelection: { provider: "claudeAgent", model: "claude-opus-4-6" }, + }); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Fast Mode"); + expect(text).toContain("off"); + expect(text).toContain("on"); + }); + }); + + it("hides fast mode controls for non-Opus Claude models", async () => { + await using _ = await mountMenu({ + modelSelection: { provider: "claudeAgent", model: "claude-sonnet-4-6" }, + }); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + expect(document.body.textContent ?? "").not.toContain("Fast Mode"); + }); + }); + + it("shows only the provided effort options", async () => { + await using _ = await mountMenu({ + modelSelection: { provider: "claudeAgent", model: "claude-sonnet-4-6" }, + }); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Low"); + expect(text).toContain("Medium"); + expect(text).toContain("High"); + expect(text).not.toContain("Max"); + expect(text).toContain("Ultrathink"); + }); + }); + + it("shows a Claude thinking on/off section for Haiku", async () => { + await using _ = await mountMenu({ + modelSelection: { + provider: "claudeAgent", + model: "claude-haiku-4-5", + options: { thinking: true }, + }, + }); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Thinking"); + expect(text).toContain("On (default)"); + expect(text).toContain("Off"); + }); + }); + + it("shows prompt-controlled Ultrathink state with selectable effort controls", async () => { + await using _ = await mountMenu({ + modelSelection: { + provider: "claudeAgent", + model: "claude-opus-4-6", + options: { effort: "high" }, + }, + prompt: "Ultrathink:\nInvestigate this", + }); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Effort"); + expect(text).not.toContain("ultrathink"); + }); + }); + + it("warns when ultrathink appears in prompt body text", async () => { + await using _ = await mountMenu({ + modelSelection: { + provider: "claudeAgent", + model: "claude-opus-4-6", + options: { effort: "high" }, + }, + prompt: "Ultrathink:\nplease ultrathink about this problem", + }); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain( + 'Your prompt contains "ultrathink" in the text. Remove it to change effort.', + ); + }); + }); + + it("can hide the interaction mode section", async () => { + const host = document.createElement("div"); + document.body.append(host); + const screen = await render( + , + { container: host }, + ); + + await page.getByLabelText("More composer controls").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).not.toContain("Mode"); + expect(text).not.toContain("Chat"); + expect(text).not.toContain("Plan"); + expect(text).toContain("Access"); + expect(text).toContain("Supervised"); + expect(text).toContain("Full access"); + }); + + await screen.unmount(); + host.remove(); + }); +}); diff --git a/apps/web/src/components/chat/ProviderModelPicker.tsx b/apps/web/src/components/chat/ProviderModelPicker.tsx index a9b3a39811..090f2531b1 100644 --- a/apps/web/src/components/chat/ProviderModelPicker.tsx +++ b/apps/web/src/components/chat/ProviderModelPicker.tsx @@ -1,3 +1,10 @@ +import { type ProviderKind, type ServerProvider } from "@t3tools/contracts"; +import { resolveModelSlugForProvider, resolveSelectableModel } from "@t3tools/shared/model"; +import { memo, useState } from "react"; +import type { VariantProps } from "class-variance-authority"; +import { type ProviderPickerKind, PROVIDER_OPTIONS } from "../../session-logic"; +import { ChevronDownIcon } from "lucide-react"; +import { Button, buttonVariants } from "../ui/button"; import { type ProviderInstanceId, type ProviderDriverKind, @@ -39,97 +46,26 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: { open?: boolean; triggerVariant?: VariantProps["variant"]; triggerClassName?: string; - triggerAriaLabel?: string; - onOpenChange?: (open: boolean) => void; - getModelDisabledReason?: (instanceId: ProviderInstanceId, model: string) => string | null; - onInstanceModelChange: (instanceId: ProviderInstanceId, model: string) => void; + disabledReason?: string; + onProviderModelChange: (provider: ProviderKind, model: string) => void; }) { - const [uncontrolledIsMenuOpen, setUncontrolledIsMenuOpen] = useState(false); - const isMenuOpen = props.open ?? uncontrolledIsMenuOpen; - - // Resolve the active instance entry by exact routing key. The composer - // resolves fallbacks before rendering this component; if the selected - // instance disappears, do not infer a replacement from its driver kind. - const activeEntry = useMemo(() => { - return ( - props.instanceEntries.find((entry) => entry.instanceId === props.activeInstanceId) ?? null - ); - }, [props.activeInstanceId, props.instanceEntries]); - - const activeInstanceId = props.activeInstanceId; - const selectedInstanceOptions = props.modelOptionsByInstance.get(activeInstanceId) ?? []; - // If the current slug belongs to a different instance (for example after - // a provider switch or disable), prefer the active instance's first - // option so the trigger icon and label stay in sync instead of showing - // a stale foreign slug. - const selectedModel = - selectedInstanceOptions.find((option) => option.slug === props.model) ?? - selectedInstanceOptions[0]; - const triggerTitle = selectedModel ? getTriggerDisplayModelName(selectedModel) : props.model; - const triggerLabel = selectedModel ? getTriggerDisplayModelLabel(selectedModel) : props.model; - const duplicateDriverCount = props.instanceEntries.filter( - (entry) => activeEntry !== null && entry.driverKind === activeEntry.driverKind, - ).length; - const showInstanceBadge = Boolean(activeEntry?.accentColor) || duplicateDriverCount > 1; - - const setIsMenuOpen = (open: boolean) => { - props.onOpenChange?.(open); - if (props.open === undefined) { - setUncontrolledIsMenuOpen(open); - } - }; - - useEffect(() => { - if (!isMenuOpen) { - return; - } - - const { documentElement, body } = document; - const previousDocumentOverscrollBehavior = documentElement.style.overscrollBehavior; - const previousBodyOverflow = body.style.overflow; - const previousBodyPaddingRight = body.style.paddingRight; - const scrollbarWidth = window.innerWidth - documentElement.clientWidth; - - documentElement.style.overscrollBehavior = "contain"; - body.style.overflow = "hidden"; - if (scrollbarWidth > 0) { - body.style.paddingRight = `${scrollbarWidth}px`; - } - - const shouldAllowOverlayScroll = (target: EventTarget | null) => { - return target instanceof Element && target.closest("[data-model-picker-content]"); - }; - const preventBackgroundWheel = (event: WheelEvent) => { - if (shouldAllowOverlayScroll(event.target)) { - return; - } - event.preventDefault(); - }; - const preventBackgroundTouchMove = (event: TouchEvent) => { - if (shouldAllowOverlayScroll(event.target)) { - return; - } - event.preventDefault(); - }; - - document.addEventListener("wheel", preventBackgroundWheel, { capture: true, passive: false }); - document.addEventListener("touchmove", preventBackgroundTouchMove, { - capture: true, - passive: false, - }); - - return () => { - document.removeEventListener("wheel", preventBackgroundWheel, { capture: true }); - document.removeEventListener("touchmove", preventBackgroundTouchMove, { capture: true }); - documentElement.style.overscrollBehavior = previousDocumentOverscrollBehavior; - body.style.overflow = previousBodyOverflow; - body.style.paddingRight = previousBodyPaddingRight; - }; - }, [isMenuOpen]); - - const handleInstanceModelChange = (instanceId: ProviderInstanceId, model: string) => { + const [isMenuOpen, setIsMenuOpen] = useState(false); + const activeProvider = props.lockedProvider ?? props.provider; + const selectedProviderOptions = props.modelOptionsByProvider[activeProvider]; + const selectedModelValue = + resolveSelectableModel(activeProvider, props.model, selectedProviderOptions) ?? props.model; + const selectedModelLabel = + selectedProviderOptions.find((option) => option.slug === selectedModelValue)?.name ?? + props.model; + const ProviderIcon = PROVIDER_ICON_BY_PROVIDER[activeProvider]; + const handleModelChange = (provider: ProviderKind, value: string) => { if (props.disabled) return; - props.onInstanceModelChange(instanceId, model); + if (!value) return; + const resolvedModel = + resolveSelectableModel(provider, value, props.modelOptionsByProvider[provider]) ?? + resolveModelSlugForProvider(provider, value); + if (!resolvedModel) return; + props.onProviderModelChange(provider, resolvedModel); setIsMenuOpen(false); }; @@ -156,6 +92,7 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: { props.triggerClassName, )} disabled={props.disabled} + title={props.disabled ? props.disabledReason : undefined} /> } > @@ -182,31 +119,127 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: { {triggerLabel} - - - - setIsMenuOpen(false)} - {...(props.getModelDisabledReason - ? { getModelDisabledReason: props.getModelDisabledReason } - : {})} - onInstanceModelChange={handleInstanceModelChange} - /> - - + + + {props.lockedProvider !== null ? ( + + handleModelChange(props.lockedProvider!, value)} + > + {props.modelOptionsByProvider[props.lockedProvider].map((modelOption) => ( + setIsMenuOpen(false)} + > + {modelOption.name} + + ))} + + + ) : ( + <> + {AVAILABLE_PROVIDER_OPTIONS.map((option) => { + const OptionIcon = PROVIDER_ICON_BY_PROVIDER[option.value]; + const liveProvider = props.providers + ? getProviderSnapshot(props.providers, option.value) + : undefined; + if (liveProvider && liveProvider.status !== "ready") { + const unavailableLabel = !liveProvider.enabled + ? "Disabled" + : !liveProvider.installed + ? "Not installed" + : "Unavailable"; + return ( + + + ); + } + return ( + + + + + + handleModelChange(option.value, value)} + > + {props.modelOptionsByProvider[option.value].map((modelOption) => ( + setIsMenuOpen(false)} + > + {modelOption.name} + + ))} + + + + + ); + })} + {UNAVAILABLE_PROVIDER_OPTIONS.length > 0 && } + {UNAVAILABLE_PROVIDER_OPTIONS.map((option) => { + const OptionIcon = PROVIDER_ICON_BY_PROVIDER[option.value]; + return ( + + + ); + })} + {UNAVAILABLE_PROVIDER_OPTIONS.length === 0 && } + {COMING_SOON_PROVIDER_OPTIONS.map((option) => { + const OptionIcon = option.icon; + return ( + + + ); + })} + + )} + + ); }); diff --git a/apps/web/src/components/chat/TraitsPicker.browser.tsx b/apps/web/src/components/chat/TraitsPicker.browser.tsx new file mode 100644 index 0000000000..cbcef92adf --- /dev/null +++ b/apps/web/src/components/chat/TraitsPicker.browser.tsx @@ -0,0 +1,696 @@ +import "../../index.css"; + +import { + type ModelSelection, + ClaudeModelOptions, + CodexModelOptions, + CursorModelOptions, + DEFAULT_MODEL_BY_PROVIDER, + DEFAULT_SERVER_SETTINGS, + OpenCodeModelOptions, + EnvironmentId, + type ServerProvider, + ThreadId, +} from "@t3tools/contracts"; +import { scopedThreadKey, scopeThreadRef } from "@t3tools/client-runtime"; +import { page } from "vitest/browser"; +import { useCallback } from "react"; +import { afterEach, describe, expect, it, vi } from "vitest"; +import { render } from "vitest-browser-react"; + +import { TraitsPicker } from "./TraitsPicker"; +import { + COMPOSER_DRAFT_STORAGE_KEY, + ComposerThreadDraftState, + useComposerDraftStore, + useComposerThreadDraft, + useEffectiveComposerModelState, +} from "../../composerDraftStore"; +import { DEFAULT_CLIENT_SETTINGS } from "@t3tools/contracts/settings"; + +// ── Claude TraitsPicker tests ───────────────────────────────────────── + +const LOCAL_ENVIRONMENT_ID = EnvironmentId.make("environment-local"); +const CLAUDE_THREAD_ID = ThreadId.make("thread-claude-traits"); +const CLAUDE_THREAD_REF = scopeThreadRef(LOCAL_ENVIRONMENT_ID, CLAUDE_THREAD_ID); +const CLAUDE_THREAD_KEY = scopedThreadKey(CLAUDE_THREAD_REF); +const CODEX_THREAD_ID = ThreadId.make("thread-codex-traits"); +const CODEX_THREAD_REF = scopeThreadRef(LOCAL_ENVIRONMENT_ID, CODEX_THREAD_ID); +const CODEX_THREAD_KEY = scopedThreadKey(CODEX_THREAD_REF); +const TEST_PROVIDERS: ReadonlyArray = [ + { + provider: "codex", + enabled: true, + installed: true, + version: "0.1.0", + status: "ready", + auth: { status: "authenticated" }, + checkedAt: "2026-01-01T00:00:00.000Z", + slashCommands: [], + skills: [], + models: [ + { + slug: "gpt-5.4", + name: "GPT-5.4", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + ], + }, + { + provider: "opencode", + enabled: true, + installed: true, + version: "0.1.0", + status: "ready", + auth: { status: "authenticated" }, + checkedAt: "2026-01-01T00:00:00.000Z", + slashCommands: [], + skills: [], + models: [ + { + slug: "openai/gpt-5", + name: "GPT-5", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + variantOptions: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium", isDefault: true }, + ], + agentOptions: [ + { value: "build", label: "Build", isDefault: true }, + { value: "plan", label: "Plan" }, + ], + }, + }, + ], + }, + { + provider: "claudeAgent", + enabled: true, + installed: true, + version: "0.1.0", + status: "ready", + auth: { status: "authenticated" }, + checkedAt: "2026-01-01T00:00:00.000Z", + slashCommands: [], + skills: [], + models: [ + { + slug: "claude-opus-4-6", + name: "Claude Opus 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "max", label: "Max" }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + { + slug: "claude-sonnet-4-6", + name: "Claude Sonnet 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: false, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + { + slug: "claude-haiku-4-5", + name: "Claude Haiku 4.5", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: true, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + ], + }, +]; +const findTestProvider = (provider: ServerProvider["provider"]) => { + const testProvider = TEST_PROVIDERS.find((candidate) => candidate.provider === provider); + if (!testProvider) { + throw new Error(`Missing test provider fixture: ${provider}`); + } + return testProvider; +}; + +function ClaudeTraitsPickerHarness(props: { + model: string; + fallbackModelSelection: ModelSelection | null; + triggerVariant?: "ghost" | "outline"; +}) { + const prompt = useComposerThreadDraft(CLAUDE_THREAD_REF).prompt; + const setPrompt = useComposerDraftStore((store) => store.setPrompt); + const { modelOptions, selectedModel } = useEffectiveComposerModelState({ + threadRef: CLAUDE_THREAD_REF, + providers: TEST_PROVIDERS, + selectedProvider: "claudeAgent", + threadModelSelection: props.fallbackModelSelection, + projectModelSelection: null, + settings: { + ...DEFAULT_SERVER_SETTINGS, + ...DEFAULT_CLIENT_SETTINGS, + }, + }); + const handlePromptChange = useCallback( + (nextPrompt: string) => { + setPrompt(CLAUDE_THREAD_REF, nextPrompt); + }, + [setPrompt], + ); + + return ( + + ); +} + +async function mountClaudePicker(props?: { + model?: string; + prompt?: string; + options?: ClaudeModelOptions; + fallbackModelOptions?: { + effort?: "low" | "medium" | "high" | "max" | "ultrathink"; + thinking?: boolean; + fastMode?: boolean; + } | null; + skipDraftModelOptions?: boolean; + triggerVariant?: "ghost" | "outline"; +}) { + const model = props?.model ?? "claude-opus-4-6"; + const claudeOptions = !props?.skipDraftModelOptions ? props?.options : undefined; + const draftsByThreadKey: Record = { + [CLAUDE_THREAD_KEY]: { + prompt: props?.prompt ?? "", + images: [], + nonPersistedImageIds: [], + persistedAttachments: [], + terminalContexts: [], + modelSelectionByProvider: props?.skipDraftModelOptions + ? {} + : { + claudeAgent: { + provider: "claudeAgent", + model, + ...(claudeOptions && Object.keys(claudeOptions).length > 0 + ? { options: claudeOptions } + : {}), + }, + }, + activeProvider: "claudeAgent", + runtimeMode: null, + interactionMode: null, + }, + }; + useComposerDraftStore.setState({ + draftsByThreadKey, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + }); + const host = document.createElement("div"); + document.body.append(host); + const fallbackModelSelection = + props?.fallbackModelOptions !== undefined + ? ({ + provider: "claudeAgent", + model, + ...(props.fallbackModelOptions ? { options: props.fallbackModelOptions } : {}), + } satisfies ModelSelection) + : null; + const screen = await render( + , + { container: host }, + ); + + const cleanup = async () => { + await screen.unmount(); + host.remove(); + }; + + return { + [Symbol.asyncDispose]: cleanup, + cleanup, + }; +} + +describe("TraitsPicker (Claude)", () => { + afterEach(() => { + document.body.innerHTML = ""; + useComposerDraftStore.setState({ + draftsByThreadKey: {}, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + stickyModelSelectionByProvider: {}, + }); + }); + + it("shows fast mode controls for Opus", async () => { + await using _ = await mountClaudePicker(); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Fast Mode"); + expect(text).toContain("off"); + expect(text).toContain("on"); + }); + }); + + it("hides fast mode controls for non-Opus models", async () => { + await using _ = await mountClaudePicker({ model: "claude-sonnet-4-6" }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + expect(document.body.textContent ?? "").not.toContain("Fast Mode"); + }); + }); + + it("shows only the provided effort options", async () => { + await using _ = await mountClaudePicker({ + model: "claude-sonnet-4-6", + }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Low"); + expect(text).toContain("Medium"); + expect(text).toContain("High"); + expect(text).not.toContain("Max"); + expect(text).toContain("Ultrathink"); + }); + }); + + it("shows a th inking on/off dropdown for Haiku", async () => { + await using _ = await mountClaudePicker({ + model: "claude-haiku-4-5", + options: { thinking: true }, + }); + + await vi.waitFor(() => { + expect(document.body.textContent ?? "").toContain("Thinking On"); + }); + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Thinking"); + expect(text).toContain("On (default)"); + expect(text).toContain("Off"); + }); + }); + + it("shows prompt-controlled Ultrathink state with selectable effort controls", async () => { + await using _ = await mountClaudePicker({ + model: "claude-opus-4-6", + options: { effort: "high" }, + prompt: "Ultrathink:\nInvestigate this", + }); + + await vi.waitFor(() => { + expect(document.body.textContent ?? "").toContain("Ultrathink"); + expect(document.body.textContent ?? "").not.toContain("Ultrathink · Prompt"); + }); + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Effort"); + expect(text).not.toContain("ultrathink"); + }); + }); + + it("warns when ultrathink appears in prompt body text", async () => { + await using _ = await mountClaudePicker({ + model: "claude-opus-4-6", + options: { effort: "high" }, + prompt: "Ultrathink:\nplease ultrathink about this problem", + }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain( + 'Your prompt contains "ultrathink" in the text. Remove it to change effort.', + ); + }); + }); + + it("persists sticky claude model options when traits change", async () => { + await using _ = await mountClaudePicker({ + model: "claude-opus-4-6", + options: { effort: "medium", fastMode: false }, + }); + + await page.getByRole("button").click(); + await page.getByRole("menuitemradio", { name: "Max" }).click(); + + expect( + useComposerDraftStore.getState().stickyModelSelectionByProvider.claudeAgent, + ).toMatchObject({ + provider: "claudeAgent", + options: { + effort: "max", + }, + }); + }); + + it("accepts outline trigger styling", async () => { + await using _ = await mountClaudePicker({ + triggerVariant: "outline", + }); + + const button = document.querySelector("button"); + if (!(button instanceof HTMLButtonElement)) { + throw new Error("Expected traits trigger button to be rendered."); + } + expect(button.className).toContain("border-input"); + expect(button.className).toContain("bg-popover"); + }); +}); + +// ── Codex TraitsPicker tests ────────────────────────────────────────── + +async function mountCodexPicker(props: { model?: string; options?: CodexModelOptions }) { + const model = props.model ?? DEFAULT_MODEL_BY_PROVIDER.codex; + const draftsByThreadKey: Record = { + [CODEX_THREAD_KEY]: { + prompt: "", + images: [], + nonPersistedImageIds: [], + persistedAttachments: [], + terminalContexts: [], + modelSelectionByProvider: { + codex: { + provider: "codex", + model, + ...(props.options ? { options: props.options } : {}), + }, + }, + activeProvider: "codex", + runtimeMode: null, + interactionMode: null, + }, + }; + + useComposerDraftStore.setState({ + draftsByThreadKey, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: { + "environment-local:project-codex-traits": CODEX_THREAD_KEY, + }, + }); + const host = document.createElement("div"); + document.body.append(host); + const screen = await render( + {}} + />, + { container: host }, + ); + + const cleanup = async () => { + await screen.unmount(); + host.remove(); + }; + + return { + [Symbol.asyncDispose]: cleanup, + cleanup, + }; +} + +async function mountCursorPicker(props: { model?: string; options?: CursorModelOptions }) { + const model = props.model ?? DEFAULT_MODEL_BY_PROVIDER.cursor; + const cursorThreadId = ThreadId.make("thread-cursor-traits"); + const cursorThreadRef = scopeThreadRef(LOCAL_ENVIRONMENT_ID, cursorThreadId); + const cursorThreadKey = scopedThreadKey(cursorThreadRef); + const host = document.createElement("div"); + document.body.append(host); + + useComposerDraftStore.setState({ + draftsByThreadKey: { + [cursorThreadKey]: { + prompt: "", + images: [], + nonPersistedImageIds: [], + persistedAttachments: [], + terminalContexts: [], + modelSelectionByProvider: { + cursor: { + provider: "cursor", + model, + ...(props.options ? { options: props.options } : {}), + }, + }, + activeProvider: "cursor", + runtimeMode: null, + interactionMode: null, + }, + }, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + }); + + const screen = await render( + {}} + />, + { container: host }, + ); + + const cleanup = async () => { + await screen.unmount(); + host.remove(); + }; + + return { + [Symbol.asyncDispose]: cleanup, + cleanup, + }; +} + +describe("TraitsPicker (Codex)", () => { + afterEach(() => { + document.body.innerHTML = ""; + localStorage.removeItem(COMPOSER_DRAFT_STORAGE_KEY); + useComposerDraftStore.setState({ + draftsByThreadKey: {}, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + stickyModelSelectionByProvider: {}, + }); + }); + + it("shows fast mode controls", async () => { + await using _ = await mountCodexPicker({ + options: { fastMode: false }, + }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Fast Mode"); + expect(text).toContain("off"); + expect(text).toContain("on"); + }); + }); + + it("shows Fast in the trigger label when fast mode is active", async () => { + await using _ = await mountCodexPicker({ + options: { fastMode: true }, + }); + + await vi.waitFor(() => { + expect(document.body.textContent ?? "").toContain("High · Fast"); + }); + }); + + it("shows only the provided effort options", async () => { + await using _ = await mountCodexPicker({ + options: { fastMode: false }, + }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Extra High"); + expect(text).toContain("High"); + expect(text).not.toContain("Low"); + expect(text).not.toContain("Medium"); + }); + }); + + it("persists sticky codex model options when traits change", async () => { + await using _ = await mountCodexPicker({ + options: { fastMode: false }, + }); + + await page.getByRole("button").click(); + await page.getByRole("menuitemradio", { name: "on" }).click(); + + expect(useComposerDraftStore.getState().stickyModelSelectionByProvider.codex).toMatchObject({ + provider: "codex", + options: { fastMode: true }, + }); + }); +}); + +describe("TraitsPicker (Cursor)", () => { + afterEach(() => { + document.body.innerHTML = ""; + localStorage.removeItem(COMPOSER_DRAFT_STORAGE_KEY); + useComposerDraftStore.setState({ + draftsByThreadKey: {}, + draftThreadsByThreadKey: {}, + logicalProjectDraftThreadKeyByLogicalProjectKey: {}, + stickyModelSelectionByProvider: {}, + }); + }); + + it("uses the selected fast mode menu label for the trigger in fast-only state", async () => { + await using _ = await mountCursorPicker({ + model: "composer-2", + options: { fastMode: false }, + }); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Normal"); + }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Fast Mode"); + expect(text).toContain("off"); + expect(text).toContain("on"); + }); + }); + + it("shows Normal for Cursor Opus 4.6 when fast mode and context window are both at defaults", async () => { + await using _ = await mountCursorPicker({ + model: "claude-opus-4-6", + options: { fastMode: false }, + }); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Normal"); + }); + + await page.getByRole("button").click(); + + await vi.waitFor(() => { + const text = document.body.textContent ?? ""; + expect(text).toContain("Fast Mode"); + expect(text).toContain("Context Window"); + expect(text).toContain("200K (default)"); + expect(text).toContain("1M"); + }); + }); + + it("shows Normal · 1M for Cursor Opus 4.6 when fast mode is off and context window is overridden", async () => { + await using _ = await mountCursorPicker({ + model: "claude-opus-4-6", + options: { fastMode: false, contextWindow: "1m" }, + }); + + await vi.waitFor(() => { + expect(document.body.textContent ?? "").toContain("Normal · 1M"); + }); + }); +}); diff --git a/apps/web/src/components/chat/composerProviderRegistry.test.tsx b/apps/web/src/components/chat/composerProviderRegistry.test.tsx new file mode 100644 index 0000000000..15a8158745 --- /dev/null +++ b/apps/web/src/components/chat/composerProviderRegistry.test.tsx @@ -0,0 +1,731 @@ +import { describe, expect, it } from "vitest"; +import type { ServerProviderModel } from "@t3tools/contracts"; +import { + getComposerProviderControls, + getComposerProviderState, + renderProviderTraitsMenuContent, + renderProviderTraitsPicker, +} from "./composerProviderRegistry"; + +const CODEX_MODELS: ReadonlyArray = [ + { + slug: "gpt-5.4", + name: "GPT-5.4", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "xhigh", label: "Extra High" }, + { value: "high", label: "High", isDefault: true }, + { value: "medium", label: "Medium" }, + { value: "low", label: "Low" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, +]; + +const CURSOR_MODELS: ReadonlyArray = [ + { + slug: "auto", + name: "Auto", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "composer-2", + name: "Composer 2", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.3-codex", + name: "Codex 5.3", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium", isDefault: true }, + { value: "high", label: "High" }, + { value: "xhigh", label: "Extra high" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "gpt-5.4", + name: "GPT-5.4", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium", isDefault: true }, + { value: "high", label: "High" }, + { value: "xhigh", label: "Extra high" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [ + { value: "272k", label: "272k", isDefault: true }, + { value: "1m", label: "1M" }, + ], + promptInjectedEffortLevels: [], + }, + }, + { + slug: "claude-opus-4-6", + name: "Opus 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + ], + supportsFastMode: false, + supportsThinkingToggle: true, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, +]; + +const CLAUDE_MODELS: ReadonlyArray = [ + { + slug: "claude-opus-4-6", + name: "Claude Opus 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "max", label: "Max" }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + { + slug: "claude-sonnet-4-6", + name: "Claude Sonnet 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: false, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + { + slug: "claude-haiku-4-5", + name: "Claude Haiku 4.5", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: true, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, +]; + +const CLAUDE_MODELS_WITH_CONTEXT_WINDOW: ReadonlyArray = [ + { + slug: "claude-opus-4-6", + name: "Claude Opus 4.6", + isCustom: false, + capabilities: { + reasoningEffortLevels: [ + { value: "medium", label: "Medium" }, + { value: "high", label: "High", isDefault: true }, + { value: "max", label: "Max" }, + { value: "ultrathink", label: "Ultrathink" }, + ], + supportsFastMode: true, + supportsThinkingToggle: false, + contextWindowOptions: [ + { value: "200k", label: "200k", isDefault: true }, + { value: "1m", label: "1M" }, + ], + promptInjectedEffortLevels: ["ultrathink"], + }, + }, + { + slug: "claude-haiku-4-5", + name: "Claude Haiku 4.5", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: true, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + }, + }, +]; + +const OPENCODE_MODELS: ReadonlyArray = [ + { + slug: "openai/gpt-5", + name: "GPT-5", + isCustom: false, + capabilities: { + reasoningEffortLevels: [], + supportsFastMode: false, + supportsThinkingToggle: false, + contextWindowOptions: [], + promptInjectedEffortLevels: [], + variantOptions: [ + { value: "low", label: "Low" }, + { value: "medium", label: "Medium", isDefault: true }, + ], + agentOptions: [ + { value: "build", label: "Build", isDefault: true }, + { value: "plan", label: "Plan" }, + ], + }, + }, +]; + +describe("getComposerProviderState", () => { + it("returns codex defaults when no codex draft options exist", () => { + const state = getComposerProviderState({ + provider: "codex", + model: "gpt-5.4", + models: CODEX_MODELS, + prompt: "", + modelOptions: undefined, + }); + + expect(state).toEqual({ + provider: "codex", + promptEffort: "high", + modelOptionsForDispatch: { + reasoningEffort: "high", + }, + }); + }); + + it("normalizes codex dispatch options while preserving the selected effort", () => { + const state = getComposerProviderState({ + provider: "codex", + model: "gpt-5.4", + models: CODEX_MODELS, + prompt: "", + modelOptions: { + codex: { + reasoningEffort: "low", + fastMode: true, + }, + }, + }); + + expect(state).toEqual({ + provider: "codex", + promptEffort: "low", + modelOptionsForDispatch: { + reasoningEffort: "low", + fastMode: true, + }, + }); + }); + + it("preserves codex fast mode when it is the only active option", () => { + const state = getComposerProviderState({ + provider: "codex", + model: "gpt-5.4", + models: CODEX_MODELS, + prompt: "", + modelOptions: { + codex: { + fastMode: true, + }, + }, + }); + + expect(state).toEqual({ + provider: "codex", + promptEffort: "high", + modelOptionsForDispatch: { + reasoningEffort: "high", + fastMode: true, + }, + }); + }); + + it("preserves codex default effort explicitly in dispatch options", () => { + const state = getComposerProviderState({ + provider: "codex", + model: "gpt-5.4", + models: CODEX_MODELS, + prompt: "", + modelOptions: { + codex: { + reasoningEffort: "high", + fastMode: false, + }, + }, + }); + + expect(state).toEqual({ + provider: "codex", + promptEffort: "high", + modelOptionsForDispatch: { + reasoningEffort: "high", + fastMode: false, + }, + }); + }); + + it("returns Claude defaults for effort-capable models", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-sonnet-4-6", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: undefined, + }); + + expect(state).toEqual({ + provider: "claudeAgent", + promptEffort: "high", + modelOptionsForDispatch: { + effort: "high", + }, + }); + }); + + it("tracks Claude ultrathink from the prompt without changing dispatch effort", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-sonnet-4-6", + models: CLAUDE_MODELS, + prompt: "Ultrathink:\nInvestigate this failure", + modelOptions: { + claudeAgent: { + effort: "medium", + }, + }, + }); + + expect(state).toEqual({ + provider: "claudeAgent", + promptEffort: "medium", + modelOptionsForDispatch: { + effort: "medium", + }, + composerFrameClassName: "ultrathink-frame", + composerSurfaceClassName: "shadow-[0_0_0_1px_rgba(255,255,255,0.04)_inset]", + modelPickerIconClassName: "ultrathink-chroma", + }); + }); + + it("drops unsupported Claude effort options for models without effort controls", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-haiku-4-5", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: { + claudeAgent: { + effort: "max", + thinking: false, + }, + }, + }); + + expect(state).toEqual({ + provider: "claudeAgent", + promptEffort: null, + modelOptionsForDispatch: { + thinking: false, + }, + }); + }); + + it("preserves Claude fast mode when it is the only active option", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-opus-4-6", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: { + claudeAgent: { + fastMode: true, + }, + }, + }); + + expect(state).toEqual({ + provider: "claudeAgent", + promptEffort: "high", + modelOptionsForDispatch: { + effort: "high", + fastMode: true, + }, + }); + }); + + it("returns minimal state for Cursor without trait controls", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "auto", + models: CURSOR_MODELS, + prompt: "", + modelOptions: undefined, + }); + + expect(state).toEqual({ + provider: "cursor", + promptEffort: null, + modelOptionsForDispatch: undefined, + }); + }); + + it("dispatches Cursor fast traits separately from the family model key", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "composer-2", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { fastMode: true }, + }, + }); + + expect(state).toEqual({ + provider: "cursor", + promptEffort: null, + modelOptionsForDispatch: { fastMode: true }, + }); + }); + + it("resolves Cursor reasoning effort from server-driven capabilities", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "gpt-5.3-codex", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { reasoning: "high" }, + }, + }); + + expect(state).toEqual({ + provider: "cursor", + promptEffort: "high", + modelOptionsForDispatch: { reasoning: "high" }, + }); + }); + + it("preserves default Cursor reasoning in dispatch options so prior overrides can be cleared", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "gpt-5.3-codex", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { reasoning: "medium" }, + }, + }); + + expect(state).toEqual({ + provider: "cursor", + promptEffort: "medium", + modelOptionsForDispatch: { reasoning: "medium" }, + }); + }); + + it("preserves Cursor context window in dispatch options", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "gpt-5.4", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { + contextWindow: "1m", + }, + }, + }); + + expect(state).toEqual({ + provider: "cursor", + promptEffort: "medium", + modelOptionsForDispatch: { + contextWindow: "1m", + reasoning: "medium", + }, + }); + }); + + it("preserves explicit default Cursor reasoning so deepMerge can clear a prior non-default", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "gpt-5.4", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { reasoning: "medium" }, + }, + }); + + expect(state.modelOptionsForDispatch).toHaveProperty("reasoning", "medium"); + }); + + it("preserves explicit Cursor fastMode: false so deepMerge can overwrite a prior true", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "composer-2", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { fastMode: false }, + }, + }); + + expect(state.modelOptionsForDispatch).toHaveProperty("fastMode", false); + }); + + it("preserves explicit Cursor thinking: true so deepMerge can overwrite a prior false", () => { + const state = getComposerProviderState({ + provider: "cursor", + model: "claude-opus-4-6", + models: CURSOR_MODELS, + prompt: "", + modelOptions: { + cursor: { thinking: true }, + }, + }); + + expect(state.modelOptionsForDispatch).toHaveProperty("thinking", true); + }); + + it("preserves Claude default effort explicitly in dispatch options", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-opus-4-6", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: { + claudeAgent: { + effort: "high", + fastMode: false, + }, + }, + }); + + expect(state).toEqual({ + provider: "claudeAgent", + promptEffort: "high", + modelOptionsForDispatch: { + effort: "high", + fastMode: false, + }, + }); + }); + + it("preserves explicit fastMode: false so deepMerge can overwrite a prior true", () => { + // Regression: normalizeClaudeModelOptionsWithCapabilities used to strip + // fastMode: false, which meant deepMerge could never clear a previous true. + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-opus-4-6", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: { + claudeAgent: { + effort: "high", + fastMode: false, + }, + }, + }); + + expect(state.modelOptionsForDispatch).toHaveProperty("fastMode", false); + }); + + it("preserves explicit thinking: true so deepMerge can overwrite a prior false", () => { + // Regression: thinking: true (the default) used to be stripped, which + // meant deepMerge could never clear a previous thinking: false. + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-haiku-4-5", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: { + claudeAgent: { + thinking: true, + }, + }, + }); + + expect(state.modelOptionsForDispatch).toHaveProperty("thinking", true); + }); + + it("preserves Claude default context window explicitly in dispatch options", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-opus-4-6", + models: CLAUDE_MODELS_WITH_CONTEXT_WINDOW, + prompt: "", + modelOptions: { + claudeAgent: { + effort: "high", + contextWindow: "200k", + }, + }, + }); + + expect(state.modelOptionsForDispatch).toMatchObject({ + effort: "high", + contextWindow: "200k", + }); + }); + + it("preserves explicit contextWindow default so deepMerge can overwrite a prior 1m", () => { + // Regression: the default contextWindow must survive normalization so + // deepMerge can clear an older non-default 1m selection. + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-opus-4-6", + models: CLAUDE_MODELS_WITH_CONTEXT_WINDOW, + prompt: "", + modelOptions: { + claudeAgent: { + contextWindow: "200k", + }, + }, + }); + + expect(state.modelOptionsForDispatch).toHaveProperty("contextWindow", "200k"); + }); + + it("omits contextWindow when the model does not support it", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-haiku-4-5", + models: CLAUDE_MODELS_WITH_CONTEXT_WINDOW, + prompt: "", + modelOptions: { + claudeAgent: { + contextWindow: "1m", + }, + }, + }); + + expect(state.modelOptionsForDispatch).toBeUndefined(); + }); + + it("omits fastMode when the model does not support it", () => { + const state = getComposerProviderState({ + provider: "claudeAgent", + model: "claude-sonnet-4-6", + models: CLAUDE_MODELS, + prompt: "", + modelOptions: { + claudeAgent: { + effort: "high", + fastMode: true, + }, + }, + }); + + expect(state.modelOptionsForDispatch).not.toHaveProperty("fastMode"); + }); + + it("preserves OpenCode variant and agent options for dispatch", () => { + const state = getComposerProviderState({ + provider: "opencode", + model: "openai/gpt-5", + models: OPENCODE_MODELS, + prompt: "", + modelOptions: { + opencode: { + variant: "medium", + agent: "plan", + }, + }, + }); + + expect(state).toEqual({ + provider: "opencode", + promptEffort: "medium", + modelOptionsForDispatch: { + variant: "medium", + agent: "plan", + }, + }); + }); +}); + +describe("getComposerProviderControls", () => { + it("hides the interaction mode toggle for OpenCode", () => { + expect(getComposerProviderControls("opencode")).toEqual({ + showInteractionModeToggle: false, + }); + }); + + it("keeps the interaction mode toggle for Codex and Claude", () => { + expect(getComposerProviderControls("codex")).toEqual({ + showInteractionModeToggle: true, + }); + expect(getComposerProviderControls("claudeAgent")).toEqual({ + showInteractionModeToggle: true, + }); + }); +}); + +describe("provider traits render guards", () => { + it("returns null for codex traits picker when no thread target is provided", () => { + const content = renderProviderTraitsPicker({ + provider: "codex", + model: "gpt-5.4", + models: CODEX_MODELS, + modelOptions: undefined, + prompt: "", + onPromptChange: () => {}, + }); + + expect(content).toBeNull(); + }); + + it("returns null for claude traits menu content when no thread target is provided", () => { + const content = renderProviderTraitsMenuContent({ + provider: "claudeAgent", + model: "claude-sonnet-4-6", + models: CLAUDE_MODELS, + modelOptions: undefined, + prompt: "", + onPromptChange: () => {}, + }); + + expect(content).toBeNull(); + }); +}); diff --git a/apps/web/src/components/ui/input.tsx b/apps/web/src/components/ui/input.tsx index 6edc8d4a62..4e73bd810c 100644 --- a/apps/web/src/components/ui/input.tsx +++ b/apps/web/src/components/ui/input.tsx @@ -5,10 +5,12 @@ import type * as React from "react"; import { cn } from "~/lib/utils"; -type InputProps = Omit, "size"> & { - size?: "sm" | "default" | "lg" | number; - unstyled?: boolean; - nativeInput?: boolean; +type InputProps = Omit & { + className?: string | undefined; + size?: "sm" | "default" | "lg" | number | undefined; + style?: React.CSSProperties | undefined; + unstyled?: boolean | undefined; + nativeInput?: boolean | undefined; }; function Input({ diff --git a/apps/web/src/composerDraftStore.test.ts b/apps/web/src/composerDraftStore.test.ts index 3e4106c583..ff0dc0b2a8 100644 --- a/apps/web/src/composerDraftStore.test.ts +++ b/apps/web/src/composerDraftStore.test.ts @@ -1391,30 +1391,6 @@ describe("composerDraftStore modelSelection", () => { ); }); - it("preserves the selected Cursor model when only traits change", () => { - const store = useComposerDraftStore.getState(); - - store.setProviderModelOptions(threadRef, CURSOR_DRIVER, toSelections({ reasoning: "high" }), { - model: "gpt-5.4", - persistSticky: true, - }); - - expect( - draftFor(threadId, TEST_ENVIRONMENT_ID)?.modelSelectionByProvider[CURSOR_INSTANCE], - ).toEqual( - modelSelection(CURSOR_DRIVER, "gpt-5.4", { - reasoning: "high", - }), - ); - expect( - useComposerDraftStore.getState().stickyModelSelectionByProvider[CURSOR_INSTANCE], - ).toEqual( - modelSelection(CURSOR_DRIVER, "gpt-5.4", { - reasoning: "high", - }), - ); - }); - it("updates only the draft when sticky persistence is omitted", () => { const store = useComposerDraftStore.getState(); diff --git a/apps/web/src/session-logic.test.ts b/apps/web/src/session-logic.test.ts index f5effff660..622e6b8e0b 100644 --- a/apps/web/src/session-logic.test.ts +++ b/apps/web/src/session-logic.test.ts @@ -1294,41 +1294,6 @@ describe("deriveWorkLogEntries", () => { }); }); - it("does not use command stdout as the detail when Cursor omits the command input", () => { - const activities: OrchestrationThreadActivity[] = [ - makeActivity({ - id: "cursor-command-complete", - createdAt: "2026-04-16T22:40:42.221Z", - kind: "tool.completed", - summary: "Ran command", - payload: { - itemType: "command_execution", - title: "Ran command", - data: { - toolCallId: "toolu_vrtx_01WypXgRM8PPygBtrVAZwzy5", - kind: "execute", - rawInput: {}, - rawOutput: { - exitCode: 0, - stdout: "total 960\napps\npackages\n", - stderr: "", - }, - }, - }, - }), - ]; - - const [entry] = deriveWorkLogEntries(activities); - expect(entry).toMatchObject({ - id: "cursor-command-complete", - label: "Ran command", - itemType: "command_execution", - toolTitle: "Ran command", - }); - expect(entry?.detail).toBeUndefined(); - expect(entry?.command).toBeUndefined(); - }); - it("collapses legacy completed tool rows that are missing tool metadata", () => { const activities: OrchestrationThreadActivity[] = [ makeActivity({ @@ -1929,3 +1894,32 @@ describe("rerun workflows", () => { expect(spawnRows.map((row) => row.turnId)).toEqual(["turn-1", "turn-2"]); }); }); + +describe("PROVIDER_OPTIONS", () => { + it("advertises Codex, Claude, OpenCode, and Cursor as available providers", () => { + const claude = PROVIDER_OPTIONS.find((option) => option.value === "claudeAgent"); + const opencode = PROVIDER_OPTIONS.find((option) => option.value === "opencode"); + const cursor = PROVIDER_OPTIONS.find((option) => option.value === "cursor"); + expect(PROVIDER_OPTIONS).toEqual([ + { value: "codex", label: "Codex", available: true }, + { value: "claudeAgent", label: "Claude", available: true }, + { value: "opencode", label: "OpenCode", available: true }, + { value: "cursor", label: "Cursor", available: true }, + ]); + expect(claude).toEqual({ + value: "claudeAgent", + label: "Claude", + available: true, + }); + expect(opencode).toEqual({ + value: "opencode", + label: "OpenCode", + available: true, + }); + expect(cursor).toEqual({ + value: "cursor", + label: "Cursor", + available: true, + }); + }); +}); diff --git a/apps/web/src/store.ts b/apps/web/src/store.ts new file mode 100644 index 0000000000..a7651d535f --- /dev/null +++ b/apps/web/src/store.ts @@ -0,0 +1,1963 @@ +import type { + EnvironmentId, + MessageId, + ModelSelection, + OrchestrationCheckpointSummary, + OrchestrationEvent, + OrchestrationLatestTurn, + OrchestrationMessage, + OrchestrationProposedPlan, + OrchestrationReadModel, + OrchestrationShellSnapshot, + OrchestrationShellStreamEvent, + OrchestrationSession, + OrchestrationSessionStatus, + OrchestrationThread, + OrchestrationThreadShell, + OrchestrationThreadActivity, + ProjectId, + ScopedProjectRef, + ScopedThreadRef, +} from "@t3tools/contracts"; +import { ProviderKind } from "@t3tools/contracts"; +import type { ThreadId, TurnId } from "@t3tools/contracts"; +import { Schema } from "effect"; +import { resolveModelSlugForProvider } from "@t3tools/shared/model"; +import { create } from "zustand"; +import { + type ChatMessage, + type Project, + type ProposedPlan, + type SidebarThreadSummary, + type Thread, + type ThreadSession, + type ThreadShell, + type ThreadTurnState, + type TurnDiffSummary, +} from "./types"; +import { resolveEnvironmentHttpUrl } from "./environments/runtime"; +import { sanitizeThreadErrorMessage } from "./rpc/transportError"; +import { getThreadFromEnvironmentState } from "./threadDerivation"; + +export interface EnvironmentState { + projectIds: ProjectId[]; + projectById: Record; + + // --------------------------------------------------------------------------- + // Thread bookkeeping — written by BOTH shell stream and detail stream. + // Both streams ensure the thread is registered here; the bookkeeping is + // additive (append-only IDs) so concurrent writes are safe. + // --------------------------------------------------------------------------- + threadIds: ThreadId[]; + threadIdsByProjectId: Record; + + // --------------------------------------------------------------------------- + // Thread shell / session / turn — written by BOTH shell stream and detail + // stream. The shell stream is the *authoritative* source (server pre- + // computes these from the projection pipeline), but the detail stream also + // writes them so the active thread has up-to-date state even if the shell + // event hasn't arrived yet. Structural equality checks in both write + // functions prevent unnecessary React re-renders when both streams deliver + // equivalent data. + // --------------------------------------------------------------------------- + threadShellById: Record; + threadSessionById: Record; + threadTurnStateById: Record; + + // --------------------------------------------------------------------------- + // Thread detail content — written ONLY by the detail stream + // (writeThreadState / syncServerThreadDetail). The shell stream never + // touches these. + // --------------------------------------------------------------------------- + messageIdsByThreadId: Record; + messageByThreadId: Record>; + activityIdsByThreadId: Record; + activityByThreadId: Record>; + proposedPlanIdsByThreadId: Record; + proposedPlanByThreadId: Record>; + turnDiffIdsByThreadId: Record; + turnDiffSummaryByThreadId: Record>; + + // --------------------------------------------------------------------------- + // Sidebar summary — written ONLY by the shell stream + // (writeThreadShellState / mapThreadShell). Pre-computed server-side with + // fields like latestUserMessageAt, hasPendingApprovals, etc. The detail + // stream must NOT write here; the shell stream is the single source of + // truth for sidebar data. + // --------------------------------------------------------------------------- + sidebarThreadSummaryById: Record; + + bootstrapComplete: boolean; +} + +export interface AppState { + activeEnvironmentId: EnvironmentId | null; + environmentStateById: Record; +} + +const initialEnvironmentState: EnvironmentState = { + projectIds: [], + projectById: {}, + threadIds: [], + threadIdsByProjectId: {}, + threadShellById: {}, + threadSessionById: {}, + threadTurnStateById: {}, + messageIdsByThreadId: {}, + messageByThreadId: {}, + activityIdsByThreadId: {}, + activityByThreadId: {}, + proposedPlanIdsByThreadId: {}, + proposedPlanByThreadId: {}, + turnDiffIdsByThreadId: {}, + turnDiffSummaryByThreadId: {}, + sidebarThreadSummaryById: {}, + bootstrapComplete: false, +}; + +const initialState: AppState = { + activeEnvironmentId: null, + environmentStateById: {}, +}; + +const MAX_THREAD_MESSAGES = 2_000; +const MAX_THREAD_CHECKPOINTS = 500; +const MAX_THREAD_PROPOSED_PLANS = 200; +const MAX_THREAD_ACTIVITIES = 500; +const EMPTY_THREAD_IDS: ThreadId[] = []; + +function arraysEqual(left: readonly T[], right: readonly T[]): boolean { + return left.length === right.length && left.every((value, index) => value === right[index]); +} + +function normalizeModelSelection(selection: T): T { + return { + ...selection, + model: resolveModelSlugForProvider(selection.provider, selection.model), + }; +} + +function mapProjectScripts(scripts: ReadonlyArray): Project["scripts"] { + return scripts.map((script) => ({ ...script })); +} + +function mapSession(session: OrchestrationSession): ThreadSession { + return { + provider: toLegacyProvider(session.providerName), + status: toLegacySessionStatus(session.status), + orchestrationStatus: session.status, + activeTurnId: session.activeTurnId ?? undefined, + createdAt: session.updatedAt, + updatedAt: session.updatedAt, + ...(session.lastError ? { lastError: session.lastError } : {}), + }; +} + +function mapMessage(environmentId: EnvironmentId, message: OrchestrationMessage): ChatMessage { + const attachments = message.attachments?.map((attachment) => ({ + type: "image" as const, + id: attachment.id, + name: attachment.name, + mimeType: attachment.mimeType, + sizeBytes: attachment.sizeBytes, + previewUrl: resolveEnvironmentHttpUrl({ + environmentId, + pathname: attachmentPreviewRoutePath(attachment.id), + }), + })); + + return { + id: message.id, + role: message.role, + text: message.text, + turnId: message.turnId, + createdAt: message.createdAt, + streaming: message.streaming, + ...(message.streaming ? {} : { completedAt: message.updatedAt }), + ...(attachments && attachments.length > 0 ? { attachments } : {}), + }; +} + +function mapProposedPlan(proposedPlan: OrchestrationProposedPlan): ProposedPlan { + return { + id: proposedPlan.id, + turnId: proposedPlan.turnId, + planMarkdown: proposedPlan.planMarkdown, + implementedAt: proposedPlan.implementedAt, + implementationThreadId: proposedPlan.implementationThreadId, + createdAt: proposedPlan.createdAt, + updatedAt: proposedPlan.updatedAt, + }; +} + +function mapTurnDiffSummary(checkpoint: OrchestrationCheckpointSummary): TurnDiffSummary { + return { + turnId: checkpoint.turnId, + completedAt: checkpoint.completedAt, + status: checkpoint.status, + assistantMessageId: checkpoint.assistantMessageId ?? undefined, + checkpointTurnCount: checkpoint.checkpointTurnCount, + checkpointRef: checkpoint.checkpointRef, + files: checkpoint.files.map((file) => ({ ...file })), + }; +} + +function mapProject( + project: + | OrchestrationReadModel["projects"][number] + | OrchestrationShellSnapshot["projects"][number], + environmentId: EnvironmentId, +): Project { + return { + id: project.id, + environmentId, + name: project.title, + cwd: project.workspaceRoot, + repositoryIdentity: project.repositoryIdentity ?? null, + defaultModelSelection: project.defaultModelSelection + ? normalizeModelSelection(project.defaultModelSelection) + : null, + createdAt: project.createdAt, + updatedAt: project.updatedAt, + scripts: mapProjectScripts(project.scripts), + }; +} + +function mapThread(thread: OrchestrationThread, environmentId: EnvironmentId): Thread { + return { + id: thread.id, + environmentId, + codexThreadId: null, + projectId: thread.projectId, + title: thread.title, + modelSelection: normalizeModelSelection(thread.modelSelection), + runtimeMode: thread.runtimeMode, + interactionMode: thread.interactionMode, + session: thread.session ? mapSession(thread.session) : null, + messages: thread.messages.map((message) => mapMessage(environmentId, message)), + proposedPlans: thread.proposedPlans.map(mapProposedPlan), + error: sanitizeThreadErrorMessage(thread.session?.lastError), + createdAt: thread.createdAt, + archivedAt: thread.archivedAt, + updatedAt: thread.updatedAt, + latestTurn: thread.latestTurn, + pendingSourceProposedPlan: thread.latestTurn?.sourceProposedPlan, + branch: thread.branch, + worktreePath: thread.worktreePath, + turnDiffSummaries: thread.checkpoints.map(mapTurnDiffSummary), + activities: thread.activities.map((activity) => ({ ...activity })), + }; +} + +function mapThreadShell( + thread: OrchestrationThreadShell, + environmentId: EnvironmentId, +): { + shell: ThreadShell; + session: ThreadSession | null; + turnState: ThreadTurnState; + summary: SidebarThreadSummary; +} { + const shell: ThreadShell = { + id: thread.id, + environmentId, + codexThreadId: null, + projectId: thread.projectId, + title: thread.title, + modelSelection: normalizeModelSelection(thread.modelSelection), + runtimeMode: thread.runtimeMode, + interactionMode: thread.interactionMode, + error: sanitizeThreadErrorMessage(thread.session?.lastError), + createdAt: thread.createdAt, + archivedAt: thread.archivedAt, + updatedAt: thread.updatedAt, + branch: thread.branch, + worktreePath: thread.worktreePath, + }; + const session = thread.session ? mapSession(thread.session) : null; + const turnState: ThreadTurnState = { + latestTurn: thread.latestTurn, + pendingSourceProposedPlan: thread.latestTurn?.sourceProposedPlan, + }; + const summary: SidebarThreadSummary = { + id: thread.id, + environmentId, + projectId: thread.projectId, + title: thread.title, + interactionMode: thread.interactionMode, + session, + createdAt: thread.createdAt, + archivedAt: thread.archivedAt, + updatedAt: thread.updatedAt, + latestTurn: thread.latestTurn, + branch: thread.branch, + worktreePath: thread.worktreePath, + latestUserMessageAt: thread.latestUserMessageAt, + hasPendingApprovals: thread.hasPendingApprovals, + hasPendingUserInput: thread.hasPendingUserInput, + hasActionableProposedPlan: thread.hasActionableProposedPlan, + }; + return { + shell, + session, + turnState, + summary, + }; +} + +function toThreadShell(thread: Thread): ThreadShell { + return { + id: thread.id, + environmentId: thread.environmentId, + codexThreadId: thread.codexThreadId, + projectId: thread.projectId, + title: thread.title, + modelSelection: thread.modelSelection, + runtimeMode: thread.runtimeMode, + interactionMode: thread.interactionMode, + error: thread.error, + createdAt: thread.createdAt, + archivedAt: thread.archivedAt, + updatedAt: thread.updatedAt, + branch: thread.branch, + worktreePath: thread.worktreePath, + }; +} + +function toThreadTurnState(thread: Thread): ThreadTurnState { + return { + latestTurn: thread.latestTurn, + ...(thread.pendingSourceProposedPlan + ? { pendingSourceProposedPlan: thread.pendingSourceProposedPlan } + : {}), + }; +} + +function sourceProposedPlansEqual( + left: OrchestrationLatestTurn["sourceProposedPlan"] | undefined, + right: OrchestrationLatestTurn["sourceProposedPlan"] | undefined, +): boolean { + if (left === right) return true; + if (left === undefined || right === undefined) return false; + return left.threadId === right.threadId && left.planId === right.planId; +} + +function latestTurnsEqual( + left: OrchestrationLatestTurn | null | undefined, + right: OrchestrationLatestTurn | null | undefined, +): boolean { + if (left === right) return true; + if (left == null || right == null) return false; + return ( + left.turnId === right.turnId && + left.state === right.state && + left.requestedAt === right.requestedAt && + left.startedAt === right.startedAt && + left.completedAt === right.completedAt && + left.assistantMessageId === right.assistantMessageId && + sourceProposedPlansEqual(left.sourceProposedPlan, right.sourceProposedPlan) + ); +} + +function threadSessionsEqual( + left: ThreadSession | null | undefined, + right: ThreadSession | null | undefined, +): boolean { + if (left === right) return true; + if (left == null || right == null) return false; + return ( + left.provider === right.provider && + left.status === right.status && + left.orchestrationStatus === right.orchestrationStatus && + left.activeTurnId === right.activeTurnId && + left.createdAt === right.createdAt && + left.updatedAt === right.updatedAt && + left.lastError === right.lastError + ); +} + +function sidebarThreadSummariesEqual( + left: SidebarThreadSummary | undefined, + right: SidebarThreadSummary, +): boolean { + return ( + left !== undefined && + left.id === right.id && + left.projectId === right.projectId && + left.title === right.title && + left.interactionMode === right.interactionMode && + threadSessionsEqual(left.session, right.session) && + left.createdAt === right.createdAt && + left.archivedAt === right.archivedAt && + left.updatedAt === right.updatedAt && + latestTurnsEqual(left.latestTurn, right.latestTurn) && + left.branch === right.branch && + left.worktreePath === right.worktreePath && + left.latestUserMessageAt === right.latestUserMessageAt && + left.hasPendingApprovals === right.hasPendingApprovals && + left.hasPendingUserInput === right.hasPendingUserInput && + left.hasActionableProposedPlan === right.hasActionableProposedPlan + ); +} + +function threadShellsEqual(left: ThreadShell | undefined, right: ThreadShell): boolean { + return ( + left !== undefined && + left.id === right.id && + left.environmentId === right.environmentId && + left.codexThreadId === right.codexThreadId && + left.projectId === right.projectId && + left.title === right.title && + left.modelSelection === right.modelSelection && + left.runtimeMode === right.runtimeMode && + left.interactionMode === right.interactionMode && + left.error === right.error && + left.createdAt === right.createdAt && + left.archivedAt === right.archivedAt && + left.updatedAt === right.updatedAt && + left.branch === right.branch && + left.worktreePath === right.worktreePath + ); +} + +function threadTurnStatesEqual(left: ThreadTurnState | undefined, right: ThreadTurnState): boolean { + return ( + left !== undefined && + latestTurnsEqual(left.latestTurn, right.latestTurn) && + sourceProposedPlansEqual(left.pendingSourceProposedPlan, right.pendingSourceProposedPlan) + ); +} + +function appendId(ids: readonly T[], id: T): T[] { + return ids.includes(id) ? [...ids] : [...ids, id]; +} + +function removeId(ids: readonly T[], id: T): T[] { + return ids.filter((value) => value !== id); +} + +function buildMessageSlice(thread: Thread): { + ids: MessageId[]; + byId: Record; +} { + return { + ids: thread.messages.map((message) => message.id), + byId: Object.fromEntries( + thread.messages.map((message) => [message.id, message] as const), + ) as Record, + }; +} + +function buildActivitySlice(thread: Thread): { + ids: string[]; + byId: Record; +} { + return { + ids: thread.activities.map((activity) => activity.id), + byId: Object.fromEntries( + thread.activities.map((activity) => [activity.id, activity] as const), + ) as Record, + }; +} + +function buildProposedPlanSlice(thread: Thread): { + ids: string[]; + byId: Record; +} { + return { + ids: thread.proposedPlans.map((plan) => plan.id), + byId: Object.fromEntries( + thread.proposedPlans.map((plan) => [plan.id, plan] as const), + ) as Record, + }; +} + +function buildTurnDiffSlice(thread: Thread): { + ids: TurnId[]; + byId: Record; +} { + return { + ids: thread.turnDiffSummaries.map((summary) => summary.turnId), + byId: Object.fromEntries( + thread.turnDiffSummaries.map((summary) => [summary.turnId, summary] as const), + ) as Record, + }; +} + +function getProjects(state: EnvironmentState): Project[] { + return state.projectIds.flatMap((projectId) => { + const project = state.projectById[projectId]; + return project ? [project] : []; + }); +} + +function getThreads(state: EnvironmentState): Thread[] { + return state.threadIds.flatMap((threadId) => { + const thread = getThreadFromEnvironmentState(state, threadId); + return thread ? [thread] : []; + }); +} + +/** + * Ensure a thread is registered in the bookkeeping indices (threadIds, + * threadIdsByProjectId). Shared by both the shell stream and detail stream + * write paths — the bookkeeping is additive (append-only IDs) so concurrent + * writes from both streams are safe. + */ +function ensureThreadRegistered( + state: EnvironmentState, + threadId: ThreadId, + nextProjectId: ProjectId, + previousProjectId: ProjectId | undefined, +): EnvironmentState { + let nextState = state; + + if (!state.threadIds.includes(threadId)) { + nextState = { + ...nextState, + threadIds: [...nextState.threadIds, threadId], + }; + } + + if (previousProjectId !== nextProjectId) { + let threadIdsByProjectId = nextState.threadIdsByProjectId; + if (previousProjectId) { + const previousIds = threadIdsByProjectId[previousProjectId] ?? EMPTY_THREAD_IDS; + const nextIds = removeId(previousIds, threadId); + if (nextIds.length === 0) { + const { [previousProjectId]: _removed, ...rest } = threadIdsByProjectId; + threadIdsByProjectId = rest as Record; + } else if (!arraysEqual(previousIds, nextIds)) { + threadIdsByProjectId = { + ...threadIdsByProjectId, + [previousProjectId]: nextIds, + }; + } + } + const projectThreadIds = threadIdsByProjectId[nextProjectId] ?? EMPTY_THREAD_IDS; + const nextProjectThreadIds = appendId(projectThreadIds, threadId); + if (!arraysEqual(projectThreadIds, nextProjectThreadIds)) { + threadIdsByProjectId = { + ...threadIdsByProjectId, + [nextProjectId]: nextProjectThreadIds, + }; + } + if (threadIdsByProjectId !== nextState.threadIdsByProjectId) { + nextState = { + ...nextState, + threadIdsByProjectId, + }; + } + } + + return nextState; +} + +/** + * Write thread state from the **detail stream** (per-thread subscription). + * + * Owns: messages, activities, proposed plans, turn diff summaries. + * Also writes threadShellById / threadSessionById / threadTurnStateById so + * the active thread has up-to-date state even if the shell stream event + * hasn't arrived yet (both streams use structural equality checks to avoid + * unnecessary re-renders when delivering equivalent data). + * Does NOT write sidebarThreadSummaryById — that is shell-stream-only. + */ +function writeThreadState( + state: EnvironmentState, + nextThread: Thread, + previousThread?: Thread, +): EnvironmentState { + const nextShell = toThreadShell(nextThread); + const nextTurnState = toThreadTurnState(nextThread); + const previousShell = state.threadShellById[nextThread.id]; + const previousTurnState = state.threadTurnStateById[nextThread.id]; + + let nextState = ensureThreadRegistered( + state, + nextThread.id, + nextThread.projectId, + previousThread?.projectId, + ); + + if (!threadShellsEqual(previousShell, nextShell)) { + nextState = { + ...nextState, + threadShellById: { + ...nextState.threadShellById, + [nextThread.id]: nextShell, + }, + }; + } + + if (!threadSessionsEqual(previousThread?.session ?? null, nextThread.session)) { + nextState = { + ...nextState, + threadSessionById: { + ...nextState.threadSessionById, + [nextThread.id]: nextThread.session, + }, + }; + } + + if (!threadTurnStatesEqual(previousTurnState, nextTurnState)) { + nextState = { + ...nextState, + threadTurnStateById: { + ...nextState.threadTurnStateById, + [nextThread.id]: nextTurnState, + }, + }; + } + + if (previousThread?.messages !== nextThread.messages) { + const nextMessageSlice = buildMessageSlice(nextThread); + nextState = { + ...nextState, + messageIdsByThreadId: { + ...nextState.messageIdsByThreadId, + [nextThread.id]: nextMessageSlice.ids, + }, + messageByThreadId: { + ...nextState.messageByThreadId, + [nextThread.id]: nextMessageSlice.byId, + }, + }; + } + + if (previousThread?.activities !== nextThread.activities) { + const nextActivitySlice = buildActivitySlice(nextThread); + nextState = { + ...nextState, + activityIdsByThreadId: { + ...nextState.activityIdsByThreadId, + [nextThread.id]: nextActivitySlice.ids, + }, + activityByThreadId: { + ...nextState.activityByThreadId, + [nextThread.id]: nextActivitySlice.byId, + }, + }; + } + + if (previousThread?.proposedPlans !== nextThread.proposedPlans) { + const nextProposedPlanSlice = buildProposedPlanSlice(nextThread); + nextState = { + ...nextState, + proposedPlanIdsByThreadId: { + ...nextState.proposedPlanIdsByThreadId, + [nextThread.id]: nextProposedPlanSlice.ids, + }, + proposedPlanByThreadId: { + ...nextState.proposedPlanByThreadId, + [nextThread.id]: nextProposedPlanSlice.byId, + }, + }; + } + + if (previousThread?.turnDiffSummaries !== nextThread.turnDiffSummaries) { + const nextTurnDiffSlice = buildTurnDiffSlice(nextThread); + nextState = { + ...nextState, + turnDiffIdsByThreadId: { + ...nextState.turnDiffIdsByThreadId, + [nextThread.id]: nextTurnDiffSlice.ids, + }, + turnDiffSummaryByThreadId: { + ...nextState.turnDiffSummaryByThreadId, + [nextThread.id]: nextTurnDiffSlice.byId, + }, + }; + } + + return nextState; +} + +/** + * Write thread state from the **shell stream** (all-threads subscription). + * + * Owns: sidebarThreadSummaryById (pre-computed server-side sidebar data). + * Also writes threadShellById / threadSessionById / threadTurnStateById as + * the authoritative source for these fields. The detail stream may also + * write them for the focused thread (see writeThreadState); structural + * equality checks prevent unnecessary re-renders. + * Does NOT write message/activity/proposedPlan/turnDiff content — that is + * detail-stream-only. + */ +function writeThreadShellState( + state: EnvironmentState, + nextThread: { + shell: ThreadShell; + session: ThreadSession | null; + turnState: ThreadTurnState; + summary: SidebarThreadSummary; + }, +): EnvironmentState { + const previousShell = state.threadShellById[nextThread.shell.id]; + + let nextState = ensureThreadRegistered( + state, + nextThread.shell.id, + nextThread.shell.projectId, + previousShell?.projectId, + ); + + if (!threadShellsEqual(previousShell, nextThread.shell)) { + nextState = { + ...nextState, + threadShellById: { + ...nextState.threadShellById, + [nextThread.shell.id]: nextThread.shell, + }, + }; + } + + if ( + !threadSessionsEqual(state.threadSessionById[nextThread.shell.id] ?? null, nextThread.session) + ) { + nextState = { + ...nextState, + threadSessionById: { + ...nextState.threadSessionById, + [nextThread.shell.id]: nextThread.session, + }, + }; + } + + if ( + !threadTurnStatesEqual(state.threadTurnStateById[nextThread.shell.id], nextThread.turnState) + ) { + nextState = { + ...nextState, + threadTurnStateById: { + ...nextState.threadTurnStateById, + [nextThread.shell.id]: nextThread.turnState, + }, + }; + } + + if ( + !sidebarThreadSummariesEqual( + state.sidebarThreadSummaryById[nextThread.shell.id], + nextThread.summary, + ) + ) { + nextState = { + ...nextState, + sidebarThreadSummaryById: { + ...nextState.sidebarThreadSummaryById, + [nextThread.shell.id]: nextThread.summary, + }, + }; + } + + return nextState; +} + +function retainThreadScopedRecord( + record: Record, + nextThreadIds: ReadonlySet, +): Record { + return Object.fromEntries( + Object.entries(record).flatMap(([threadId, value]) => + nextThreadIds.has(threadId as ThreadId) ? [[threadId, value] as const] : [], + ), + ) as Record; +} + +function removeThreadState(state: EnvironmentState, threadId: ThreadId): EnvironmentState { + const shell = state.threadShellById[threadId]; + if (!shell) { + return state; + } + + const nextThreadIds = removeId(state.threadIds, threadId); + const currentProjectThreadIds = state.threadIdsByProjectId[shell.projectId] ?? EMPTY_THREAD_IDS; + const nextProjectThreadIds = removeId(currentProjectThreadIds, threadId); + const nextThreadIdsByProjectId = + nextProjectThreadIds.length === 0 + ? (() => { + const { [shell.projectId]: _removed, ...rest } = state.threadIdsByProjectId; + return rest as Record; + })() + : { + ...state.threadIdsByProjectId, + [shell.projectId]: nextProjectThreadIds, + }; + + const { [threadId]: _removedShell, ...threadShellById } = state.threadShellById; + const { [threadId]: _removedSession, ...threadSessionById } = state.threadSessionById; + const { [threadId]: _removedTurnState, ...threadTurnStateById } = state.threadTurnStateById; + const { [threadId]: _removedMessageIds, ...messageIdsByThreadId } = state.messageIdsByThreadId; + const { [threadId]: _removedMessages, ...messageByThreadId } = state.messageByThreadId; + const { [threadId]: _removedActivityIds, ...activityIdsByThreadId } = state.activityIdsByThreadId; + const { [threadId]: _removedActivities, ...activityByThreadId } = state.activityByThreadId; + const { [threadId]: _removedPlanIds, ...proposedPlanIdsByThreadId } = + state.proposedPlanIdsByThreadId; + const { [threadId]: _removedPlans, ...proposedPlanByThreadId } = state.proposedPlanByThreadId; + const { [threadId]: _removedTurnDiffIds, ...turnDiffIdsByThreadId } = state.turnDiffIdsByThreadId; + const { [threadId]: _removedTurnDiffs, ...turnDiffSummaryByThreadId } = + state.turnDiffSummaryByThreadId; + const { [threadId]: _removedSidebarSummary, ...sidebarThreadSummaryById } = + state.sidebarThreadSummaryById; + + return { + ...state, + threadIds: nextThreadIds, + threadIdsByProjectId: nextThreadIdsByProjectId, + threadShellById, + threadSessionById, + threadTurnStateById, + messageIdsByThreadId, + messageByThreadId, + activityIdsByThreadId, + activityByThreadId, + proposedPlanIdsByThreadId, + proposedPlanByThreadId, + turnDiffIdsByThreadId, + turnDiffSummaryByThreadId, + sidebarThreadSummaryById, + }; +} + +function checkpointStatusToLatestTurnState(status: "ready" | "missing" | "error") { + if (status === "error") { + return "error" as const; + } + if (status === "missing") { + return "interrupted" as const; + } + return "completed" as const; +} + +function compareActivities( + left: Thread["activities"][number], + right: Thread["activities"][number], +): number { + if (left.sequence !== undefined && right.sequence !== undefined) { + if (left.sequence !== right.sequence) { + return left.sequence - right.sequence; + } + } else if (left.sequence !== undefined) { + return 1; + } else if (right.sequence !== undefined) { + return -1; + } + + return left.createdAt.localeCompare(right.createdAt) || left.id.localeCompare(right.id); +} + +function buildLatestTurn(params: { + previous: Thread["latestTurn"]; + turnId: NonNullable["turnId"]; + state: NonNullable["state"]; + requestedAt: string; + startedAt: string | null; + completedAt: string | null; + assistantMessageId: NonNullable["assistantMessageId"]; + sourceProposedPlan?: Thread["pendingSourceProposedPlan"]; +}): NonNullable { + const resolvedPlan = + params.previous?.turnId === params.turnId + ? params.previous.sourceProposedPlan + : params.sourceProposedPlan; + return { + turnId: params.turnId, + state: params.state, + requestedAt: params.requestedAt, + startedAt: params.startedAt, + completedAt: params.completedAt, + assistantMessageId: params.assistantMessageId, + ...(resolvedPlan ? { sourceProposedPlan: resolvedPlan } : {}), + }; +} + +function rebindTurnDiffSummariesForAssistantMessage( + turnDiffSummaries: ReadonlyArray, + turnId: TurnId, + assistantMessageId: NonNullable["assistantMessageId"], +): TurnDiffSummary[] { + let changed = false; + const nextSummaries = turnDiffSummaries.map((summary) => { + if (summary.turnId !== turnId || summary.assistantMessageId === assistantMessageId) { + return summary; + } + changed = true; + return { + ...summary, + assistantMessageId: assistantMessageId ?? undefined, + }; + }); + return changed ? nextSummaries : [...turnDiffSummaries]; +} + +function retainThreadMessagesAfterRevert( + messages: ReadonlyArray, + retainedTurnIds: ReadonlySet, + turnCount: number, +): ChatMessage[] { + const retainedMessageIds = new Set(); + for (const message of messages) { + if (message.role === "system") { + retainedMessageIds.add(message.id); + continue; + } + if ( + message.turnId !== undefined && + message.turnId !== null && + retainedTurnIds.has(message.turnId) + ) { + retainedMessageIds.add(message.id); + } + } + + const retainedUserCount = messages.filter( + (message) => message.role === "user" && retainedMessageIds.has(message.id), + ).length; + const missingUserCount = Math.max(0, turnCount - retainedUserCount); + if (missingUserCount > 0) { + const fallbackUserMessages = messages + .filter( + (message) => + message.role === "user" && + !retainedMessageIds.has(message.id) && + (message.turnId === undefined || + message.turnId === null || + retainedTurnIds.has(message.turnId)), + ) + .toSorted( + (left, right) => + left.createdAt.localeCompare(right.createdAt) || left.id.localeCompare(right.id), + ) + .slice(0, missingUserCount); + for (const message of fallbackUserMessages) { + retainedMessageIds.add(message.id); + } + } + + const retainedAssistantCount = messages.filter( + (message) => message.role === "assistant" && retainedMessageIds.has(message.id), + ).length; + const missingAssistantCount = Math.max(0, turnCount - retainedAssistantCount); + if (missingAssistantCount > 0) { + const fallbackAssistantMessages = messages + .filter( + (message) => + message.role === "assistant" && + !retainedMessageIds.has(message.id) && + (message.turnId === undefined || + message.turnId === null || + retainedTurnIds.has(message.turnId)), + ) + .toSorted( + (left, right) => + left.createdAt.localeCompare(right.createdAt) || left.id.localeCompare(right.id), + ) + .slice(0, missingAssistantCount); + for (const message of fallbackAssistantMessages) { + retainedMessageIds.add(message.id); + } + } + + return messages.filter((message) => retainedMessageIds.has(message.id)); +} + +function retainThreadActivitiesAfterRevert( + activities: ReadonlyArray, + retainedTurnIds: ReadonlySet, +): OrchestrationThreadActivity[] { + return activities.filter( + (activity) => activity.turnId === null || retainedTurnIds.has(activity.turnId), + ); +} + +function retainThreadProposedPlansAfterRevert( + proposedPlans: ReadonlyArray, + retainedTurnIds: ReadonlySet, +): ProposedPlan[] { + return proposedPlans.filter( + (proposedPlan) => proposedPlan.turnId === null || retainedTurnIds.has(proposedPlan.turnId), + ); +} + +function toLegacySessionStatus( + status: OrchestrationSessionStatus, +): "connecting" | "ready" | "running" | "error" | "closed" { + switch (status) { + case "starting": + return "connecting"; + case "running": + return "running"; + case "error": + return "error"; + case "ready": + case "interrupted": + return "ready"; + case "idle": + case "stopped": + return "closed"; + } +} + +function toLegacyProvider(providerName: string | null): ProviderKind { + if (Schema.is(ProviderKind)(providerName)) { + return providerName; + } + return "codex"; +} + +function attachmentPreviewRoutePath(attachmentId: string): string { + return `/attachments/${encodeURIComponent(attachmentId)}`; +} + +function updateThreadState( + state: EnvironmentState, + threadId: ThreadId, + updater: (thread: Thread) => Thread, +): EnvironmentState { + const currentThread = getThreadFromEnvironmentState(state, threadId); + if (!currentThread) { + return state; + } + const nextThread = updater(currentThread); + if (nextThread === currentThread) { + return state; + } + return writeThreadState(state, nextThread, currentThread); +} + +function buildProjectState( + projects: ReadonlyArray, +): Pick { + return { + projectIds: projects.map((project) => project.id), + projectById: Object.fromEntries( + projects.map((project) => [project.id, project] as const), + ) as Record, + }; +} + +function getStoredEnvironmentState( + state: AppState, + environmentId: EnvironmentId, +): EnvironmentState { + return state.environmentStateById[environmentId] ?? initialEnvironmentState; +} + +function commitEnvironmentState( + state: AppState, + environmentId: EnvironmentId, + nextEnvironmentState: EnvironmentState, +): AppState { + const currentEnvironmentState = state.environmentStateById[environmentId]; + const environmentStateById = + currentEnvironmentState === nextEnvironmentState + ? state.environmentStateById + : { + ...state.environmentStateById, + [environmentId]: nextEnvironmentState, + }; + + if (environmentStateById === state.environmentStateById) { + return state; + } + + return { + ...state, + environmentStateById, + }; +} + +function syncEnvironmentShellSnapshot( + state: EnvironmentState, + snapshot: OrchestrationShellSnapshot, + environmentId: EnvironmentId, +): EnvironmentState { + const nextProjects = snapshot.projects.map((project) => mapProject(project, environmentId)); + const nextThreadIds = new Set(snapshot.threads.map((thread) => thread.id)); + let nextState: EnvironmentState = { + ...state, + ...buildProjectState(nextProjects), + threadIds: [], + threadIdsByProjectId: {}, + threadShellById: {}, + threadSessionById: {}, + threadTurnStateById: {}, + sidebarThreadSummaryById: {}, + messageIdsByThreadId: retainThreadScopedRecord(state.messageIdsByThreadId, nextThreadIds), + messageByThreadId: retainThreadScopedRecord(state.messageByThreadId, nextThreadIds), + activityIdsByThreadId: retainThreadScopedRecord(state.activityIdsByThreadId, nextThreadIds), + activityByThreadId: retainThreadScopedRecord(state.activityByThreadId, nextThreadIds), + proposedPlanIdsByThreadId: retainThreadScopedRecord( + state.proposedPlanIdsByThreadId, + nextThreadIds, + ), + proposedPlanByThreadId: retainThreadScopedRecord(state.proposedPlanByThreadId, nextThreadIds), + turnDiffIdsByThreadId: retainThreadScopedRecord(state.turnDiffIdsByThreadId, nextThreadIds), + turnDiffSummaryByThreadId: retainThreadScopedRecord( + state.turnDiffSummaryByThreadId, + nextThreadIds, + ), + bootstrapComplete: true, + }; + + for (const thread of snapshot.threads) { + nextState = writeThreadShellState(nextState, mapThreadShell(thread, environmentId)); + } + + return nextState; +} + +export function syncServerShellSnapshot( + state: AppState, + snapshot: OrchestrationShellSnapshot, + environmentId: EnvironmentId, +): AppState { + return commitEnvironmentState( + state, + environmentId, + syncEnvironmentShellSnapshot( + getStoredEnvironmentState(state, environmentId), + snapshot, + environmentId, + ), + ); +} + +export function syncServerThreadDetail( + state: AppState, + thread: OrchestrationThread, + environmentId: EnvironmentId, +): AppState { + const environmentState = getStoredEnvironmentState(state, environmentId); + const previousThread = getThreadFromEnvironmentState(environmentState, thread.id); + return commitEnvironmentState( + state, + environmentId, + writeThreadState(environmentState, mapThread(thread, environmentId), previousThread), + ); +} + +function applyEnvironmentOrchestrationEvent( + state: EnvironmentState, + event: OrchestrationEvent, + environmentId: EnvironmentId, +): EnvironmentState { + switch (event.type) { + case "project.created": { + const nextProject = mapProject( + { + id: event.payload.projectId, + title: event.payload.title, + workspaceRoot: event.payload.workspaceRoot, + repositoryIdentity: event.payload.repositoryIdentity ?? null, + defaultModelSelection: event.payload.defaultModelSelection, + scripts: event.payload.scripts, + createdAt: event.payload.createdAt, + updatedAt: event.payload.updatedAt, + deletedAt: null, + }, + environmentId, + ); + const existingProjectId = + state.projectIds.find( + (projectId) => + projectId === event.payload.projectId || + state.projectById[projectId]?.cwd === event.payload.workspaceRoot, + ) ?? null; + let projectById = state.projectById; + let projectIds = state.projectIds; + + if (existingProjectId !== null && existingProjectId !== nextProject.id) { + const { [existingProjectId]: _removedProject, ...restProjectById } = state.projectById; + projectById = { + ...restProjectById, + [nextProject.id]: nextProject, + }; + projectIds = state.projectIds.map((projectId) => + projectId === existingProjectId ? nextProject.id : projectId, + ); + } else { + projectById = { + ...state.projectById, + [nextProject.id]: nextProject, + }; + projectIds = + existingProjectId === null && !state.projectIds.includes(nextProject.id) + ? [...state.projectIds, nextProject.id] + : state.projectIds; + } + + return { + ...state, + projectById, + projectIds, + }; + } + + case "project.meta-updated": { + const project = state.projectById[event.payload.projectId]; + if (!project) { + return state; + } + const nextProject: Project = { + ...project, + ...(event.payload.title !== undefined ? { name: event.payload.title } : {}), + ...(event.payload.workspaceRoot !== undefined ? { cwd: event.payload.workspaceRoot } : {}), + ...(event.payload.repositoryIdentity !== undefined + ? { repositoryIdentity: event.payload.repositoryIdentity ?? null } + : {}), + ...(event.payload.defaultModelSelection !== undefined + ? { + defaultModelSelection: event.payload.defaultModelSelection + ? normalizeModelSelection(event.payload.defaultModelSelection) + : null, + } + : {}), + ...(event.payload.scripts !== undefined + ? { scripts: mapProjectScripts(event.payload.scripts) } + : {}), + updatedAt: event.payload.updatedAt, + }; + return { + ...state, + projectById: { + ...state.projectById, + [event.payload.projectId]: nextProject, + }, + }; + } + + case "project.deleted": { + if (!state.projectById[event.payload.projectId]) { + return state; + } + const { [event.payload.projectId]: _removedProject, ...projectById } = state.projectById; + return { + ...state, + projectById, + projectIds: removeId(state.projectIds, event.payload.projectId), + }; + } + + case "thread.created": { + const previousThread = getThreadFromEnvironmentState(state, event.payload.threadId); + const nextThread = mapThread( + { + id: event.payload.threadId, + projectId: event.payload.projectId, + title: event.payload.title, + modelSelection: event.payload.modelSelection, + runtimeMode: event.payload.runtimeMode, + interactionMode: event.payload.interactionMode, + branch: event.payload.branch, + worktreePath: event.payload.worktreePath, + latestTurn: null, + createdAt: event.payload.createdAt, + updatedAt: event.payload.updatedAt, + archivedAt: null, + deletedAt: null, + messages: [], + proposedPlans: [], + activities: [], + checkpoints: [], + session: null, + }, + environmentId, + ); + return writeThreadState(state, nextThread, previousThread); + } + + case "thread.deleted": + return removeThreadState(state, event.payload.threadId); + + case "thread.archived": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + archivedAt: event.payload.archivedAt, + updatedAt: event.payload.updatedAt, + })); + + case "thread.unarchived": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + archivedAt: null, + updatedAt: event.payload.updatedAt, + })); + + case "thread.meta-updated": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + ...(event.payload.title !== undefined ? { title: event.payload.title } : {}), + ...(event.payload.modelSelection !== undefined + ? { modelSelection: normalizeModelSelection(event.payload.modelSelection) } + : {}), + ...(event.payload.branch !== undefined ? { branch: event.payload.branch } : {}), + ...(event.payload.worktreePath !== undefined + ? { worktreePath: event.payload.worktreePath } + : {}), + updatedAt: event.payload.updatedAt, + })); + + case "thread.runtime-mode-set": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + runtimeMode: event.payload.runtimeMode, + updatedAt: event.payload.updatedAt, + })); + + case "thread.interaction-mode-set": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + interactionMode: event.payload.interactionMode, + updatedAt: event.payload.updatedAt, + })); + + case "thread.turn-start-requested": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + ...(event.payload.modelSelection !== undefined + ? { modelSelection: normalizeModelSelection(event.payload.modelSelection) } + : {}), + runtimeMode: event.payload.runtimeMode, + interactionMode: event.payload.interactionMode, + pendingSourceProposedPlan: event.payload.sourceProposedPlan, + updatedAt: event.occurredAt, + })); + + case "thread.turn-interrupt-requested": { + if (event.payload.turnId === undefined) { + return state; + } + return updateThreadState(state, event.payload.threadId, (thread) => { + const latestTurn = thread.latestTurn; + if (latestTurn === null || latestTurn.turnId !== event.payload.turnId) { + return thread; + } + return { + ...thread, + latestTurn: buildLatestTurn({ + previous: latestTurn, + turnId: event.payload.turnId, + state: "interrupted", + requestedAt: latestTurn.requestedAt, + startedAt: latestTurn.startedAt ?? event.payload.createdAt, + completedAt: latestTurn.completedAt ?? event.payload.createdAt, + assistantMessageId: latestTurn.assistantMessageId, + }), + updatedAt: event.occurredAt, + }; + }); + } + + case "thread.message-sent": + return updateThreadState(state, event.payload.threadId, (thread) => { + const message = mapMessage(thread.environmentId, { + id: event.payload.messageId, + role: event.payload.role, + text: event.payload.text, + ...(event.payload.attachments !== undefined + ? { attachments: event.payload.attachments } + : {}), + turnId: event.payload.turnId, + streaming: event.payload.streaming, + createdAt: event.payload.createdAt, + updatedAt: event.payload.updatedAt, + }); + const existingMessage = thread.messages.find((entry) => entry.id === message.id); + const messages = existingMessage + ? thread.messages.map((entry) => + entry.id !== message.id + ? entry + : { + ...entry, + text: message.streaming + ? `${entry.text}${message.text}` + : message.text.length > 0 + ? message.text + : entry.text, + streaming: message.streaming, + ...(message.turnId !== undefined ? { turnId: message.turnId } : {}), + ...(message.streaming + ? entry.completedAt !== undefined + ? { completedAt: entry.completedAt } + : {} + : message.completedAt !== undefined + ? { completedAt: message.completedAt } + : {}), + ...(message.attachments !== undefined + ? { attachments: message.attachments } + : {}), + }, + ) + : [...thread.messages, message]; + const cappedMessages = messages.slice(-MAX_THREAD_MESSAGES); + const turnDiffSummaries = + event.payload.role === "assistant" && event.payload.turnId !== null + ? rebindTurnDiffSummariesForAssistantMessage( + thread.turnDiffSummaries, + event.payload.turnId, + event.payload.messageId, + ) + : thread.turnDiffSummaries; + const latestTurn: Thread["latestTurn"] = + event.payload.role === "assistant" && + event.payload.turnId !== null && + (thread.latestTurn === null || thread.latestTurn.turnId === event.payload.turnId) + ? buildLatestTurn({ + previous: thread.latestTurn, + turnId: event.payload.turnId, + state: event.payload.streaming + ? "running" + : thread.latestTurn?.state === "interrupted" + ? "interrupted" + : thread.latestTurn?.state === "error" + ? "error" + : "completed", + requestedAt: + thread.latestTurn?.turnId === event.payload.turnId + ? thread.latestTurn.requestedAt + : event.payload.createdAt, + startedAt: + thread.latestTurn?.turnId === event.payload.turnId + ? (thread.latestTurn.startedAt ?? event.payload.createdAt) + : event.payload.createdAt, + sourceProposedPlan: thread.pendingSourceProposedPlan, + completedAt: event.payload.streaming + ? thread.latestTurn?.turnId === event.payload.turnId + ? (thread.latestTurn.completedAt ?? null) + : null + : event.payload.updatedAt, + assistantMessageId: event.payload.messageId, + }) + : thread.latestTurn; + return { + ...thread, + messages: cappedMessages, + turnDiffSummaries, + latestTurn, + updatedAt: event.occurredAt, + }; + }); + + case "thread.session-set": + return updateThreadState(state, event.payload.threadId, (thread) => ({ + ...thread, + session: mapSession(event.payload.session), + error: sanitizeThreadErrorMessage(event.payload.session.lastError), + latestTurn: + event.payload.session.status === "running" && event.payload.session.activeTurnId !== null + ? buildLatestTurn({ + previous: thread.latestTurn, + turnId: event.payload.session.activeTurnId, + state: "running", + requestedAt: + thread.latestTurn?.turnId === event.payload.session.activeTurnId + ? thread.latestTurn.requestedAt + : event.payload.session.updatedAt, + startedAt: + thread.latestTurn?.turnId === event.payload.session.activeTurnId + ? (thread.latestTurn.startedAt ?? event.payload.session.updatedAt) + : event.payload.session.updatedAt, + completedAt: null, + assistantMessageId: + thread.latestTurn?.turnId === event.payload.session.activeTurnId + ? thread.latestTurn.assistantMessageId + : null, + sourceProposedPlan: thread.pendingSourceProposedPlan, + }) + : thread.latestTurn, + updatedAt: event.occurredAt, + })); + + case "thread.session-stop-requested": + return updateThreadState(state, event.payload.threadId, (thread) => + thread.session === null + ? thread + : { + ...thread, + session: { + ...thread.session, + status: "closed", + orchestrationStatus: "stopped", + activeTurnId: undefined, + updatedAt: event.payload.createdAt, + }, + updatedAt: event.occurredAt, + }, + ); + + case "thread.proposed-plan-upserted": + return updateThreadState(state, event.payload.threadId, (thread) => { + const proposedPlan = mapProposedPlan(event.payload.proposedPlan); + const proposedPlans = [ + ...thread.proposedPlans.filter((entry) => entry.id !== proposedPlan.id), + proposedPlan, + ] + .toSorted( + (left, right) => + left.createdAt.localeCompare(right.createdAt) || left.id.localeCompare(right.id), + ) + .slice(-MAX_THREAD_PROPOSED_PLANS); + return { + ...thread, + proposedPlans, + updatedAt: event.occurredAt, + }; + }); + + case "thread.turn-diff-completed": + return updateThreadState(state, event.payload.threadId, (thread) => { + const checkpoint = mapTurnDiffSummary({ + turnId: event.payload.turnId, + checkpointTurnCount: event.payload.checkpointTurnCount, + checkpointRef: event.payload.checkpointRef, + status: event.payload.status, + files: event.payload.files, + assistantMessageId: event.payload.assistantMessageId, + completedAt: event.payload.completedAt, + }); + const existing = thread.turnDiffSummaries.find( + (entry) => entry.turnId === checkpoint.turnId, + ); + if (existing && existing.status !== "missing" && checkpoint.status === "missing") { + return thread; + } + const turnDiffSummaries = [ + ...thread.turnDiffSummaries.filter((entry) => entry.turnId !== checkpoint.turnId), + checkpoint, + ] + .toSorted( + (left, right) => + (left.checkpointTurnCount ?? Number.MAX_SAFE_INTEGER) - + (right.checkpointTurnCount ?? Number.MAX_SAFE_INTEGER), + ) + .slice(-MAX_THREAD_CHECKPOINTS); + const latestTurn = + thread.latestTurn === null || thread.latestTurn.turnId === event.payload.turnId + ? buildLatestTurn({ + previous: thread.latestTurn, + turnId: event.payload.turnId, + state: checkpointStatusToLatestTurnState(event.payload.status), + requestedAt: thread.latestTurn?.requestedAt ?? event.payload.completedAt, + startedAt: thread.latestTurn?.startedAt ?? event.payload.completedAt, + completedAt: event.payload.completedAt, + assistantMessageId: event.payload.assistantMessageId, + sourceProposedPlan: thread.pendingSourceProposedPlan, + }) + : thread.latestTurn; + return { + ...thread, + turnDiffSummaries, + latestTurn, + updatedAt: event.occurredAt, + }; + }); + + case "thread.reverted": + return updateThreadState(state, event.payload.threadId, (thread) => { + const turnDiffSummaries = thread.turnDiffSummaries + .filter( + (entry) => + entry.checkpointTurnCount !== undefined && + entry.checkpointTurnCount <= event.payload.turnCount, + ) + .toSorted( + (left, right) => + (left.checkpointTurnCount ?? Number.MAX_SAFE_INTEGER) - + (right.checkpointTurnCount ?? Number.MAX_SAFE_INTEGER), + ) + .slice(-MAX_THREAD_CHECKPOINTS); + const retainedTurnIds = new Set(turnDiffSummaries.map((entry) => entry.turnId)); + const messages = retainThreadMessagesAfterRevert( + thread.messages, + retainedTurnIds, + event.payload.turnCount, + ).slice(-MAX_THREAD_MESSAGES); + const proposedPlans = retainThreadProposedPlansAfterRevert( + thread.proposedPlans, + retainedTurnIds, + ).slice(-MAX_THREAD_PROPOSED_PLANS); + const activities = retainThreadActivitiesAfterRevert(thread.activities, retainedTurnIds); + const latestCheckpoint = turnDiffSummaries.at(-1) ?? null; + + return { + ...thread, + turnDiffSummaries, + messages, + proposedPlans, + activities, + pendingSourceProposedPlan: undefined, + latestTurn: + latestCheckpoint === null + ? null + : { + turnId: latestCheckpoint.turnId, + state: checkpointStatusToLatestTurnState( + (latestCheckpoint.status ?? "ready") as "ready" | "missing" | "error", + ), + requestedAt: latestCheckpoint.completedAt, + startedAt: latestCheckpoint.completedAt, + completedAt: latestCheckpoint.completedAt, + assistantMessageId: latestCheckpoint.assistantMessageId ?? null, + }, + updatedAt: event.occurredAt, + }; + }); + + case "thread.activity-appended": + return updateThreadState(state, event.payload.threadId, (thread) => { + const activities = [ + ...thread.activities.filter((activity) => activity.id !== event.payload.activity.id), + { ...event.payload.activity }, + ] + .toSorted(compareActivities) + .slice(-MAX_THREAD_ACTIVITIES); + return { + ...thread, + activities, + updatedAt: event.occurredAt, + }; + }); + + case "thread.approval-response-requested": + case "thread.user-input-response-requested": + return state; + } + + return state; +} + +function applyEnvironmentShellEvent( + state: EnvironmentState, + event: OrchestrationShellStreamEvent, + environmentId: EnvironmentId, +): EnvironmentState { + switch (event.kind) { + case "project-upserted": { + const nextProject = mapProject(event.project, environmentId); + const existingProjectId = + state.projectIds.find( + (projectId) => + projectId === event.project.id || + state.projectById[projectId]?.cwd === event.project.workspaceRoot, + ) ?? null; + let projectById = state.projectById; + let projectIds = state.projectIds; + + if (existingProjectId !== null && existingProjectId !== nextProject.id) { + const { [existingProjectId]: _removedProject, ...restProjectById } = state.projectById; + projectById = { + ...restProjectById, + [nextProject.id]: nextProject, + }; + projectIds = state.projectIds.map((projectId) => + projectId === existingProjectId ? nextProject.id : projectId, + ); + } else { + projectById = { + ...state.projectById, + [nextProject.id]: nextProject, + }; + projectIds = + existingProjectId === null && !state.projectIds.includes(nextProject.id) + ? [...state.projectIds, nextProject.id] + : state.projectIds; + } + + return { + ...state, + projectById, + projectIds, + }; + } + case "project-removed": { + if (!state.projectById[event.projectId]) { + return state; + } + const { [event.projectId]: _removedProject, ...projectById } = state.projectById; + return { + ...state, + projectById, + projectIds: removeId(state.projectIds, event.projectId), + }; + } + case "thread-upserted": + return writeThreadShellState(state, mapThreadShell(event.thread, environmentId)); + case "thread-removed": + return removeThreadState(state, event.threadId); + } +} + +export function applyOrchestrationEvents( + state: AppState, + events: ReadonlyArray, + environmentId: EnvironmentId, +): AppState { + if (events.length === 0) { + return state; + } + const currentEnvironmentState = getStoredEnvironmentState(state, environmentId); + const nextEnvironmentState = events.reduce( + (nextState, event) => applyEnvironmentOrchestrationEvent(nextState, event, environmentId), + currentEnvironmentState, + ); + return commitEnvironmentState(state, environmentId, nextEnvironmentState); +} + +function getEnvironmentEntries( + state: AppState, +): ReadonlyArray { + return Object.entries(state.environmentStateById) as unknown as ReadonlyArray< + readonly [EnvironmentId, EnvironmentState] + >; +} + +export function selectEnvironmentState( + state: AppState, + environmentId: EnvironmentId | null | undefined, +): EnvironmentState { + return environmentId ? getStoredEnvironmentState(state, environmentId) : initialEnvironmentState; +} + +export function selectProjectsForEnvironment( + state: AppState, + environmentId: EnvironmentId | null | undefined, +): Project[] { + return getProjects(selectEnvironmentState(state, environmentId)); +} + +export function selectThreadsForEnvironment( + state: AppState, + environmentId: EnvironmentId | null | undefined, +): Thread[] { + return getThreads(selectEnvironmentState(state, environmentId)); +} + +export function selectProjectsAcrossEnvironments(state: AppState): Project[] { + return getEnvironmentEntries(state).flatMap(([, environmentState]) => + getProjects(environmentState), + ); +} + +export function selectThreadsAcrossEnvironments(state: AppState): Thread[] { + return getEnvironmentEntries(state).flatMap(([, environmentState]) => + getThreads(environmentState), + ); +} + +/** Like `selectThreadsAcrossEnvironments` but returns stable `ThreadShell` references from the store (no derived data). */ +export function selectThreadShellsAcrossEnvironments(state: AppState): ThreadShell[] { + return getEnvironmentEntries(state).flatMap(([, environmentState]) => + environmentState.threadIds.flatMap((threadId) => { + const shell = environmentState.threadShellById[threadId]; + return shell ? [shell] : []; + }), + ); +} + +export function selectSidebarThreadsAcrossEnvironments(state: AppState): SidebarThreadSummary[] { + return getEnvironmentEntries(state).flatMap(([environmentId, environmentState]) => + environmentState.threadIds.flatMap((threadId) => { + const thread = environmentState.sidebarThreadSummaryById[threadId]; + return thread && thread.environmentId === environmentId ? [thread] : []; + }), + ); +} + +export function selectSidebarThreadsForProjectRef( + state: AppState, + ref: ScopedProjectRef | null | undefined, +): SidebarThreadSummary[] { + if (!ref) { + return []; + } + + const environmentState = selectEnvironmentState(state, ref.environmentId); + const threadIds = environmentState.threadIdsByProjectId[ref.projectId] ?? EMPTY_THREAD_IDS; + return threadIds.flatMap((threadId) => { + const thread = environmentState.sidebarThreadSummaryById[threadId]; + return thread ? [thread] : []; + }); +} + +export function selectSidebarThreadsForProjectRefs( + state: AppState, + refs: readonly ScopedProjectRef[], +): SidebarThreadSummary[] { + if (refs.length === 0) return []; + if (refs.length === 1) return selectSidebarThreadsForProjectRef(state, refs[0]); + return refs.flatMap((ref) => selectSidebarThreadsForProjectRef(state, ref)); +} + +export function selectBootstrapCompleteForActiveEnvironment(state: AppState): boolean { + return selectEnvironmentState(state, state.activeEnvironmentId).bootstrapComplete; +} + +export function selectProjectByRef( + state: AppState, + ref: ScopedProjectRef | null | undefined, +): Project | undefined { + return ref + ? selectEnvironmentState(state, ref.environmentId).projectById[ref.projectId] + : undefined; +} + +export function selectThreadByRef( + state: AppState, + ref: ScopedThreadRef | null | undefined, +): Thread | undefined { + return ref + ? getThreadFromEnvironmentState(selectEnvironmentState(state, ref.environmentId), ref.threadId) + : undefined; +} + +export function selectThreadExistsByRef( + state: AppState, + ref: ScopedThreadRef | null | undefined, +): boolean { + return ref + ? selectEnvironmentState(state, ref.environmentId).threadShellById[ref.threadId] !== undefined + : false; +} + +export function selectSidebarThreadSummaryByRef( + state: AppState, + ref: ScopedThreadRef | null | undefined, +): SidebarThreadSummary | undefined { + return ref + ? selectEnvironmentState(state, ref.environmentId).sidebarThreadSummaryById[ref.threadId] + : undefined; +} + +export function selectThreadIdsByProjectRef( + state: AppState, + ref: ScopedProjectRef | null | undefined, +): ThreadId[] { + return ref + ? (selectEnvironmentState(state, ref.environmentId).threadIdsByProjectId[ref.projectId] ?? + EMPTY_THREAD_IDS) + : EMPTY_THREAD_IDS; +} + +export function setError(state: AppState, threadId: ThreadId, error: string | null): AppState { + if (state.activeEnvironmentId === null) { + return state; + } + + const nextEnvironmentState = updateThreadState( + getStoredEnvironmentState(state, state.activeEnvironmentId), + threadId, + (thread) => { + if (thread.error === error) return thread; + return { ...thread, error }; + }, + ); + return commitEnvironmentState(state, state.activeEnvironmentId, nextEnvironmentState); +} + +export function applyOrchestrationEvent( + state: AppState, + event: OrchestrationEvent, + environmentId: EnvironmentId, +): AppState { + return commitEnvironmentState( + state, + environmentId, + applyEnvironmentOrchestrationEvent( + getStoredEnvironmentState(state, environmentId), + event, + environmentId, + ), + ); +} + +export function applyShellEvent( + state: AppState, + event: OrchestrationShellStreamEvent, + environmentId: EnvironmentId, +): AppState { + return commitEnvironmentState( + state, + environmentId, + applyEnvironmentShellEvent( + getStoredEnvironmentState(state, environmentId), + event, + environmentId, + ), + ); +} + +export function setActiveEnvironmentId(state: AppState, environmentId: EnvironmentId): AppState { + if (state.activeEnvironmentId === environmentId) { + return state; + } + + return { + ...state, + activeEnvironmentId: environmentId, + }; +} + +export function setThreadBranch( + state: AppState, + threadRef: ScopedThreadRef, + branch: string | null, + worktreePath: string | null, +): AppState { + const nextEnvironmentState = updateThreadState( + getStoredEnvironmentState(state, threadRef.environmentId), + threadRef.threadId, + (thread) => { + if (thread.branch === branch && thread.worktreePath === worktreePath) return thread; + const cwdChanged = thread.worktreePath !== worktreePath; + return { + ...thread, + branch, + worktreePath, + ...(cwdChanged ? { session: null } : {}), + }; + }, + ); + return commitEnvironmentState(state, threadRef.environmentId, nextEnvironmentState); +} + +interface AppStore extends AppState { + setActiveEnvironmentId: (environmentId: EnvironmentId) => void; + syncServerShellSnapshot: ( + snapshot: OrchestrationShellSnapshot, + environmentId: EnvironmentId, + ) => void; + syncServerThreadDetail: (thread: OrchestrationThread, environmentId: EnvironmentId) => void; + applyOrchestrationEvent: (event: OrchestrationEvent, environmentId: EnvironmentId) => void; + applyOrchestrationEvents: ( + events: ReadonlyArray, + environmentId: EnvironmentId, + ) => void; + applyShellEvent: (event: OrchestrationShellStreamEvent, environmentId: EnvironmentId) => void; + setError: (threadId: ThreadId, error: string | null) => void; + setThreadBranch: ( + threadRef: ScopedThreadRef, + branch: string | null, + worktreePath: string | null, + ) => void; +} + +export const useStore = create((set) => ({ + ...initialState, + setActiveEnvironmentId: (environmentId) => + set((state) => setActiveEnvironmentId(state, environmentId)), + syncServerShellSnapshot: (snapshot, environmentId) => + set((state) => syncServerShellSnapshot(state, snapshot, environmentId)), + syncServerThreadDetail: (thread, environmentId) => + set((state) => syncServerThreadDetail(state, thread, environmentId)), + applyOrchestrationEvent: (event, environmentId) => + set((state) => applyOrchestrationEvent(state, event, environmentId)), + applyOrchestrationEvents: (events, environmentId) => + set((state) => applyOrchestrationEvents(state, events, environmentId)), + applyShellEvent: (event, environmentId) => + set((state) => applyShellEvent(state, event, environmentId)), + setError: (threadId, error) => set((state) => setError(state, threadId, error)), + setThreadBranch: (threadRef, branch, worktreePath) => + set((state) => setThreadBranch(state, threadRef, branch, worktreePath)), +})); diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000000..06ed71d787 --- /dev/null +++ b/bun.lock @@ -0,0 +1,2300 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "@t3tools/monorepo", + "devDependencies": { + "@types/node": "catalog:", + "oxfmt": "^0.40.0", + "oxlint": "^1.55.0", + "turbo": "^2.3.3", + "vitest": "catalog:", + }, + }, + "apps/desktop": { + "name": "@t3tools/desktop", + "version": "0.0.20", + "dependencies": { + "effect": "catalog:", + "electron": "40.6.0", + "electron-updater": "^6.6.2", + }, + "devDependencies": { + "@t3tools/contracts": "workspace:*", + "@t3tools/shared": "workspace:*", + "@types/node": "catalog:", + "effect-acp": "workspace:*", + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "apps/marketing": { + "name": "@t3tools/marketing", + "version": "0.0.0", + "dependencies": { + "astro": "^6.0.4", + }, + "devDependencies": { + "@astrojs/check": "^0.9.7", + "typescript": "catalog:", + }, + }, + "apps/server": { + "name": "t3", + "version": "0.0.20", + "bin": { + "t3": "./dist/bin.mjs", + }, + "dependencies": { + "@anthropic-ai/claude-agent-sdk": "^0.2.111", + "@effect/platform-bun": "catalog:", + "@effect/platform-node": "catalog:", + "@effect/sql-sqlite-bun": "catalog:", + "@opencode-ai/sdk": "^1.3.15", + "@pierre/diffs": "^1.1.0-beta.16", + "effect": "catalog:", + "node-pty": "^1.1.0", + "open": "^10.1.0", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@effect/vitest": "catalog:", + "@t3tools/contracts": "workspace:*", + "@t3tools/shared": "workspace:*", + "@t3tools/web": "workspace:*", + "@types/bun": "catalog:", + "@types/node": "catalog:", + "effect-acp": "workspace:*", + "effect-codex-app-server": "workspace:*", + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "apps/web": { + "name": "@t3tools/web", + "version": "0.0.20", + "dependencies": { + "@base-ui/react": "^1.2.0", + "@dnd-kit/core": "^6.3.1", + "@dnd-kit/modifiers": "^9.0.0", + "@dnd-kit/sortable": "^10.0.0", + "@dnd-kit/utilities": "^3.2.2", + "@effect/atom-react": "catalog:", + "@formkit/auto-animate": "^0.9.0", + "@legendapp/list": "3.0.0-beta.44", + "@lexical/react": "^0.41.0", + "@pierre/diffs": "^1.1.0-beta.16", + "@t3tools/client-runtime": "workspace:*", + "@t3tools/contracts": "workspace:*", + "@t3tools/shared": "workspace:*", + "@tanstack/react-pacer": "^0.19.4", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.160.2", + "@xterm/addon-fit": "^0.11.0", + "@xterm/xterm": "^6.0.0", + "class-variance-authority": "^0.7.1", + "effect": "catalog:", + "lexical": "^0.41.0", + "lucide-react": "^0.564.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-markdown": "^10.1.0", + "remark-gfm": "^4.0.1", + "tailwind-merge": "^3.4.0", + "zustand": "^5.0.11", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@rolldown/plugin-babel": "^0.2.0", + "@tailwindcss/vite": "^4.0.0", + "@tanstack/router-plugin": "^1.161.0", + "@types/babel__core": "^7.20.5", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^6.0.0", + "@vitest/browser-playwright": "^4.0.18", + "babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112", + "msw": "2.12.11", + "playwright": "^1.58.2", + "tailwindcss": "^4.0.0", + "typescript": "catalog:", + "vite": "^8.0.0", + "vitest": "catalog:", + "vitest-browser-react": "^2.0.5", + }, + }, + "packages/client-runtime": { + "name": "@t3tools/client-runtime", + "version": "0.0.0-alpha.1", + "dependencies": { + "@t3tools/contracts": "workspace:*", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "packages/contracts": { + "name": "@t3tools/contracts", + "version": "0.0.20", + "dependencies": { + "effect": "catalog:", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@effect/vitest": "catalog:", + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "packages/effect-acp": { + "name": "effect-acp", + "dependencies": { + "effect": "catalog:", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@effect/openapi-generator": "catalog:", + "@effect/platform-node": "catalog:", + "@effect/vitest": "catalog:", + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "packages/effect-codex-app-server": { + "name": "effect-codex-app-server", + "dependencies": { + "effect": "catalog:", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@effect/openapi-generator": "catalog:", + "@effect/platform-node": "catalog:", + "@effect/vitest": "catalog:", + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "packages/shared": { + "name": "@t3tools/shared", + "version": "0.0.0-alpha.1", + "dependencies": { + "@t3tools/contracts": "workspace:*", + "effect": "catalog:", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@effect/vitest": "catalog:", + "@types/node": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + "scripts": { + "name": "@t3tools/scripts", + "dependencies": { + "@anthropic-ai/claude-agent-sdk": "^0.2.77", + "@effect/platform-node": "catalog:", + "@t3tools/contracts": "workspace:*", + "@t3tools/shared": "workspace:*", + "effect": "catalog:", + }, + "devDependencies": { + "@effect/language-service": "catalog:", + "@effect/vitest": "catalog:", + "@types/bun": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:", + }, + }, + }, + "trustedDependencies": [ + "node-pty", + ], + "overrides": { + "@effect/atom-react": "catalog:", + "@effect/platform-bun": "catalog:", + "@effect/platform-node": "catalog:", + "@effect/platform-node-shared": "catalog:", + "@effect/sql-sqlite-bun": "catalog:", + "@effect/vitest": "catalog:", + "effect": "catalog:", + "vite": "^8.0.0", + }, + "catalog": { + "@effect/atom-react": "4.0.0-beta.45", + "@effect/language-service": "0.84.2", + "@effect/openapi-generator": "4.0.0-beta.45", + "@effect/platform-bun": "4.0.0-beta.45", + "@effect/platform-node": "4.0.0-beta.45", + "@effect/platform-node-shared": "4.0.0-beta.45", + "@effect/sql-sqlite-bun": "4.0.0-beta.45", + "@effect/vitest": "4.0.0-beta.45", + "@types/bun": "^1.3.11", + "@types/node": "^24.10.13", + "effect": "4.0.0-beta.45", + "tsdown": "^0.20.3", + "typescript": "^5.7.3", + "vitest": "^4.0.0", + }, + "packages": { + "@anthropic-ai/claude-agent-sdk": ["@anthropic-ai/claude-agent-sdk@0.2.113", "", { "dependencies": { "@anthropic-ai/sdk": "^0.81.0", "@modelcontextprotocol/sdk": "^1.29.0" }, "optionalDependencies": { "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.113", "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.113", "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.113", "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.113", "@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.113", "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.113", "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.113", "@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.113" }, "peerDependencies": { "zod": "^4.0.0" } }, "sha512-TMeZeBDTdGNZek2VvRB4zCCFkJHbqKU1dn+OG3wms9h8z/DUKuDAUvjmmQCXP9c4K2ipPS1WmmRJljXRcKfStg=="], + + "@anthropic-ai/claude-agent-sdk-darwin-arm64": ["@anthropic-ai/claude-agent-sdk-darwin-arm64@0.2.113", "", { "os": "darwin", "cpu": "arm64" }, "sha512-FymNWXlee9xID6AKU/aWjeIzlMTL7LAtVVL5kg2j3MYm7o8lfTY996cEN1ulWXeF7i3pVbzYtIzE+avhVDauPA=="], + + "@anthropic-ai/claude-agent-sdk-darwin-x64": ["@anthropic-ai/claude-agent-sdk-darwin-x64@0.2.113", "", { "os": "darwin", "cpu": "x64" }, "sha512-pST/cJunx8mup8RxnuCTQNmwyli4/LcvmLVPaZgVSYchLQlBCE26bQKZwdoeMc/+F7Gm/eBt8Yz53GTTqV3TMA=="], + + "@anthropic-ai/claude-agent-sdk-linux-arm64": ["@anthropic-ai/claude-agent-sdk-linux-arm64@0.2.113", "", { "os": "linux", "cpu": "arm64" }, "sha512-QMkDOEfOMg8W/PLAHnp3cU9wLWp/RvJuVlrwn5s4Oei/bP3kxfuV0uLoxXUZZNSnv2lcplxAKUGgOz7Xa0asFw=="], + + "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": ["@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.2.113", "", { "os": "linux", "cpu": "arm64" }, "sha512-nXKJmIrxbgXMIE2fKebJVAFJiFqb6LsyzfxYn/tqgkYNfqk6IBDX+cP6eV5qRE72sNHI1E/ogF72N5MjhNeOHA=="], + + "@anthropic-ai/claude-agent-sdk-linux-x64": ["@anthropic-ai/claude-agent-sdk-linux-x64@0.2.113", "", { "os": "linux", "cpu": "x64" }, "sha512-/CQz7jiOp98hfrLwDJvmfPXtGCuWFGr+j7Zbi40uHovd5+TXJ1fOZNMEdb4aVKW3KYPbxA1aT6XNP8nAgmuPvA=="], + + "@anthropic-ai/claude-agent-sdk-linux-x64-musl": ["@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.2.113", "", { "os": "linux", "cpu": "x64" }, "sha512-PGpstZ8mWEQfCjDd+qV/rPsdLLkzFobINPpLr4ALMu8fQMEEs5SsabumGup48fnK3Z19/WlfI9FC1iVzxsE3LQ=="], + + "@anthropic-ai/claude-agent-sdk-win32-arm64": ["@anthropic-ai/claude-agent-sdk-win32-arm64@0.2.113", "", { "os": "win32", "cpu": "arm64" }, "sha512-NqtFDTVPg7fh+yee7KnsVZ/MZ6VogE+dQcIobEN0NVl03i5pbQAWfSZNOEvhk2XyEaJ4rdk+/9MPED+UThF5gQ=="], + + "@anthropic-ai/claude-agent-sdk-win32-x64": ["@anthropic-ai/claude-agent-sdk-win32-x64@0.2.113", "", { "os": "win32", "cpu": "x64" }, "sha512-0VoW/fTkygn/uZqPhOPjmXaVc1H3wkNNJd/fMyWKDR2p76Y9loQPQZk2R5tNRWlK5mDo65F6+Omby0rCx9XtQw=="], + + "@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.81.0", "", { "dependencies": { "json-schema-to-ts": "^3.1.1" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["zod"], "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-D4K5PvEV6wPiRtVlVsJHIUhHAmOZ6IT/I9rKlTf84gR7GyyAurPJK7z9BOf/AZqC5d1DhYQGJNKRmV+q8dGhgw=="], + + "@astrojs/check": ["@astrojs/check@0.9.8", "", { "dependencies": { "@astrojs/language-server": "^2.16.5", "chokidar": "^4.0.3", "kleur": "^4.1.5", "yargs": "^17.7.2" }, "peerDependencies": { "typescript": "^5.0.0" }, "bin": { "astro-check": "bin/astro-check.js" } }, "sha512-LDng8446QLS5ToKjRHd3bgUdirvemVVExV7nRyJfW2wV36xuv7vDxwy5NWN9zqeSEDgg0Tv84sP+T3yEq+Zlkw=="], + + "@astrojs/compiler": ["@astrojs/compiler@3.0.1", "", {}, "sha512-z97oYbdebO5aoWzuJ/8q5hLK232+17KcLZ7cJ8BCWk6+qNzVxn/gftC0KzMBUTD8WAaBkPpNSQK6PXLnNrZ0CA=="], + + "@astrojs/internal-helpers": ["@astrojs/internal-helpers@0.8.0", "", { "dependencies": { "picomatch": "^4.0.3" } }, "sha512-J56GrhEiV+4dmrGLPNOl2pZjpHXAndWVyiVDYGDuw6MWKpBSEMLdFxHzeM/6sqaknw9M+HFfHZAcvi3OfT3D/w=="], + + "@astrojs/language-server": ["@astrojs/language-server@2.16.6", "", { "dependencies": { "@astrojs/compiler": "^2.13.1", "@astrojs/yaml2ts": "^0.2.3", "@jridgewell/sourcemap-codec": "^1.5.5", "@volar/kit": "~2.4.28", "@volar/language-core": "~2.4.28", "@volar/language-server": "~2.4.28", "@volar/language-service": "~2.4.28", "muggle-string": "^0.4.1", "tinyglobby": "^0.2.15", "volar-service-css": "0.0.70", "volar-service-emmet": "0.0.70", "volar-service-html": "0.0.70", "volar-service-prettier": "0.0.70", "volar-service-typescript": "0.0.70", "volar-service-typescript-twoslash-queries": "0.0.70", "volar-service-yaml": "0.0.70", "vscode-html-languageservice": "^5.6.2", "vscode-uri": "^3.1.0" }, "peerDependencies": { "prettier": "^3.0.0", "prettier-plugin-astro": ">=0.11.0" }, "optionalPeers": ["prettier", "prettier-plugin-astro"], "bin": { "astro-ls": "bin/nodeServer.js" } }, "sha512-N990lu+HSFiG57owR0XBkr02BYMgiLCshLf+4QG4v6jjSWkBeQGnzqi+E1L08xFPPJ7eEeXnxPXGLaVv5pa4Ug=="], + + "@astrojs/markdown-remark": ["@astrojs/markdown-remark@7.1.0", "", { "dependencies": { "@astrojs/internal-helpers": "0.8.0", "@astrojs/prism": "4.0.1", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", "hast-util-to-text": "^4.0.2", "js-yaml": "^4.1.1", "mdast-util-definitions": "^6.0.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.1", "remark-gfm": "^4.0.1", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", "retext-smartypants": "^6.2.0", "shiki": "^4.0.0", "smol-toml": "^1.6.0", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "unist-util-visit": "^5.1.0", "unist-util-visit-parents": "^6.0.2", "vfile": "^6.0.3" } }, "sha512-P+HnCsu2js3BoTc8kFmu+E9gOcFeMdPris75g+Zl4sY8+bBRbSQV6xzcBDbZ27eE7yBGEGQoqjpChx+KJYIPYQ=="], + + "@astrojs/prism": ["@astrojs/prism@4.0.1", "", { "dependencies": { "prismjs": "^1.30.0" } }, "sha512-nksZQVjlferuWzhPsBpQ1JE5XuKAf1id1/9Hj4a9KG4+ofrlzxUUwX4YGQF/SuDiuiGKEnzopGOt38F3AnVWsQ=="], + + "@astrojs/telemetry": ["@astrojs/telemetry@3.3.0", "", { "dependencies": { "ci-info": "^4.2.0", "debug": "^4.4.0", "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^3.0.0", "is-wsl": "^3.1.0", "which-pm-runs": "^1.1.0" } }, "sha512-UFBgfeldP06qu6khs/yY+q1cDAaArM2/7AEIqQ9Cuvf7B1hNLq0xDrZkct+QoIGyjq56y8IaE2I3CTvG99mlhQ=="], + + "@astrojs/yaml2ts": ["@astrojs/yaml2ts@0.2.3", "", { "dependencies": { "yaml": "^2.8.2" } }, "sha512-PJzRmgQzUxI2uwpdX2lXSHtP4G8ocp24/t+bZyf5Fy0SZLSF9f9KXZoMlFM/XCGue+B0nH/2IZ7FpBYQATBsCg=="], + + "@babel/code-frame": ["@babel/code-frame@7.29.0", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="], + + "@babel/compat-data": ["@babel/compat-data@7.29.0", "", {}, "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg=="], + + "@babel/core": ["@babel/core@7.29.0", "", { "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", "@babel/helper-compilation-targets": "^7.28.6", "@babel/helper-module-transforms": "^7.28.6", "@babel/helpers": "^7.28.6", "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", "@babel/traverse": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA=="], + + "@babel/generator": ["@babel/generator@8.0.0-rc.2", "", { "dependencies": { "@babel/parser": "^8.0.0-rc.2", "@babel/types": "^8.0.0-rc.2", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "@types/jsesc": "^2.5.0", "jsesc": "^3.0.2" } }, "sha512-oCQ1IKPwkzCeJzAPb7Fv8rQ9k5+1sG8mf2uoHiMInPYvkRfrDJxbTIbH51U+jstlkghus0vAi3EBvkfvEsYNLQ=="], + + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.28.6", "", { "dependencies": { "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA=="], + + "@babel/helper-globals": ["@babel/helper-globals@7.28.0", "", {}, "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw=="], + + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.28.6", "", { "dependencies": { "@babel/traverse": "^7.28.6", "@babel/types": "^7.28.6" } }, "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw=="], + + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.28.6", "", { "dependencies": { "@babel/helper-module-imports": "^7.28.6", "@babel/helper-validator-identifier": "^7.28.5", "@babel/traverse": "^7.28.6" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA=="], + + "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.28.6", "", {}, "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@8.0.0-rc.2", "", {}, "sha512-xExUBkuXWJjVuIbO7z6q7/BA9bgfJDEhVL0ggrggLMbg0IzCUWGT1hZGE8qUH7Il7/RD/a6cZ3AAFrrlp1LF/A=="], + + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.27.1", "", {}, "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg=="], + + "@babel/helpers": ["@babel/helpers@7.29.2", "", { "dependencies": { "@babel/template": "^7.28.6", "@babel/types": "^7.29.0" } }, "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw=="], + + "@babel/parser": ["@babel/parser@7.29.2", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA=="], + + "@babel/plugin-syntax-jsx": ["@babel/plugin-syntax-jsx@7.28.6", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.28.6" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w=="], + + "@babel/plugin-syntax-typescript": ["@babel/plugin-syntax-typescript@7.28.6", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.28.6" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A=="], + + "@babel/runtime": ["@babel/runtime@7.29.2", "", {}, "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g=="], + + "@babel/template": ["@babel/template@7.28.6", "", { "dependencies": { "@babel/code-frame": "^7.28.6", "@babel/parser": "^7.28.6", "@babel/types": "^7.28.6" } }, "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ=="], + + "@babel/traverse": ["@babel/traverse@7.29.0", "", { "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", "@babel/types": "^7.29.0", "debug": "^4.3.1" } }, "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA=="], + + "@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + + "@base-ui/react": ["@base-ui/react@1.4.0", "", { "dependencies": { "@babel/runtime": "^7.29.2", "@base-ui/utils": "0.2.7", "@floating-ui/react-dom": "^2.1.8", "@floating-ui/utils": "^0.2.11", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@date-fns/tz": "^1.2.0", "@types/react": "^17 || ^18 || ^19", "date-fns": "^4.0.0", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-QcqdVbr/+ba2/RAKJIV1PV6S02Q5+r6a4Eym8ndBw+ZbBILkkmQAyRxXCg/pArrHnkrGeU8goe26aw0h6eE8pg=="], + + "@base-ui/utils": ["@base-ui/utils@0.2.7", "", { "dependencies": { "@babel/runtime": "^7.29.2", "@floating-ui/utils": "^0.2.11", "reselect": "^5.1.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-nXYKhiL/0JafyJE8PfcflipGftOftlIwKd72rU15iZ1M5yqgg5J9P8NHU71GReDuXco5MJA/eVQqUT5WRqX9sA=="], + + "@blazediff/core": ["@blazediff/core@1.9.1", "", {}, "sha512-ehg3jIkYKulZh+8om/O25vkvSsXXwC+skXmyA87FFx6A/45eqOkZsBltMw/TVteb0mloiGT8oGRTcjRAz66zaA=="], + + "@capsizecss/unpack": ["@capsizecss/unpack@4.0.0", "", { "dependencies": { "fontkitten": "^1.0.0" } }, "sha512-VERIM64vtTP1C4mxQ5thVT9fK0apjPFobqybMtA1UdUujWka24ERHbRHFGmpbbhp73MhV+KSsHQH9C6uOTdEQA=="], + + "@clack/core": ["@clack/core@1.2.0", "", { "dependencies": { "fast-wrap-ansi": "^0.1.3", "sisteransi": "^1.0.5" } }, "sha512-qfxof/3T3t9DPU/Rj3OmcFyZInceqj/NVtO9rwIuJqCUgh32gwPjpFQQp/ben07qKlhpwq7GzfWpST4qdJ5Drg=="], + + "@clack/prompts": ["@clack/prompts@1.2.0", "", { "dependencies": { "@clack/core": "1.2.0", "fast-string-width": "^1.1.0", "fast-wrap-ansi": "^0.1.3", "sisteransi": "^1.0.5" } }, "sha512-4jmztR9fMqPMjz6H/UZXj0zEmE43ha1euENwkckKKel4XpSfokExPo5AiVStdHSAlHekz4d0CA/r45Ok1E4D3w=="], + + "@date-fns/tz": ["@date-fns/tz@1.4.1", "", {}, "sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA=="], + + "@dnd-kit/accessibility": ["@dnd-kit/accessibility@3.1.1", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw=="], + + "@dnd-kit/core": ["@dnd-kit/core@6.3.1", "", { "dependencies": { "@dnd-kit/accessibility": "^3.1.1", "@dnd-kit/utilities": "^3.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ=="], + + "@dnd-kit/modifiers": ["@dnd-kit/modifiers@9.0.0", "", { "dependencies": { "@dnd-kit/utilities": "^3.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@dnd-kit/core": "^6.3.0", "react": ">=16.8.0" } }, "sha512-ybiLc66qRGuZoC20wdSSG6pDXFikui/dCNGthxv4Ndy8ylErY0N3KVxY2bgo7AWwIbxDmXDg3ylAFmnrjcbVvw=="], + + "@dnd-kit/sortable": ["@dnd-kit/sortable@10.0.0", "", { "dependencies": { "@dnd-kit/utilities": "^3.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@dnd-kit/core": "^6.3.0", "react": ">=16.8.0" } }, "sha512-+xqhmIIzvAYMGfBYYnbKuNicfSsk4RksY2XdmJhT+HAC01nix6fHCztU68jooFiMUB01Ky3F0FyOvhG/BZrWkg=="], + + "@dnd-kit/utilities": ["@dnd-kit/utilities@3.2.2", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-+MKAJEOfaBe5SmV6t34p80MMKhjvUz0vRrvVJbPT0WElzaOJ/1xs+D+KDv+tD/NE5ujfrChEcshd4fLn0wpiqg=="], + + "@effect/atom-react": ["@effect/atom-react@4.0.0-beta.45", "", { "peerDependencies": { "effect": "^4.0.0-beta.45", "react": "^19.2.4", "scheduler": "*" } }, "sha512-jCoiae9UNeis9Yoal1p5V/P4eJK9nX89wORom7X5LpR2Ok920SZJc8dIeYkRXRAp9BCYJ/yWcO8gGLf7do71vg=="], + + "@effect/language-service": ["@effect/language-service@0.84.2", "", { "bin": { "effect-language-service": "cli.js" } }, "sha512-l04qNxpiA8rY5yXWckRPJ7Mk5MNerXuNymSFf+IdflfI5i8jgL1bpBNLuP6ijg7wgjdHc/KmTnCj2kT0SCntuA=="], + + "@effect/openapi-generator": ["@effect/openapi-generator@4.0.0-beta.45", "", { "peerDependencies": { "@effect/platform-node": "^4.0.0-beta.45", "effect": "^4.0.0-beta.45" }, "bin": { "openapigen": "dist/bin.js" } }, "sha512-zT1UPzapV6mZebMuYhoDPQj/FKNn4R+oDgz1hEcQwazal4+lVDyEYGhRl0PgZroy6CP78fAOWNgW7TriGqSlOQ=="], + + "@effect/platform-bun": ["@effect/platform-bun@4.0.0-beta.45", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.0-beta.45" }, "peerDependencies": { "effect": "^4.0.0-beta.45" } }, "sha512-dZsbkJ+o4JfKE1OIAlMq8YWhmEfXxtTYennYADK/M/XlOtkFLsc2jkZppDvMznVni6JpFxWc7wd5rUf8jBVP5g=="], + + "@effect/platform-node": ["@effect/platform-node@4.0.0-beta.45", "", { "dependencies": { "@effect/platform-node-shared": "^4.0.0-beta.45", "mime": "^4.1.0", "undici": "^7.24.0" }, "peerDependencies": { "effect": "^4.0.0-beta.45", "ioredis": "^5.7.0" } }, "sha512-P07NMG4eoy62iLX9szak0hkr7hrwgq5+XMkm7URVug/3zqfZVxEG2kxn9JzVK1lF5WbaVrEKwjt3IkEJxzSPtg=="], + + "@effect/platform-node-shared": ["@effect/platform-node-shared@4.0.0-beta.45", "", { "dependencies": { "@types/ws": "^8.18.1", "ws": "^8.19.0" }, "peerDependencies": { "effect": "^4.0.0-beta.45" } }, "sha512-0T4RG18o+aCVUSlmPxA7uAjHJkyE3MS/uRrR5kCNSZQNG3X71wdIbu82wE/MnV6+6YSSPDx/6TVdZWYkJF0JWw=="], + + "@effect/sql-sqlite-bun": ["@effect/sql-sqlite-bun@4.0.0-beta.45", "", { "peerDependencies": { "effect": "^4.0.0-beta.45" } }, "sha512-sJBBztwI4YxjdjhdyjWelh3KKoZucmmZS2ONeNDIzYgqFlsrwEEUrhVkWf5ch9Io+kUUzeb6q7/SedFoLUWO7g=="], + + "@effect/vitest": ["@effect/vitest@4.0.0-beta.45", "", { "peerDependencies": { "effect": "^4.0.0-beta.45", "vitest": "^3.0.0 || ^4.0.0" } }, "sha512-38JA5Z6c2FoEhpVKbl7rjTrMU8Al5T30Kwtb6N3B9kOkyr2SsmvNsP9T65bh03IBh3ak9U//acrkmjS3hLQwKA=="], + + "@electron/get": ["@electron/get@2.0.3", "", { "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", "got": "^11.8.5", "progress": "^2.0.3", "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "optionalDependencies": { "global-agent": "^3.0.0" } }, "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ=="], + + "@emmetio/abbreviation": ["@emmetio/abbreviation@2.3.3", "", { "dependencies": { "@emmetio/scanner": "^1.0.4" } }, "sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA=="], + + "@emmetio/css-abbreviation": ["@emmetio/css-abbreviation@2.1.8", "", { "dependencies": { "@emmetio/scanner": "^1.0.4" } }, "sha512-s9yjhJ6saOO/uk1V74eifykk2CBYi01STTK3WlXWGOepyKa23ymJ053+DNQjpFcy1ingpaO7AxCcwLvHFY9tuw=="], + + "@emmetio/css-parser": ["@emmetio/css-parser@0.4.1", "", { "dependencies": { "@emmetio/stream-reader": "^2.2.0", "@emmetio/stream-reader-utils": "^0.1.0" } }, "sha512-2bC6m0MV/voF4CTZiAbG5MWKbq5EBmDPKu9Sb7s7nVcEzNQlrZP6mFFFlIaISM8X6514H9shWMme1fCm8cWAfQ=="], + + "@emmetio/html-matcher": ["@emmetio/html-matcher@1.3.0", "", { "dependencies": { "@emmetio/scanner": "^1.0.0" } }, "sha512-NTbsvppE5eVyBMuyGfVu2CRrLvo7J4YHb6t9sBFLyY03WYhXET37qA4zOYUjBWFCRHO7pS1B9khERtY0f5JXPQ=="], + + "@emmetio/scanner": ["@emmetio/scanner@1.0.4", "", {}, "sha512-IqRuJtQff7YHHBk4G8YZ45uB9BaAGcwQeVzgj/zj8/UdOhtQpEIupUhSk8dys6spFIWVZVeK20CzGEnqR5SbqA=="], + + "@emmetio/stream-reader": ["@emmetio/stream-reader@2.2.0", "", {}, "sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw=="], + + "@emmetio/stream-reader-utils": ["@emmetio/stream-reader-utils@0.1.0", "", {}, "sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A=="], + + "@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="], + + "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.7", "", { "os": "aix", "cpu": "ppc64" }, "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.27.7", "", { "os": "android", "cpu": "arm" }, "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.27.7", "", { "os": "android", "cpu": "arm64" }, "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.27.7", "", { "os": "android", "cpu": "x64" }, "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.27.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.27.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.27.7", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.27.7", "", { "os": "freebsd", "cpu": "x64" }, "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.27.7", "", { "os": "linux", "cpu": "arm" }, "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.27.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.27.7", "", { "os": "linux", "cpu": "ia32" }, "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.27.7", "", { "os": "linux", "cpu": "ppc64" }, "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.27.7", "", { "os": "linux", "cpu": "s390x" }, "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.27.7", "", { "os": "linux", "cpu": "x64" }, "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.27.7", "", { "os": "none", "cpu": "arm64" }, "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.27.7", "", { "os": "none", "cpu": "x64" }, "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.27.7", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.27.7", "", { "os": "openbsd", "cpu": "x64" }, "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.27.7", "", { "os": "none", "cpu": "arm64" }, "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.27.7", "", { "os": "sunos", "cpu": "x64" }, "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.27.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.27.7", "", { "os": "win32", "cpu": "ia32" }, "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.7", "", { "os": "win32", "cpu": "x64" }, "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg=="], + + "@floating-ui/core": ["@floating-ui/core@1.7.5", "", { "dependencies": { "@floating-ui/utils": "^0.2.11" } }, "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ=="], + + "@floating-ui/dom": ["@floating-ui/dom@1.7.6", "", { "dependencies": { "@floating-ui/core": "^1.7.5", "@floating-ui/utils": "^0.2.11" } }, "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ=="], + + "@floating-ui/react": ["@floating-ui/react@0.27.19", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.8", "@floating-ui/utils": "^0.2.11", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=17.0.0", "react-dom": ">=17.0.0" } }, "sha512-31B8h5mm8YxotlE7/AU/PhNAl8eWxAmjL/v2QOxroDNkTFLk3Uu82u63N3b6TXa4EGJeeZLVcd/9AlNlVqzeog=="], + + "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.8", "", { "dependencies": { "@floating-ui/dom": "^1.7.6" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A=="], + + "@floating-ui/utils": ["@floating-ui/utils@0.2.11", "", {}, "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg=="], + + "@formkit/auto-animate": ["@formkit/auto-animate@0.9.0", "", {}, "sha512-VhP4zEAacXS3dfTpJpJ88QdLqMTcabMg0jwpOSxZ/VzfQVfl3GkZSCZThhGC5uhq/TxPHPzW0dzr4H9Bb1OgKA=="], + + "@hono/node-server": ["@hono/node-server@1.19.14", "", { "peerDependencies": { "hono": "^4" } }, "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw=="], + + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], + + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.2.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.2.4" }, "os": "darwin", "cpu": "x64" }, "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.2.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.2.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.2.4", "", { "os": "linux", "cpu": "arm" }, "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.2.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw=="], + + "@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.2.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA=="], + + "@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.2.4", "", { "os": "linux", "cpu": "none" }, "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.2.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.2.4", "", { "os": "linux", "cpu": "x64" }, "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.2.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.2.4", "", { "os": "linux", "cpu": "x64" }, "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.2.4" }, "os": "linux", "cpu": "arm" }, "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.2.4" }, "os": "linux", "cpu": "arm64" }, "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg=="], + + "@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.2.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA=="], + + "@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.2.4" }, "os": "linux", "cpu": "none" }, "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.2.4" }, "os": "linux", "cpu": "s390x" }, "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.2.4" }, "os": "linux", "cpu": "x64" }, "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" }, "os": "linux", "cpu": "arm64" }, "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.34.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.2.4" }, "os": "linux", "cpu": "x64" }, "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.34.5", "", { "dependencies": { "@emnapi/runtime": "^1.7.0" }, "cpu": "none" }, "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw=="], + + "@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.34.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.34.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.34.5", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="], + + "@inquirer/ansi": ["@inquirer/ansi@1.0.2", "", {}, "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ=="], + + "@inquirer/confirm": ["@inquirer/confirm@5.1.21", "", { "dependencies": { "@inquirer/core": "^10.3.2", "@inquirer/type": "^3.0.10" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ=="], + + "@inquirer/core": ["@inquirer/core@10.3.2", "", { "dependencies": { "@inquirer/ansi": "^1.0.2", "@inquirer/figures": "^1.0.15", "@inquirer/type": "^3.0.10", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.3" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A=="], + + "@inquirer/figures": ["@inquirer/figures@1.0.15", "", {}, "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g=="], + + "@inquirer/type": ["@inquirer/type@3.0.10", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA=="], + + "@ioredis/commands": ["@ioredis/commands@1.5.1", "", {}, "sha512-JH8ZL/ywcJyR9MmJ5BNqZllXNZQqQbnVZOqpPQqE1vHiFgAw4NHbvE0FOduNU8IX9babitBT46571OnPTT0Zcw=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], + + "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + + "@legendapp/list": ["@legendapp/list@3.0.0-beta.44", "", { "dependencies": { "use-sync-external-store": "^1.5.0" }, "peerDependencies": { "react": "*" } }, "sha512-loGRve78NuZ5k8Z54ZSDNOtv3dVBM1SeBCRtm1EYtZiDIZ8SyMVcYpUGgFpGuNKk71+9/NuM9hvScrgf7+4E+A=="], + + "@lexical/clipboard": ["@lexical/clipboard@0.41.0", "", { "dependencies": { "@lexical/html": "0.41.0", "@lexical/list": "0.41.0", "@lexical/selection": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-Ex5lPkb4NBBX1DCPzOAIeHBJFH1bJcmATjREaqpnTfxCbuOeQkt44wchezUA0oDl+iAxNZ3+pLLWiUju9icoSA=="], + + "@lexical/code": ["@lexical/code@0.41.0", "", { "dependencies": { "@lexical/utils": "0.41.0", "lexical": "0.41.0", "prismjs": "^1.30.0" } }, "sha512-0hoNi1KC9/N3SBOGcOcFqnT0OpwmcRRAhfxTKMGqfCtCvAMzULVwZ8RWc9/NV9bKYESgBTW5D9xkDANP2mspHg=="], + + "@lexical/devtools-core": ["@lexical/devtools-core@0.41.0", "", { "dependencies": { "@lexical/html": "0.41.0", "@lexical/link": "0.41.0", "@lexical/mark": "0.41.0", "@lexical/table": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" }, "peerDependencies": { "react": ">=17.x", "react-dom": ">=17.x" } }, "sha512-FzJtluBhBc8bKS11TUZe72KoZN/hnzIyiiM0SPJAsPwGpoXuM01jqpXQGybWf/1bWB+bmmhOae7O4Nywi/Csuw=="], + + "@lexical/dragon": ["@lexical/dragon@0.41.0", "", { "dependencies": { "@lexical/extension": "0.41.0", "lexical": "0.41.0" } }, "sha512-gBEqkk8Q6ZPruvDaRcOdF1EK9suCVBODzOCcR+EnoJTaTjfDkCM7pkPAm4w90Wa1wCZEtFHvCfas+jU9MDSumg=="], + + "@lexical/extension": ["@lexical/extension@0.41.0", "", { "dependencies": { "@lexical/utils": "0.41.0", "@preact/signals-core": "^1.11.0", "lexical": "0.41.0" } }, "sha512-sF4SPiP72yXvIGchmmIZ7Yg2XZTxNLOpFEIIzdqG7X/1fa1Ham9P/T7VbrblWpF6Ei5LJtK9JgNVB0hb4l3o1g=="], + + "@lexical/hashtag": ["@lexical/hashtag@0.41.0", "", { "dependencies": { "@lexical/text": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-tFWM74RW4KU0E/sj2aowfWl26vmLUTp331CgVESnhQKcZBfT40KJYd57HEqBDTfQKn4MUhylQCCA0hbpw6EeFQ=="], + + "@lexical/history": ["@lexical/history@0.41.0", "", { "dependencies": { "@lexical/extension": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-kGoVWsiOn62+RMjRolRa+NXZl8jFwxav6GNDiHH8yzivtoaH8n1SwUfLJELXCzeqzs81HySqD4q30VLJVTGoDg=="], + + "@lexical/html": ["@lexical/html@0.41.0", "", { "dependencies": { "@lexical/selection": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-3RyZy+H/IDKz2D66rNN/NqYx87xVFrngfEbyu1OWtbY963RUFnopiVHCQvsge/8kT04QSZ7U/DzjVFqeNS6clg=="], + + "@lexical/link": ["@lexical/link@0.41.0", "", { "dependencies": { "@lexical/extension": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-Rjtx5cGWAkKcnacncbVsZ1TqRnUB2Wm4eEVKpaAEG41+kHgqghzM2P+UGT15yROroxJu8KvAC9ISiYFiU4XE1w=="], + + "@lexical/list": ["@lexical/list@0.41.0", "", { "dependencies": { "@lexical/extension": "0.41.0", "@lexical/selection": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-RXvB+xcbzVoQLGRDOBRCacztG7V+bI95tdoTwl8pz5xvgPtAaRnkZWMDP+yMNzMJZsqEChdtpxbf0NgtMkun6g=="], + + "@lexical/mark": ["@lexical/mark@0.41.0", "", { "dependencies": { "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-UO5WVs9uJAYIKHSlYh4Z1gHrBBchTOi21UCYBIZ7eAs4suK84hPzD+3/LAX5CB7ZltL6ke5Sly3FOwNXv/wfpA=="], + + "@lexical/markdown": ["@lexical/markdown@0.41.0", "", { "dependencies": { "@lexical/code": "0.41.0", "@lexical/link": "0.41.0", "@lexical/list": "0.41.0", "@lexical/rich-text": "0.41.0", "@lexical/text": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-bzI73JMXpjGFhqUWNV6KqfjWcgAWzwFT+J3RHtbCF5rysC8HLldBYojOgAAtPfXqfxyv2mDzsY7SoJ75s9uHZA=="], + + "@lexical/offset": ["@lexical/offset@0.41.0", "", { "dependencies": { "lexical": "0.41.0" } }, "sha512-2RHBXZqC8gm3X9C0AyRb0M8w7zJu5dKiasrif+jSKzsxPjAUeF1m95OtIOsWs1XLNUgASOSUqGovDZxKJslZfA=="], + + "@lexical/overflow": ["@lexical/overflow@0.41.0", "", { "dependencies": { "lexical": "0.41.0" } }, "sha512-Iy6ZiJip8X14EBYt1zKPOrXyQ4eG9JLBEoPoSVBTiSbVd+lYicdUvaOThT0k0/qeVTN9nqTaEltBjm56IrVKCQ=="], + + "@lexical/plain-text": ["@lexical/plain-text@0.41.0", "", { "dependencies": { "@lexical/clipboard": "0.41.0", "@lexical/dragon": "0.41.0", "@lexical/selection": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-HIsGgmFUYRUNNyvckun33UQfU7LRzDlxymHUq67+Bxd5bXqdZOrStEKJXuDX+LuLh/GXZbaWNbDLqwLBObfbQg=="], + + "@lexical/react": ["@lexical/react@0.41.0", "", { "dependencies": { "@floating-ui/react": "^0.27.16", "@lexical/devtools-core": "0.41.0", "@lexical/dragon": "0.41.0", "@lexical/extension": "0.41.0", "@lexical/hashtag": "0.41.0", "@lexical/history": "0.41.0", "@lexical/link": "0.41.0", "@lexical/list": "0.41.0", "@lexical/mark": "0.41.0", "@lexical/markdown": "0.41.0", "@lexical/overflow": "0.41.0", "@lexical/plain-text": "0.41.0", "@lexical/rich-text": "0.41.0", "@lexical/table": "0.41.0", "@lexical/text": "0.41.0", "@lexical/utils": "0.41.0", "@lexical/yjs": "0.41.0", "lexical": "0.41.0", "react-error-boundary": "^6.0.0" }, "peerDependencies": { "react": ">=17.x", "react-dom": ">=17.x" } }, "sha512-7+GUdZUm6sofWm+zdsWAs6cFBwKNsvsHezZTrf6k8jrZxL461ZQmbz/16b4DvjCGL9r5P1fR7md9/LCmk8TiCg=="], + + "@lexical/rich-text": ["@lexical/rich-text@0.41.0", "", { "dependencies": { "@lexical/clipboard": "0.41.0", "@lexical/dragon": "0.41.0", "@lexical/selection": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-yUcr7ZaaVTZNi8bow4CK1M8jy2qyyls1Vr+5dVjwBclVShOL/F/nFyzBOSb6RtXXRbd3Ahuk9fEleppX/RNIdw=="], + + "@lexical/selection": ["@lexical/selection@0.41.0", "", { "dependencies": { "lexical": "0.41.0" } }, "sha512-1s7/kNyRzcv5uaTwsUL28NpiisqTf5xZ1zNukLsCN1xY+TWbv9RE9OxIv+748wMm4pxNczQe/UbIBODkbeknLw=="], + + "@lexical/table": ["@lexical/table@0.41.0", "", { "dependencies": { "@lexical/clipboard": "0.41.0", "@lexical/extension": "0.41.0", "@lexical/utils": "0.41.0", "lexical": "0.41.0" } }, "sha512-d3SPThBAr+oZ8O74TXU0iXM3rLbrAVC7/HcOnSAq7/AhWQW8yMutT51JQGN+0fMLP9kqoWSAojNtkdvzXfU/+A=="], + + "@lexical/text": ["@lexical/text@0.41.0", "", { "dependencies": { "lexical": "0.41.0" } }, "sha512-gGA+Anc7ck110EXo4KVKtq6Ui3M7Vz3OpGJ4QE6zJHWW8nV5h273koUGSutAMeoZgRVb6t01Izh3ORoFt/j1CA=="], + + "@lexical/utils": ["@lexical/utils@0.41.0", "", { "dependencies": { "@lexical/selection": "0.41.0", "lexical": "0.41.0" } }, "sha512-Wlsokr5NQCq83D+7kxZ9qs5yQ3dU3Qaf2M+uXxLRoPoDaXqW8xTWZq1+ZFoEzsHzx06QoPa4Vu/40BZR91uQPg=="], + + "@lexical/yjs": ["@lexical/yjs@0.41.0", "", { "dependencies": { "@lexical/offset": "0.41.0", "@lexical/selection": "0.41.0", "lexical": "0.41.0" }, "peerDependencies": { "yjs": ">=13.5.22" } }, "sha512-PaKTxSbVC4fpqUjQ7vUL9RkNF1PjL8TFl5jRe03PqoPYpE33buf3VXX6+cOUEfv9+uknSqLCPHoBS/4jN3a97w=="], + + "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.29.0", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ=="], + + "@msgpackr-extract/msgpackr-extract-darwin-arm64": ["@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw=="], + + "@msgpackr-extract/msgpackr-extract-darwin-x64": ["@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw=="], + + "@msgpackr-extract/msgpackr-extract-linux-arm": ["@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3", "", { "os": "linux", "cpu": "arm" }, "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw=="], + + "@msgpackr-extract/msgpackr-extract-linux-arm64": ["@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg=="], + + "@msgpackr-extract/msgpackr-extract-linux-x64": ["@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3", "", { "os": "linux", "cpu": "x64" }, "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg=="], + + "@msgpackr-extract/msgpackr-extract-win32-x64": ["@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3", "", { "os": "win32", "cpu": "x64" }, "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ=="], + + "@mswjs/interceptors": ["@mswjs/interceptors@0.41.3", "", { "dependencies": { "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", "@open-draft/until": "^2.0.0", "is-node-process": "^1.2.0", "outvariant": "^1.4.3", "strict-event-emitter": "^0.5.1" } }, "sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA=="], + + "@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" } }, "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow=="], + + "@open-draft/deferred-promise": ["@open-draft/deferred-promise@2.2.0", "", {}, "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA=="], + + "@open-draft/logger": ["@open-draft/logger@0.3.0", "", { "dependencies": { "is-node-process": "^1.2.0", "outvariant": "^1.4.0" } }, "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ=="], + + "@open-draft/until": ["@open-draft/until@2.1.0", "", {}, "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg=="], + + "@opencode-ai/sdk": ["@opencode-ai/sdk@1.4.10", "", { "dependencies": { "cross-spawn": "7.0.6" } }, "sha512-Yaddcs/COp0hwiCxgobSZyDUN0nHgkEFL4bG0BQxwd52SGAysOr6A6L0ihfkuhVx0kbi9eXWgZk4ydNOrnur5w=="], + + "@oslojs/encoding": ["@oslojs/encoding@1.1.0", "", {}, "sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ=="], + + "@oxc-project/types": ["@oxc-project/types@0.112.0", "", {}, "sha512-m6RebKHIRsax2iCwVpYW2ErQwa4ywHJrE4sCK3/8JK8ZZAWOKXaRJFl/uP51gaVyyXlaS4+chU1nSCdzYf6QqQ=="], + + "@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.40.0", "", { "os": "android", "cpu": "arm" }, "sha512-S6zd5r1w/HmqR8t0CTnGjFTBLDq2QKORPwriCHxo4xFNuhmOTABGjPaNvCJJVnrKBLsohOeiDX3YqQfJPF+FXw=="], + + "@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.40.0", "", { "os": "android", "cpu": "arm64" }, "sha512-/mbS9UUP/5Vbl2D6osIdcYiP0oie63LKMoTyGj5hyMCK/SFkl3EhtyRAfdjPvuvHC0SXdW6ePaTKkBSq1SNcIw=="], + + "@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.40.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-wRt8fRdfLiEhnRMBonlIbKrJWixoEmn6KCjKE9PElnrSDSXETGZfPb8ee+nQNTobXkCVvVLytp2o0obAsxl78Q=="], + + "@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.40.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-fzowhqbOE/NRy+AE5ob0+Y4X243WbWzDb00W+pKwD7d9tOqsAFbtWUwIyqqCoCLxj791m2xXIEeLH/3uz7zCCg=="], + + "@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.40.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-agZ9ITaqdBjcerRRFEHB8s0OyVcQW8F9ZxsszjxzeSthQ4fcN2MuOtQFWec1ed8/lDa50jSLHVE2/xPmTgtCfQ=="], + + "@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.40.0", "", { "os": "linux", "cpu": "arm" }, "sha512-ZM2oQ47p28TP1DVIp7HL1QoMUgqlBFHey0ksHct7tMXoU5BqjNvPWw7888azzMt25lnyPODVuye1wvNbvVUFOA=="], + + "@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.40.0", "", { "os": "linux", "cpu": "arm" }, "sha512-RBFPAxRAIsMisKM47Oe6Lwdv6agZYLz02CUhVCD1sOv5ajAcRMrnwCFBPWwGXpazToW2mjnZxFos8TuFjTU15A=="], + + "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.40.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Nb2XbQ+wV3W2jSIihXdPj7k83eOxeSgYP3N/SRXvQ6ZYPIk6Q86qEh5Gl/7OitX3bQoQrESqm1yMLvZV8/J7dA=="], + + "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.40.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-tGmWhLD/0YMotCdfezlT6tC/MJG/wKpo4vnQ3Cq+4eBk/BwNv7EmkD0VkD5F/dYkT3b8FNU01X2e8vvJuWoM1w=="], + + "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.40.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-rVbFyM3e7YhkVnp0IVYjaSHfrBWcTRWb60LEcdNAJcE2mbhTpbqKufx0FrhWfoxOrW/+7UJonAOShoFFLigDqQ=="], + + "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.40.0", "", { "os": "linux", "cpu": "none" }, "sha512-3ZqBw14JtWeEoLiioJcXSJz8RQyPE+3jLARnYM1HdPzZG4vk+Ua8CUupt2+d+vSAvMyaQBTN2dZK+kbBS/j5mA=="], + + "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.40.0", "", { "os": "linux", "cpu": "none" }, "sha512-JJ4PPSdcbGBjPvb+O7xYm2FmAsKCyuEMYhqatBAHMp/6TA6rVlf9Z/sYPa4/3Bommb+8nndm15SPFRHEPU5qFA=="], + + "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.40.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-Kp0zNJoX9Ik77wUya2tpBY3W9f40VUoMQLWVaob5SgCrblH/t2xr/9B2bWHfs0WCefuGmqXcB+t0Lq77sbBmZw=="], + + "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.40.0", "", { "os": "linux", "cpu": "x64" }, "sha512-7YTCNzleWTaQTqNGUNQ66qVjpoV6DjbCOea+RnpMBly2bpzrI/uu7Rr+2zcgRfNxyjXaFTVQKaRKjqVdeUfeVA=="], + + "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.40.0", "", { "os": "linux", "cpu": "x64" }, "sha512-hWnSzJ0oegeOwfOEeejYXfBqmnRGHusgtHfCPzmvJvHTwy1s3Neo59UKc1CmpE3zxvrCzJoVHos0rr97GHMNPw=="], + + "@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.40.0", "", { "os": "none", "cpu": "arm64" }, "sha512-28sJC1lR4qtBJGzSRRbPnSW3GxU2+4YyQFE6rCmsUYqZ5XYH8jg0/w+CvEzQ8TuAQz5zLkcA25nFQGwoU0PT3Q=="], + + "@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.40.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-cDkRnyT0dqwF5oIX1Cv59HKCeZQFbWWdUpXa3uvnHFT2iwYSSZspkhgjXjU6iDp5pFPaAEAe9FIbMoTgkTmKPg=="], + + "@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.40.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-7rPemBJjqm5Gkv6ZRCPvK8lE6AqQ/2z31DRdWazyx2ZvaSgL7QGofHXHNouRpPvNsT9yxRNQJgigsWkc+0qg4w=="], + + "@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.40.0", "", { "os": "win32", "cpu": "x64" }, "sha512-/Zmj0yTYSvmha6TG1QnoLqVT7ZMRDqXvFXXBQpIjteEwx9qvUYMBH2xbiOFhDeMUJkGwC3D6fdKsFtaqUvkwNA=="], + + "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.60.0", "", { "os": "android", "cpu": "arm" }, "sha512-YdeJKaZckDQL1qa62a1aKq/goyq48aX3yOxaaWqWb4sau4Ee4IiLbamftNLU3zbePky6QsDj6thnSSzHRBjDfA=="], + + "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.60.0", "", { "os": "android", "cpu": "arm64" }, "sha512-7ANS7PpXCfq84xZQ8E5WPs14gwcuPcl+/8TFNXfpSu0CQBXz3cUo2fDpHT8v8HJN+Ut02eacvMAzTnc9s6X4tw=="], + + "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.60.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-pJsgd9AfplLGBm1fIr25V6V14vMrayhx4uIQvlfH7jWs2SZwSrvi3TfgfJySB8T+hvyEH8K2zXljQiUnkgUnfQ=="], + + "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.60.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Ue1aXHX49ivwflKqGJc7zcd/LeLgbhaTcDCQStgx5x06AXgjEAZmvrlMuIkWd4AL4FHQe6QJ9f33z04Cg448VQ=="], + + "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.60.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-YCyQzsQtusQw+gNRW9rRTifSO+Dt/+dtCl2NHoDMZqJlRTEZ/Oht9YnuporI9yiTx7+cB+eqzX3MtHHVHGIWhg=="], + + "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.60.0", "", { "os": "linux", "cpu": "arm" }, "sha512-c7dxM2Zksa45Qw16i2iGY3Fti2NirJ38FrsBsKw+qcJ0OtqTsBgKJLF0xV+yLG56UH01Z8WRPgsw31e0MoRoGQ=="], + + "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.60.0", "", { "os": "linux", "cpu": "arm" }, "sha512-ZWALoA42UYqBEP1Tbw9OWURgFGS1nWj2AAvLdY6ZcGx/Gj93qVCBKjcvwXMupZibYwFbi9s/rzqkZseb/6gVtQ=="], + + "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.60.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-tpy+1w4p9hN5CicMCxqNy6ymfRtV5ayE573vFNjp1k1TN/qhLFgflveZoE/0++RlkHikBz2vY545NWm/hp7big=="], + + "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.60.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-eDYDXZGhQAXyn6GwtwiX/qcLS0HlOLPJ/+iiIY8RYr+3P8oKBmgKxADLlniL6FtWfE7pPk7IGN9/xvDEvDvFeg=="], + + "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.60.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-nxehly5XYBHUWI9VJX1bqCf9j/B43DaK/aS/T1fcxCpX3PA4Rm9BB54nPD1CKayT8xg6REN1ao+01hSRNgy8OA=="], + + "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.60.0", "", { "os": "linux", "cpu": "none" }, "sha512-j1qf/NaUfOWQutjeoooNG1Q0zsK0XGmSu1uDLq3cctquRF3j7t9Hxqf/76ehCc5GEUAanth2W4Fa+XT1RFg/nw=="], + + "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.60.0", "", { "os": "linux", "cpu": "none" }, "sha512-YELKPRefQ/q/h3RUmeRfPCUhh2wBvgV1RyZ/F9M9u8cDyXsQW2ojv1DeWQTt466yczDITjZnIOg/s05pk7Ve2A=="], + + "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.60.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-JkO3C6Gki7Y6h/MiIkFKvHFOz98/YWvQ4WYbK9DLXACMP2rjULzkeGyAzorJE5S1dzLQGFgeqvN779kSFwoV1g=="], + + "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.60.0", "", { "os": "linux", "cpu": "x64" }, "sha512-XjKHdFVCpZZZSWBCKyyqCq65s2AKXykMXkjLoKYODrD+f5toLhlwsMESscu8FbgnJQ4Y/dpR/zdazsahmgBJIA=="], + + "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.60.0", "", { "os": "linux", "cpu": "x64" }, "sha512-js29ZWIuPhNWzY8NC7KoffEMEeWG105vbmm+8EOJsC+T/jHBiKIJEUF78+F/IrgEWMMP9N0kRND4Pp75+xAhKg=="], + + "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.60.0", "", { "os": "none", "cpu": "arm64" }, "sha512-H+PUITKHk04stFpWj3x3Kg08Afp/bcXSBi0EhasR5a0Vw7StXHTzdl655PUI0fB4qdh2Wsu6Dsi+3ACxPoyQnA=="], + + "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.60.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-WA/yc7f7ZfCefBXVzNHn1Ztulb1EFwNBb4jMZ6pjML0zz6pHujlF3Q3jySluz3XHl/GNeMTntG1seUBWVMlMag=="], + + "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.60.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-33YxL1sqwYNZXtn3MD/4dno6s0xeedXOJlT1WohkVD565WvohClZUr7vwKdAk954n4xiEWJkewiCr+zLeq7AeA=="], + + "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.60.0", "", { "os": "win32", "cpu": "x64" }, "sha512-JOro4ZcfBLamJCyfURQmOQByoorgOdx3ZjAkSqnb/CyG/i+lN3KoV5LAgk5ZAW6DPq7/Cx7n23f8DuTWXTWgyQ=="], + + "@pierre/diffs": ["@pierre/diffs@1.1.15", "", { "dependencies": { "@pierre/theme": "0.0.28", "@shikijs/transformers": "^3.0.0", "diff": "8.0.3", "hast-util-to-html": "9.0.5", "lru_map": "0.4.1", "shiki": "^3.0.0" }, "peerDependencies": { "react": "^18.3.1 || ^19.0.0", "react-dom": "^18.3.1 || ^19.0.0" } }, "sha512-Gj863E+aSpc0H3C4cH0fQTaF/tP9yYfhnilR7/dS72qq8thqNpR3fo3jURHRtRKz6KJJ10anxcurHP7b3ZUQkw=="], + + "@pierre/theme": ["@pierre/theme@0.0.28", "", {}, "sha512-1j/H/fECBuc9dEvntdWI+l435HZapw+RCJTlqCA6BboQ5TjlnE005j/ROWutXIs8aq5OAc82JI2Kwk4A1WWBgw=="], + + "@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="], + + "@preact/signals-core": ["@preact/signals-core@1.14.1", "", {}, "sha512-vxPpfXqrwUe9lpjqfYNjAF/0RF/eFGeLgdJzdmIIZjpOnTmGmAB4BjWone562mJGMRP4frU6iZ6ei3PDsu52Ng=="], + + "@quansync/fs": ["@quansync/fs@1.0.0", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="], + + "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.0.0-rc.3", "", { "os": "android", "cpu": "arm64" }, "sha512-0T1k9FinuBZ/t7rZ8jN6OpUKPnUjNdYHoj/cESWrQ3ZraAJ4OMm6z7QjSfCxqj8mOp9kTKc1zHK3kGz5vMu+nQ=="], + + "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.0.0-rc.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-JWWLzvcmc/3pe7qdJqPpuPk91SoE/N+f3PcWx/6ZwuyDVyungAEJPvKm/eEldiDdwTmaEzWfIR+HORxYWrCi1A=="], + + "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.0.0-rc.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-MTakBxfx3tde5WSmbHxuqlDsIW0EzQym+PJYGF4P6lG2NmKzi128OGynoFUqoD5ryCySEY85dug4v+LWGBElIw=="], + + "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.0.0-rc.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-jje3oopyOLs7IwfvXoS6Lxnmie5JJO7vW29fdGFu5YGY1EDbVDhD+P9vDihqS5X6fFiqL3ZQZCMBg6jyHkSVww=="], + + "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.3", "", { "os": "linux", "cpu": "arm" }, "sha512-A0n8P3hdLAaqzSFrQoA42p23ZKBYQOw+8EH5r15Sa9X1kD9/JXe0YT2gph2QTWvdr0CVK2BOXiK6ENfy6DXOag=="], + + "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.0.0-rc.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-kWXkoxxarYISBJ4bLNf5vFkEbb4JvccOwxWDxuK9yee8lg5XA7OpvlTptfRuwEvYcOZf+7VS69Uenpmpyo5Bjw=="], + + "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.0.0-rc.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-Z03/wrqau9Bicfgb3Dbs6SYTHliELk2PM2LpG2nFd+cGupTMF5kanLEcj2vuuJLLhptNyS61rtk7SOZ+lPsTUA=="], + + "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.16", "", { "os": "linux", "cpu": "ppc64" }, "sha512-EKwI1tSrLs7YVw+JPJT/G2dJQ1jl9qlTTTEG0V2Ok/RdOenRfBw2PQdLPyjhIu58ocdBfP7vIRN/pvMsPxs/AQ=="], + + "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.0.0-rc.16", "", { "os": "linux", "cpu": "s390x" }, "sha512-Uknladnb3Sxqu6SEcqBldQyJUpk8NleooZEc0MbRBJ4inEhRYWZX0NJu12vNf2mqAq7gsofAxHrGghiUYjhaLQ=="], + + "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.0.0-rc.3", "", { "os": "linux", "cpu": "x64" }, "sha512-iSXXZsQp08CSilff/DCTFZHSVEpEwdicV3W8idHyrByrcsRDVh9sGC3sev6d8BygSGj3vt8GvUKBPCoyMA4tgQ=="], + + "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.0.0-rc.3", "", { "os": "linux", "cpu": "x64" }, "sha512-qaj+MFudtdCv9xZo9znFvkgoajLdc+vwf0Kz5N44g+LU5XMe+IsACgn3UG7uTRlCCvhMAGXm1XlpEA5bZBrOcw=="], + + "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.0.0-rc.3", "", { "os": "none", "cpu": "arm64" }, "sha512-U662UnMETyjT65gFmG9ma+XziENrs7BBnENi/27swZPYagubfHRirXHG2oMl+pEax2WvO7Kb9gHZmMakpYqBHQ=="], + + "@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.0.0-rc.3", "", { "dependencies": { "@napi-rs/wasm-runtime": "^1.1.1" }, "cpu": "none" }, "sha512-gekrQ3Q2HiC1T5njGyuUJoGpK/l6B/TNXKed3fZXNf9YRTJn3L5MOZsFBn4bN2+UX+8+7hgdlTcEsexX988G4g=="], + + "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.0.0-rc.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-85y5JifyMgs8m5K2XzR/VDsapKbiFiohl7s5lEj7nmNGO0pkTXE7q6TQScei96BNAsoK7JC3pA7ukA8WRHVJpg=="], + + "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.0.0-rc.3", "", { "os": "win32", "cpu": "x64" }, "sha512-a4VUQZH7LxGbUJ3qJ/TzQG8HxdHvf+jOnqf7B7oFx1TEBm+j2KNL2zr5SQ7wHkNAcaPevF6gf9tQnVBnC4mD+A=="], + + "@rolldown/plugin-babel": ["@rolldown/plugin-babel@0.2.3", "", { "dependencies": { "picomatch": "^4.0.4" }, "peerDependencies": { "@babel/core": "^7.29.0 || ^8.0.0-rc.1", "@babel/plugin-transform-runtime": "^7.29.0 || ^8.0.0-rc.1", "@babel/runtime": "^7.27.0 || ^8.0.0-rc.1", "rolldown": "^1.0.0-rc.5", "vite": "^8.0.0" }, "optionalPeers": ["@babel/plugin-transform-runtime", "@babel/runtime", "vite"] }, "sha512-+zEk16yGlz1F9STiRr6uG9hmIXb6nprjLczV/htGptYuLoCuxb+itZ03RKCEeOhBpDDd1NU7qF6x1VLMUp62bw=="], + + "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.7", "", {}, "sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA=="], + + "@rollup/pluginutils": ["@rollup/pluginutils@5.3.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q=="], + + "@shikijs/core": ["@shikijs/core@4.0.2", "", { "dependencies": { "@shikijs/primitive": "4.0.2", "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw=="], + + "@shikijs/engine-javascript": ["@shikijs/engine-javascript@4.0.2", "", { "dependencies": { "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.4" } }, "sha512-7PW0Nm49DcoUIQEXlJhNNBHyoGMjalRETTCcjMqEaMoJRLljy1Bi/EGV3/qLBgLKQejdspiiYuHGQW6dX94Nag=="], + + "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@4.0.2", "", { "dependencies": { "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-UpCB9Y2sUKlS9z8juFSKz7ZtysmeXCgnRF0dlhXBkmQnek7lAToPte8DkxmEYGNTMii72zU/lyXiCB6StuZeJg=="], + + "@shikijs/langs": ["@shikijs/langs@4.0.2", "", { "dependencies": { "@shikijs/types": "4.0.2" } }, "sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg=="], + + "@shikijs/primitive": ["@shikijs/primitive@4.0.2", "", { "dependencies": { "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw=="], + + "@shikijs/themes": ["@shikijs/themes@4.0.2", "", { "dependencies": { "@shikijs/types": "4.0.2" } }, "sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA=="], + + "@shikijs/transformers": ["@shikijs/transformers@3.23.0", "", { "dependencies": { "@shikijs/core": "3.23.0", "@shikijs/types": "3.23.0" } }, "sha512-F9msZVxdF+krQNSdQ4V+Ja5QemeAoTQ2jxt7nJCwhDsdF1JWS3KxIQXA3lQbyKwS3J61oHRUSv4jYWv3CkaKTQ=="], + + "@shikijs/types": ["@shikijs/types@4.0.2", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg=="], + + "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.0.2", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="], + + "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], + + "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], + + "@szmarczak/http-timer": ["@szmarczak/http-timer@4.0.6", "", { "dependencies": { "defer-to-connect": "^2.0.0" } }, "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w=="], + + "@t3tools/client-runtime": ["@t3tools/client-runtime@workspace:packages/client-runtime"], + + "@t3tools/contracts": ["@t3tools/contracts@workspace:packages/contracts"], + + "@t3tools/desktop": ["@t3tools/desktop@workspace:apps/desktop"], + + "@t3tools/marketing": ["@t3tools/marketing@workspace:apps/marketing"], + + "@t3tools/scripts": ["@t3tools/scripts@workspace:scripts"], + + "@t3tools/shared": ["@t3tools/shared@workspace:packages/shared"], + + "@t3tools/web": ["@t3tools/web@workspace:apps/web"], + + "@tailwindcss/node": ["@tailwindcss/node@4.2.2", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.19.0", "jiti": "^2.6.1", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.2.2" } }, "sha512-pXS+wJ2gZpVXqFaUEjojq7jzMpTGf8rU6ipJz5ovJV6PUGmlJ+jvIwGrzdHdQ80Sg+wmQxUFuoW1UAAwHNEdFA=="], + + "@tailwindcss/oxide": ["@tailwindcss/oxide@4.2.2", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.2.2", "@tailwindcss/oxide-darwin-arm64": "4.2.2", "@tailwindcss/oxide-darwin-x64": "4.2.2", "@tailwindcss/oxide-freebsd-x64": "4.2.2", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.2", "@tailwindcss/oxide-linux-arm64-gnu": "4.2.2", "@tailwindcss/oxide-linux-arm64-musl": "4.2.2", "@tailwindcss/oxide-linux-x64-gnu": "4.2.2", "@tailwindcss/oxide-linux-x64-musl": "4.2.2", "@tailwindcss/oxide-wasm32-wasi": "4.2.2", "@tailwindcss/oxide-win32-arm64-msvc": "4.2.2", "@tailwindcss/oxide-win32-x64-msvc": "4.2.2" } }, "sha512-qEUA07+E5kehxYp9BVMpq9E8vnJuBHfJEC0vPC5e7iL/hw7HR61aDKoVoKzrG+QKp56vhNZe4qwkRmMC0zDLvg=="], + + "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.2.2", "", { "os": "android", "cpu": "arm64" }, "sha512-dXGR1n+P3B6748jZO/SvHZq7qBOqqzQ+yFrXpoOWWALWndF9MoSKAT3Q0fYgAzYzGhxNYOoysRvYlpixRBBoDg=="], + + "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.2.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-iq9Qjr6knfMpZHj55/37ouZeykwbDqF21gPFtfnhCCKGDcPI/21FKC9XdMO/XyBM7qKORx6UIhGgg6jLl7BZlg=="], + + "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.2.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-BlR+2c3nzc8f2G639LpL89YY4bdcIdUmiOOkv2GQv4/4M0vJlpXEa0JXNHhCHU7VWOKWT/CjqHdTP8aUuDJkuw=="], + + "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.2.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-YUqUgrGMSu2CDO82hzlQ5qSb5xmx3RUrke/QgnoEx7KvmRJHQuZHZmZTLSuuHwFf0DJPybFMXMYf+WJdxHy/nQ=="], + + "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.2.2", "", { "os": "linux", "cpu": "arm" }, "sha512-FPdhvsW6g06T9BWT0qTwiVZYE2WIFo2dY5aCSpjG/S/u1tby+wXoslXS0kl3/KXnULlLr1E3NPRRw0g7t2kgaQ=="], + + "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.2.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-4og1V+ftEPXGttOO7eCmW7VICmzzJWgMx+QXAJRAhjrSjumCwWqMfkDrNu1LXEQzNAwz28NCUpucgQPrR4S2yw=="], + + "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.2.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-oCfG/mS+/+XRlwNjnsNLVwnMWYH7tn/kYPsNPh+JSOMlnt93mYNCKHYzylRhI51X+TbR+ufNhhKKzm6QkqX8ag=="], + + "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.2.2", "", { "os": "linux", "cpu": "x64" }, "sha512-rTAGAkDgqbXHNp/xW0iugLVmX62wOp2PoE39BTCGKjv3Iocf6AFbRP/wZT/kuCxC9QBh9Pu8XPkv/zCZB2mcMg=="], + + "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.2.2", "", { "os": "linux", "cpu": "x64" }, "sha512-XW3t3qwbIwiSyRCggeO2zxe3KWaEbM0/kW9e8+0XpBgyKU4ATYzcVSMKteZJ1iukJ3HgHBjbg9P5YPRCVUxlnQ=="], + + "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.2.2", "", { "dependencies": { "@emnapi/core": "^1.8.1", "@emnapi/runtime": "^1.8.1", "@emnapi/wasi-threads": "^1.1.0", "@napi-rs/wasm-runtime": "^1.1.1", "@tybys/wasm-util": "^0.10.1", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-eKSztKsmEsn1O5lJ4ZAfyn41NfG7vzCg496YiGtMDV86jz1q/irhms5O0VrY6ZwTUkFy/EKG3RfWgxSI3VbZ8Q=="], + + "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.2.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-qPmaQM4iKu5mxpsrWZMOZRgZv1tOZpUm+zdhhQP0VhJfyGGO3aUKdbh3gDZc/dPLQwW4eSqWGrrcWNBZWUWaXQ=="], + + "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.2.2", "", { "os": "win32", "cpu": "x64" }, "sha512-1T/37VvI7WyH66b+vqHj/cLwnCxt7Qt3WFu5Q8hk65aOvlwAhs7rAp1VkulBJw/N4tMirXjVnylTR72uI0HGcA=="], + + "@tailwindcss/vite": ["@tailwindcss/vite@4.2.2", "", { "dependencies": { "@tailwindcss/node": "4.2.2", "@tailwindcss/oxide": "4.2.2", "tailwindcss": "4.2.2" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-mEiF5HO1QqCLXoNEfXVA1Tzo+cYsrqV7w9Juj2wdUFyW07JRenqMG225MvPwr3ZD9N1bFQj46X7r33iHxLUW0w=="], + + "@tanstack/devtools-event-client": ["@tanstack/devtools-event-client@0.4.3", "", { "bin": { "intent": "bin/intent.js" } }, "sha512-OZI6QyULw0FI0wjgmeYzCIfbgPsOEzwJtCpa69XrfLMtNXLGnz3d/dIabk7frg0TmHo+Ah49w5I4KC7Tufwsvw=="], + + "@tanstack/history": ["@tanstack/history@1.161.6", "", {}, "sha512-NaOGLRrddszbQj9upGat6HG/4TKvXLvu+osAIgfxPYA+eIvYKv8GKDJOrY2D3/U9MRnKfMWD7bU4jeD4xmqyIg=="], + + "@tanstack/pacer": ["@tanstack/pacer@0.18.0", "", { "dependencies": { "@tanstack/devtools-event-client": "^0.4.0", "@tanstack/store": "^0.8.0" } }, "sha512-qhCRSFei0hokQr3xYcQXqxsRD/LKlgHCxHXtKHrQoImp4x2Zu6tUOpUGVH4y2qexIrzSu3aibQBNNfC3Eay6Mg=="], + + "@tanstack/query-core": ["@tanstack/query-core@5.99.0", "", {}, "sha512-3Jv3WQG0BCcH7G+7lf/bP8QyBfJOXeY+T08Rin3GZ1bshvwlbPt7NrDHMEzGdKIOmOzvIQmxjk28YEQX60k7pQ=="], + + "@tanstack/react-pacer": ["@tanstack/react-pacer@0.19.4", "", { "dependencies": { "@tanstack/pacer": "0.18.0", "@tanstack/react-store": "^0.8.0" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-coj8ULAuR0qFpjAKD44gTgRuZyjxU6Xu+IX5MwwYvr4e61OtZcJshaExoOBKpCGde0Edb12jDnzzj2Im13Qm9Q=="], + + "@tanstack/react-query": ["@tanstack/react-query@5.99.0", "", { "dependencies": { "@tanstack/query-core": "5.99.0" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-OY2bCqPemT1LlqJ8Y2CUau4KELnIhhG9Ol3ZndPbdnB095pRbPo1cHuXTndg8iIwtoHTgwZjyaDnQ0xD0mYwAw=="], + + "@tanstack/react-router": ["@tanstack/react-router@1.168.22", "", { "dependencies": { "@tanstack/history": "1.161.6", "@tanstack/react-store": "^0.9.3", "@tanstack/router-core": "1.168.15", "isbot": "^5.1.22" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-W2LyfkfJtDCf//jOjZeUBWwOVl8iDRVTECpGHa2M28MT3T5/VVnjgicYNHR/ax0Filk1iU67MRjcjHheTYvK1Q=="], + + "@tanstack/react-store": ["@tanstack/react-store@0.8.1", "", { "dependencies": { "@tanstack/store": "0.8.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-XItJt+rG8c5Wn/2L/bnxys85rBpm0BfMbhb4zmPVLXAKY9POrp1xd6IbU4PKoOI+jSEGc3vntPRfLGSgXfE2Ig=="], + + "@tanstack/router-core": ["@tanstack/router-core@1.168.15", "", { "dependencies": { "@tanstack/history": "1.161.6", "cookie-es": "^3.0.0", "seroval": "^1.5.0", "seroval-plugins": "^1.5.0" }, "bin": { "intent": "bin/intent.js" } }, "sha512-Wr0424NDtD8fT/uALobMZ9DdcfsTyXtW5IPR++7zvW8/7RaIOeaqXpVDId8ywaGtqPWLWOfaUg2zUtYtukoXYA=="], + + "@tanstack/router-generator": ["@tanstack/router-generator@1.166.32", "", { "dependencies": { "@babel/types": "^7.28.5", "@tanstack/router-core": "1.168.15", "@tanstack/router-utils": "1.161.6", "@tanstack/virtual-file-routes": "1.161.7", "magic-string": "^0.30.21", "prettier": "^3.5.0", "tsx": "^4.19.2", "zod": "^3.24.2" } }, "sha512-VuusKwEXcgKq+myq1JQfZogY8scTXIIeFls50dJ/UXgCXWp5n14iFreYNlg41wURcak2oA3M+t2TVfD0xUUD6g=="], + + "@tanstack/router-plugin": ["@tanstack/router-plugin@1.167.22", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.5", "@babel/types": "^7.28.5", "@tanstack/router-core": "1.168.15", "@tanstack/router-generator": "1.166.32", "@tanstack/router-utils": "1.161.6", "@tanstack/virtual-file-routes": "1.161.7", "chokidar": "^3.6.0", "unplugin": "^2.1.2", "zod": "^3.24.2" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2", "@tanstack/react-router": "^1.168.21", "vite": ">=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0", "vite-plugin-solid": "^2.11.10 || ^3.0.0-0", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"], "bin": { "intent": "bin/intent.js" } }, "sha512-wYPzIvBK8bcmXVUpZfSgGBXOrfBAdF4odKevz6rejio5rEd947NtKDF5R7eYdwlAOmRqYpLJnJ1QHkc5t8bY4w=="], + + "@tanstack/router-utils": ["@tanstack/router-utils@1.161.6", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/generator": "^7.28.5", "@babel/parser": "^7.28.5", "@babel/types": "^7.28.5", "ansis": "^4.1.0", "babel-dead-code-elimination": "^1.0.12", "diff": "^8.0.2", "pathe": "^2.0.3", "tinyglobby": "^0.2.15" } }, "sha512-nRcYw+w2OEgK6VfjirYvGyPLOK+tZQz1jkYcmH5AjMamQ9PycnlxZF2aEZtPpNoUsaceX2bHptn6Ub5hGXqNvw=="], + + "@tanstack/store": ["@tanstack/store@0.8.1", "", {}, "sha512-PtOisLjUZPz5VyPRSCGjNOlwTvabdTBQ2K80DpVL1chGVr35WRxfeavAPdNq6pm/t7F8GhoR2qtmkkqtCEtHYw=="], + + "@tanstack/virtual-file-routes": ["@tanstack/virtual-file-routes@1.161.7", "", { "bin": { "intent": "bin/intent.js" } }, "sha512-olW33+Cn+bsCsZKPwEGhlkqS6w3M2slFv11JIobdnCFKMLG97oAI2kWKdx5/zsywTL8flpnoIgaZZPlQTFYhdQ=="], + + "@turbo/darwin-64": ["@turbo/darwin-64@2.9.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-X/56SnVXIQZBLKwniGTwEQTGmtE5brSACnKMBWpY3YafuxVYefrC2acamfjgxP7BG5w3I+6jf0UrLoSzgPcSJg=="], + + "@turbo/darwin-arm64": ["@turbo/darwin-arm64@2.9.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-aalBeSl4agT/QtYGDyf/XLajedWzUC9Vg/pm/YO6QQ93vkQ91Vz5uK1ta5RbVRDozQSz4njxUNqRNmOXDzW+qw=="], + + "@turbo/linux-64": ["@turbo/linux-64@2.9.6", "", { "os": "linux", "cpu": "x64" }, "sha512-YKi05jnNHaD7vevgYwahpzGwbsNNTwzU2c7VZdmdFm7+cGDP4oREUWSsainiMfRqjRuolQxBwRn8wf1jmu+YZA=="], + + "@turbo/linux-arm64": ["@turbo/linux-arm64@2.9.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-02o/ZS69cOYEDczXvOB2xmyrtzjQ2hVFtWZK1iqxXUfzMmTjZK4UumrfNnjckSg+gqeBfnPRHa0NstA173Ik3g=="], + + "@turbo/windows-64": ["@turbo/windows-64@2.9.6", "", { "os": "win32", "cpu": "x64" }, "sha512-wVdQjvnBI15wB6JrA+43CtUtagjIMmX6XYO758oZHAsCNSxqRlJtdyujih0D8OCnwCRWiGWGI63zAxR0hO6s9g=="], + + "@turbo/windows-arm64": ["@turbo/windows-arm64@2.9.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-1XUUyWW0W6FTSqGEhU8RHVqb2wP1SPkr7hIvBlMEwH9jr+sJQK5kqeosLJ/QaUv4ecSAd1ZhIrLoW7qslAzT4A=="], + + "@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], + + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], + + "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], + + "@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="], + + "@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="], + + "@types/bun": ["@types/bun@1.3.12", "", { "dependencies": { "bun-types": "1.3.12" } }, "sha512-DBv81elK+/VSwXHDlnH3Qduw+KxkTIWi7TXkAeh24zpi5l0B2kUg9Ga3tb4nJaPcOFswflgi/yAvMVBPrxMB+A=="], + + "@types/cacheable-request": ["@types/cacheable-request@6.0.3", "", { "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", "@types/node": "*", "@types/responselike": "^1.0.0" } }, "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw=="], + + "@types/chai": ["@types/chai@5.2.3", "", { "dependencies": { "@types/deep-eql": "*", "assertion-error": "^2.0.1" } }, "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA=="], + + "@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="], + + "@types/deep-eql": ["@types/deep-eql@4.0.2", "", {}, "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw=="], + + "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + + "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], + + "@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="], + + "@types/http-cache-semantics": ["@types/http-cache-semantics@4.2.0", "", {}, "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q=="], + + "@types/jsesc": ["@types/jsesc@2.5.1", "", {}, "sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw=="], + + "@types/keyv": ["@types/keyv@3.1.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg=="], + + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], + + "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], + + "@types/nlcst": ["@types/nlcst@2.0.3", "", { "dependencies": { "@types/unist": "*" } }, "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA=="], + + "@types/node": ["@types/node@24.12.2", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g=="], + + "@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="], + + "@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="], + + "@types/responselike": ["@types/responselike@1.0.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="], + + "@types/statuses": ["@types/statuses@2.0.6", "", {}, "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA=="], + + "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + + "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + + "@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="], + + "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="], + + "@vitejs/plugin-react": ["@vitejs/plugin-react@6.0.1", "", { "dependencies": { "@rolldown/pluginutils": "1.0.0-rc.7" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler"] }, "sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ=="], + + "@vitest/browser": ["@vitest/browser@4.1.4", "", { "dependencies": { "@blazediff/core": "1.9.1", "@vitest/mocker": "4.1.4", "@vitest/utils": "4.1.4", "magic-string": "^0.30.21", "pngjs": "^7.0.0", "sirv": "^3.0.2", "tinyrainbow": "^3.1.0", "ws": "^8.19.0" }, "peerDependencies": { "vitest": "4.1.4" } }, "sha512-TrNaY/yVOwxtrxNsDUC/wQ56xSwplpytTeRAqF/197xV/ZddxxulBsxR6TrhVMyniJmp9in8d5u0AcDaNRY30w=="], + + "@vitest/browser-playwright": ["@vitest/browser-playwright@4.1.4", "", { "dependencies": { "@vitest/browser": "4.1.4", "@vitest/mocker": "4.1.4", "tinyrainbow": "^3.1.0" }, "peerDependencies": { "playwright": "*", "vitest": "4.1.4" } }, "sha512-q3PchVhZINX23Pv+RERgAtDlp6wzVkID/smOPnZ5YGWpeWUe3jMNYppeVh15j4il3G7JIJty1d1Kicpm0HSMig=="], + + "@vitest/expect": ["@vitest/expect@4.1.4", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", "@vitest/spy": "4.1.4", "@vitest/utils": "4.1.4", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" } }, "sha512-iPBpra+VDuXmBFI3FMKHSFXp3Gx5HfmSCE8X67Dn+bwephCnQCaB7qWK2ldHa+8ncN8hJU8VTMcxjPpyMkUjww=="], + + "@vitest/mocker": ["@vitest/mocker@4.1.4", "", { "dependencies": { "@vitest/spy": "4.1.4", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-R9HTZBhW6yCSGbGQnDnH3QHfJxokKN4KB+Yvk9Q1le7eQNYwiCyKxmLmurSpFy6BzJanSLuEUDrD+j97Q+ZLPg=="], + + "@vitest/pretty-format": ["@vitest/pretty-format@4.1.4", "", { "dependencies": { "tinyrainbow": "^3.1.0" } }, "sha512-ddmDHU0gjEUyEVLxtZa7xamrpIefdEETu3nZjWtHeZX4QxqJ7tRxSteHVXJOcr8jhiLoGAhkK4WJ3WqBpjx42A=="], + + "@vitest/runner": ["@vitest/runner@4.1.4", "", { "dependencies": { "@vitest/utils": "4.1.4", "pathe": "^2.0.3" } }, "sha512-xTp7VZ5aXP5ZJrn15UtJUWlx6qXLnGtF6jNxHepdPHpMfz/aVPx+htHtgcAL2mDXJgKhpoo2e9/hVJsIeFbytQ=="], + + "@vitest/snapshot": ["@vitest/snapshot@4.1.4", "", { "dependencies": { "@vitest/pretty-format": "4.1.4", "@vitest/utils": "4.1.4", "magic-string": "^0.30.21", "pathe": "^2.0.3" } }, "sha512-MCjCFgaS8aZz+m5nTcEcgk/xhWv0rEH4Yl53PPlMXOZ1/Ka2VcZU6CJ+MgYCZbcJvzGhQRjVrGQNZqkGPttIKw=="], + + "@vitest/spy": ["@vitest/spy@4.1.4", "", {}, "sha512-XxNdAsKW7C+FLydqFJLb5KhJtl3PGCMmYwFRfhvIgxJvLSXhhVI1zM8f1qD3Zg7RCjTSzDVyct6sghs9UEgBEQ=="], + + "@vitest/utils": ["@vitest/utils@4.1.4", "", { "dependencies": { "@vitest/pretty-format": "4.1.4", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" } }, "sha512-13QMT+eysM5uVGa1rG4kegGYNp6cnQcsTc67ELFbhNLQO+vgsygtYJx2khvdt4gVQqSSpC/KT5FZZxUpP3Oatw=="], + + "@volar/kit": ["@volar/kit@2.4.28", "", { "dependencies": { "@volar/language-service": "2.4.28", "@volar/typescript": "2.4.28", "typesafe-path": "^0.2.2", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "typescript": "*" } }, "sha512-cKX4vK9dtZvDRaAzeoUdaAJEew6IdxHNCRrdp5Kvcl6zZOqb6jTOfk3kXkIkG3T7oTFXguEMt5+9ptyqYR84Pg=="], + + "@volar/language-core": ["@volar/language-core@2.4.28", "", { "dependencies": { "@volar/source-map": "2.4.28" } }, "sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ=="], + + "@volar/language-server": ["@volar/language-server@2.4.28", "", { "dependencies": { "@volar/language-core": "2.4.28", "@volar/language-service": "2.4.28", "@volar/typescript": "2.4.28", "path-browserify": "^1.0.1", "request-light": "^0.7.0", "vscode-languageserver": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" } }, "sha512-NqcLnE5gERKuS4PUFwlhMxf6vqYo7hXtbMFbViXcbVkbZ905AIVWhnSo0ZNBC2V127H1/2zP7RvVOVnyITFfBw=="], + + "@volar/language-service": ["@volar/language-service@2.4.28", "", { "dependencies": { "@volar/language-core": "2.4.28", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" } }, "sha512-Rh/wYCZJrI5vCwMk9xyw/Z+MsWxlJY1rmMZPsxUoJKfzIRjS/NF1NmnuEcrMbEVGja00aVpCsInJfixQTMdvLw=="], + + "@volar/source-map": ["@volar/source-map@2.4.28", "", {}, "sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ=="], + + "@volar/typescript": ["@volar/typescript@2.4.28", "", { "dependencies": { "@volar/language-core": "2.4.28", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" } }, "sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw=="], + + "@vscode/emmet-helper": ["@vscode/emmet-helper@2.11.0", "", { "dependencies": { "emmet": "^2.4.3", "jsonc-parser": "^2.3.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.15.1", "vscode-uri": "^3.0.8" } }, "sha512-QLxjQR3imPZPQltfbWRnHU6JecWTF1QSWhx3GAKQpslx7y3Dp6sIIXhKjiUJ/BR9FX8PVthjr9PD6pNwOJfAzw=="], + + "@vscode/l10n": ["@vscode/l10n@0.0.18", "", {}, "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ=="], + + "@xterm/addon-fit": ["@xterm/addon-fit@0.11.0", "", {}, "sha512-jYcgT6xtVYhnhgxh3QgYDnnNMYTcf8ElbxxFzX0IZo+vabQqSPAjC3c1wJrKB5E19VwQei89QCiZZP86DCPF7g=="], + + "@xterm/xterm": ["@xterm/xterm@6.0.0", "", {}, "sha512-TQwDdQGtwwDt+2cgKDLn0IRaSxYu1tSUjgKarSDkUM0ZNiSRXFpjxEsvc/Zgc5kq5omJ+V0a8/kIM2WD3sMOYg=="], + + "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], + + "acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="], + + "ajv": ["ajv@8.18.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="], + + "ajv-draft-04": ["ajv-draft-04@1.0.0", "", { "peerDependencies": { "ajv": "^8.5.0" }, "optionalPeers": ["ajv"] }, "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw=="], + + "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], + + "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "ansis": ["ansis@4.2.0", "", {}, "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], + + "array-iterate": ["array-iterate@2.0.1", "", {}, "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg=="], + + "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="], + + "ast-kit": ["ast-kit@3.0.0-beta.1", "", { "dependencies": { "@babel/parser": "^8.0.0-beta.4", "estree-walker": "^3.0.3", "pathe": "^2.0.3" } }, "sha512-trmleAnZ2PxN/loHWVhhx1qeOHSRXq4TDsBBxq3GqeJitfk3+jTQ+v/C1km/KYq9M7wKqCewMh+/NAvVH7m+bw=="], + + "astro": ["astro@6.1.7", "", { "dependencies": { "@astrojs/compiler": "^3.0.1", "@astrojs/internal-helpers": "0.8.0", "@astrojs/markdown-remark": "7.1.0", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^4.0.0", "@clack/prompts": "^1.1.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.3.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "ci-info": "^4.4.0", "clsx": "^2.1.1", "common-ancestor-path": "^2.0.0", "cookie": "^1.1.1", "devalue": "^5.6.3", "diff": "^8.0.3", "dset": "^3.1.4", "es-module-lexer": "^2.0.0", "esbuild": "^0.27.3", "flattie": "^1.1.1", "fontace": "~0.4.1", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", "js-yaml": "^4.1.1", "magic-string": "^0.30.21", "magicast": "^0.5.2", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "obug": "^2.1.1", "p-limit": "^7.3.0", "p-queue": "^9.1.0", "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.3", "rehype": "^13.0.2", "semver": "^7.7.4", "shiki": "^4.0.2", "smol-toml": "^1.6.0", "svgo": "^4.0.1", "tinyclip": "^0.1.12", "tinyexec": "^1.0.4", "tinyglobby": "^0.2.15", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", "unifont": "~0.7.4", "unist-util-visit": "^5.1.0", "unstorage": "^1.17.4", "vfile": "^6.0.3", "vite": "^7.3.1", "vitefu": "^1.1.2", "xxhash-wasm": "^1.1.0", "yargs-parser": "^22.0.0", "zod": "^4.3.6" }, "optionalDependencies": { "sharp": "^0.34.0" }, "bin": { "astro": "bin/astro.mjs" } }, "sha512-pvZysIUV2C2nRv8N7cXAkCLcfDQz/axAxF09SqiTz1B+xnvbhy6KzL2I6J15ZBXk8k0TfMD75dJ151QyQmAqZA=="], + + "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], + + "babel-dead-code-elimination": ["babel-dead-code-elimination@1.0.12", "", { "dependencies": { "@babel/core": "^7.23.7", "@babel/parser": "^7.23.6", "@babel/traverse": "^7.23.7", "@babel/types": "^7.23.6" } }, "sha512-GERT7L2TiYcYDtYk1IpD+ASAYXjKbLTDPhBtYj7X1NuRMDTMtAx9kyBenub1Ev41lo91OHCKdmP+egTDmfQ7Ig=="], + + "babel-plugin-react-compiler": ["babel-plugin-react-compiler@19.0.0-beta-ebf51a3-20250411", "", { "dependencies": { "@babel/types": "^7.26.0" } }, "sha512-q84bNR9JG1crykAlJUt5Ud0/5BUyMFuQww/mrwIQDFBaxsikqBDj3f/FNDsVd2iR26A1HvXKWPEIfgJDv8/V2g=="], + + "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], + + "baseline-browser-mapping": ["baseline-browser-mapping@2.10.19", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-qCkNLi2sfBOn8XhZQ0FXsT1Ki/Yo5P90hrkRamVFRS7/KV9hpfA4HkoWNU152+8w0zPjnxo5psx5NL3PSGgv5g=="], + + "binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="], + + "birpc": ["birpc@4.0.0", "", {}, "sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw=="], + + "body-parser": ["body-parser@2.2.2", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.3", "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" } }, "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA=="], + + "boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="], + + "boolean": ["boolean@3.2.0", "", {}, "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "browserslist": ["browserslist@4.28.2", "", { "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", "electron-to-chromium": "^1.5.328", "node-releases": "^2.0.36", "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg=="], + + "buffer-crc32": ["buffer-crc32@0.2.13", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="], + + "builder-util-runtime": ["builder-util-runtime@9.5.1", "", { "dependencies": { "debug": "^4.3.4", "sax": "^1.2.4" } }, "sha512-qt41tMfgHTllhResqM5DcnHyDIWNgzHvuY2jDcYP9iaGpkWxTUzV6GQjDeLnlR1/DtdlcsWQbA7sByMpmJFTLQ=="], + + "bun-types": ["bun-types@1.3.12", "", { "dependencies": { "@types/node": "*" } }, "sha512-HqOLj5PoFajAQciOMRiIZGNoKxDJSr6qigAttOX40vJuSp6DN/CxWp9s3C1Xwm4oH7ybueITwiaOcWXoYVoRkA=="], + + "bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="], + + "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], + + "cac": ["cac@6.7.14", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="], + + "cacheable-lookup": ["cacheable-lookup@5.0.4", "", {}, "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA=="], + + "cacheable-request": ["cacheable-request@7.0.4", "", { "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", "normalize-url": "^6.0.1", "responselike": "^2.0.0" } }, "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg=="], + + "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], + + "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001788", "", {}, "sha512-6q8HFp+lOQtcf7wBK+uEenxymVWkGKkjFpCvw5W25cmMwEDU45p1xQFBQv8JDlMMry7eNxyBaR+qxgmTUZkIRQ=="], + + "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + + "chai": ["chai@6.2.2", "", {}, "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg=="], + + "character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="], + + "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], + + "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + + "character-reference-invalid": ["character-reference-invalid@2.0.1", "", {}, "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="], + + "chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="], + + "ci-info": ["ci-info@4.4.0", "", {}, "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg=="], + + "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], + + "cli-width": ["cli-width@4.1.0", "", {}, "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ=="], + + "cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="], + + "clone-response": ["clone-response@1.0.3", "", { "dependencies": { "mimic-response": "^1.0.0" } }, "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA=="], + + "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + + "cluster-key-slot": ["cluster-key-slot@1.1.2", "", {}, "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], + + "commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="], + + "common-ancestor-path": ["common-ancestor-path@2.0.0", "", {}, "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng=="], + + "content-disposition": ["content-disposition@1.1.0", "", {}, "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g=="], + + "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], + + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + + "cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="], + + "cookie-es": ["cookie-es@3.1.1", "", {}, "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg=="], + + "cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="], + + "cors": ["cors@2.8.6", "", { "dependencies": { "object-assign": "^4", "vary": "^1" } }, "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "crossws": ["crossws@0.3.5", "", { "dependencies": { "uncrypto": "^0.1.3" } }, "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA=="], + + "css-select": ["css-select@5.2.2", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", "domhandler": "^5.0.2", "domutils": "^3.0.1", "nth-check": "^2.0.1" } }, "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw=="], + + "css-tree": ["css-tree@3.2.1", "", { "dependencies": { "mdn-data": "2.27.1", "source-map-js": "^1.2.1" } }, "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA=="], + + "css-what": ["css-what@6.2.2", "", {}, "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA=="], + + "csso": ["csso@5.0.5", "", { "dependencies": { "css-tree": "~2.2.0" } }, "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ=="], + + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "date-fns": ["date-fns@4.1.0", "", {}, "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg=="], + + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + + "decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="], + + "decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="], + + "default-browser": ["default-browser@5.5.0", "", { "dependencies": { "bundle-name": "^4.1.0", "default-browser-id": "^5.0.0" } }, "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw=="], + + "default-browser-id": ["default-browser-id@5.0.1", "", {}, "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q=="], + + "defer-to-connect": ["defer-to-connect@2.0.1", "", {}, "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="], + + "define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="], + + "define-lazy-prop": ["define-lazy-prop@3.0.0", "", {}, "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="], + + "define-properties": ["define-properties@1.2.1", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="], + + "defu": ["defu@6.1.7", "", {}, "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ=="], + + "denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="], + + "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], + + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + + "destr": ["destr@2.0.5", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="], + + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "detect-node": ["detect-node@2.1.0", "", {}, "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g=="], + + "devalue": ["devalue@5.7.1", "", {}, "sha512-MUbZ586EgQqdRnC4yDrlod3BEdyvE4TapGYHMW2CiaW+KkkFmWEFqBUaLltEZCGi0iFXCEjRF0OjF0DV2QHjOA=="], + + "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + + "diff": ["diff@8.0.3", "", {}, "sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ=="], + + "dlv": ["dlv@1.1.3", "", {}, "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="], + + "dom-serializer": ["dom-serializer@2.0.0", "", { "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.2", "entities": "^4.2.0" } }, "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg=="], + + "domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="], + + "domhandler": ["domhandler@5.0.3", "", { "dependencies": { "domelementtype": "^2.3.0" } }, "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w=="], + + "domutils": ["domutils@3.2.2", "", { "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", "domhandler": "^5.0.3" } }, "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw=="], + + "dset": ["dset@3.1.4", "", {}, "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA=="], + + "dts-resolver": ["dts-resolver@2.1.3", "", { "peerDependencies": { "oxc-resolver": ">=11.0.0" }, "optionalPeers": ["oxc-resolver"] }, "sha512-bihc7jPC90VrosXNzK0LTE2cuLP6jr0Ro8jk+kMugHReJVLIpHz/xadeq3MhuwyO4TD4OA3L1Q8pBBFRc08Tsw=="], + + "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], + + "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], + + "effect": ["effect@4.0.0-beta.45", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "fast-check": "^4.5.3", "find-my-way-ts": "^0.1.6", "ini": "^6.0.0", "kubernetes-types": "^1.30.0", "msgpackr": "^1.11.8", "multipasta": "^0.2.7", "toml": "^3.0.0", "uuid": "^13.0.0", "yaml": "^2.8.2" } }, "sha512-vvNrUWqnzBIW1hRMa+zw0CLRW6HLgdu7hQ6K7PT/rS+UY/73Ma11O+Oi9oc9zwL8KcN37M47UDseAdlF0bGNWw=="], + + "effect-acp": ["effect-acp@workspace:packages/effect-acp"], + + "effect-codex-app-server": ["effect-codex-app-server@workspace:packages/effect-codex-app-server"], + + "electron": ["electron@40.6.0", "", { "dependencies": { "@electron/get": "^2.0.0", "@types/node": "^24.9.0", "extract-zip": "^2.0.1" }, "bin": { "electron": "cli.js" } }, "sha512-ett8W+yOFGDuM0vhJMamYSkrbV3LoaffzJd9GfjI96zRAxyrNqUSKqBpf/WGbQCweDxX2pkUCUfrv4wwKpsFZA=="], + + "electron-to-chromium": ["electron-to-chromium@1.5.340", "", {}, "sha512-908qahOGocRMinT2nM3ajCEM99H4iPdv84eagPP3FfZy/1ZGeOy2CZYzjhms81ckOPCXPlW7LkY4XpxD8r1DrA=="], + + "electron-updater": ["electron-updater@6.8.3", "", { "dependencies": { "builder-util-runtime": "9.5.1", "fs-extra": "^10.1.0", "js-yaml": "^4.1.0", "lazy-val": "^1.0.5", "lodash.escaperegexp": "^4.1.2", "lodash.isequal": "^4.5.0", "semver": "~7.7.3", "tiny-typed-emitter": "^2.1.0" } }, "sha512-Z6sgw3jgbikWKXei1ENdqFOxBP0WlXg3TtKfz0rgw2vIZFJUyI4pD7ZN7jrkm7EoMK+tcm/qTnPUdqfZukBlBQ=="], + + "emmet": ["emmet@2.4.11", "", { "dependencies": { "@emmetio/abbreviation": "^2.3.3", "@emmetio/css-abbreviation": "^2.1.8" } }, "sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ=="], + + "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "empathic": ["empathic@2.0.0", "", {}, "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA=="], + + "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], + + "end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="], + + "enhanced-resolve": ["enhanced-resolve@5.20.1", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.0" } }, "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA=="], + + "entities": ["entities@6.0.1", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="], + + "env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="], + + "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], + + "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], + + "es-module-lexer": ["es-module-lexer@2.0.0", "", {}, "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw=="], + + "es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="], + + "es6-error": ["es6-error@4.1.1", "", {}, "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg=="], + + "esbuild": ["esbuild@0.27.7", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.7", "@esbuild/android-arm": "0.27.7", "@esbuild/android-arm64": "0.27.7", "@esbuild/android-x64": "0.27.7", "@esbuild/darwin-arm64": "0.27.7", "@esbuild/darwin-x64": "0.27.7", "@esbuild/freebsd-arm64": "0.27.7", "@esbuild/freebsd-x64": "0.27.7", "@esbuild/linux-arm": "0.27.7", "@esbuild/linux-arm64": "0.27.7", "@esbuild/linux-ia32": "0.27.7", "@esbuild/linux-loong64": "0.27.7", "@esbuild/linux-mips64el": "0.27.7", "@esbuild/linux-ppc64": "0.27.7", "@esbuild/linux-riscv64": "0.27.7", "@esbuild/linux-s390x": "0.27.7", "@esbuild/linux-x64": "0.27.7", "@esbuild/netbsd-arm64": "0.27.7", "@esbuild/netbsd-x64": "0.27.7", "@esbuild/openbsd-arm64": "0.27.7", "@esbuild/openbsd-x64": "0.27.7", "@esbuild/openharmony-arm64": "0.27.7", "@esbuild/sunos-x64": "0.27.7", "@esbuild/win32-arm64": "0.27.7", "@esbuild/win32-ia32": "0.27.7", "@esbuild/win32-x64": "0.27.7" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], + + "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], + + "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], + + "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], + + "eventemitter3": ["eventemitter3@5.0.4", "", {}, "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw=="], + + "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], + + "eventsource-parser": ["eventsource-parser@3.0.7", "", {}, "sha512-zwxwiQqexizSXFZV13zMiEtW1E3lv7RlUv+1f5FBiR4x7wFhEjm3aFTyYkZQWzyN08WnPdox015GoRH5D/E5YA=="], + + "expect-type": ["expect-type@1.3.0", "", {}, "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA=="], + + "express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], + + "express-rate-limit": ["express-rate-limit@8.3.2", "", { "dependencies": { "ip-address": "10.1.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-77VmFeJkO0/rvimEDuUC5H30oqUC4EyOhyGccfqoLebB0oiEYfM7nwPrsDsBL1gsTpwfzX8SFy2MT3TDyRq+bg=="], + + "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], + + "extract-zip": ["extract-zip@2.0.1", "", { "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "optionalDependencies": { "@types/yauzl": "^2.9.1" }, "bin": { "extract-zip": "cli.js" } }, "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg=="], + + "fast-check": ["fast-check@4.7.0", "", { "dependencies": { "pure-rand": "^8.0.0" } }, "sha512-NsZRtqvSSoCP0HbNjUD+r1JH8zqZalyp6gLY9e7OYs7NK9b6AHOs2baBFeBG7bVNsuoukh89x2Yg3rPsul8ziQ=="], + + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + + "fast-string-truncated-width": ["fast-string-truncated-width@1.2.1", "", {}, "sha512-Q9acT/+Uu3GwGj+5w/zsGuQjh9O1TyywhIwAxHudtWrgF09nHOPrvTLhQevPbttcxjr/SNN7mJmfOw/B1bXgow=="], + + "fast-string-width": ["fast-string-width@1.1.0", "", { "dependencies": { "fast-string-truncated-width": "^1.2.0" } }, "sha512-O3fwIVIH5gKB38QNbdg+3760ZmGz0SZMgvwJbA1b2TGXceKE6A2cOlfogh1iw8lr049zPyd7YADHy+B7U4W9bQ=="], + + "fast-uri": ["fast-uri@3.1.0", "", {}, "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA=="], + + "fast-wrap-ansi": ["fast-wrap-ansi@0.1.6", "", { "dependencies": { "fast-string-width": "^1.1.0" } }, "sha512-HlUwET7a5gqjURj70D5jl7aC3Zmy4weA1SHUfM0JFI0Ptq987NH2TwbBFLoERhfwk+E+eaq4EK3jXoT+R3yp3w=="], + + "fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "finalhandler": ["finalhandler@2.1.1", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="], + + "find-my-way-ts": ["find-my-way-ts@0.1.6", "", {}, "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA=="], + + "flattie": ["flattie@1.1.1", "", {}, "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ=="], + + "fontace": ["fontace@0.4.1", "", { "dependencies": { "fontkitten": "^1.0.2" } }, "sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw=="], + + "fontkitten": ["fontkitten@1.0.3", "", { "dependencies": { "tiny-inflate": "^1.0.3" } }, "sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw=="], + + "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], + + "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], + + "fs-extra": ["fs-extra@10.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ=="], + + "fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], + + "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], + + "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], + + "get-stream": ["get-stream@5.2.0", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="], + + "get-tsconfig": ["get-tsconfig@4.14.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA=="], + + "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], + + "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "global-agent": ["global-agent@3.0.0", "", { "dependencies": { "boolean": "^3.0.1", "es6-error": "^4.1.1", "matcher": "^3.0.0", "roarr": "^2.15.3", "semver": "^7.3.2", "serialize-error": "^7.0.1" } }, "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q=="], + + "globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="], + + "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], + + "got": ["got@11.8.6", "", { "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" } }, "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g=="], + + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + + "graphql": ["graphql@16.13.2", "", {}, "sha512-5bJ+nf/UCpAjHM8i06fl7eLyVC9iuNAjm9qzkiu2ZGhM0VscSvS6WDPfAwkdkBuoXGM9FJSbKl6wylMwP9Ktig=="], + + "h3": ["h3@1.15.11", "", { "dependencies": { "cookie-es": "^1.2.3", "crossws": "^0.3.5", "defu": "^6.1.6", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.4", "radix3": "^1.1.2", "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, "sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg=="], + + "has-property-descriptors": ["has-property-descriptors@1.0.2", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="], + + "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], + + "hasown": ["hasown@2.0.3", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg=="], + + "hast-util-from-html": ["hast-util-from-html@2.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.1.0", "hast-util-from-parse5": "^8.0.0", "parse5": "^7.0.0", "vfile": "^6.0.0", "vfile-message": "^4.0.0" } }, "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw=="], + + "hast-util-from-parse5": ["hast-util-from-parse5@8.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "hastscript": "^9.0.0", "property-information": "^7.0.0", "vfile": "^6.0.0", "vfile-location": "^5.0.0", "web-namespaces": "^2.0.0" } }, "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg=="], + + "hast-util-is-element": ["hast-util-is-element@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g=="], + + "hast-util-parse-selector": ["hast-util-parse-selector@4.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A=="], + + "hast-util-raw": ["hast-util-raw@9.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "@ungap/structured-clone": "^1.0.0", "hast-util-from-parse5": "^8.0.0", "hast-util-to-parse5": "^8.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "parse5": "^7.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0", "web-namespaces": "^2.0.0", "zwitch": "^2.0.0" } }, "sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw=="], + + "hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="], + + "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.6", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg=="], + + "hast-util-to-parse5": ["hast-util-to-parse5@8.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "web-namespaces": "^2.0.0", "zwitch": "^2.0.0" } }, "sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA=="], + + "hast-util-to-text": ["hast-util-to-text@4.0.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "hast-util-is-element": "^3.0.0", "unist-util-find-after": "^5.0.0" } }, "sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A=="], + + "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], + + "hastscript": ["hastscript@9.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0" } }, "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w=="], + + "headers-polyfill": ["headers-polyfill@4.0.3", "", {}, "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ=="], + + "hono": ["hono@4.12.14", "", {}, "sha512-am5zfg3yu6sqn5yjKBNqhnTX7Cv+m00ox+7jbaKkrLMRJ4rAdldd1xPd/JzbBWspqaQv6RSTrgFN95EsfhC+7w=="], + + "hookable": ["hookable@6.1.1", "", {}, "sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ=="], + + "html-escaper": ["html-escaper@3.0.3", "", {}, "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ=="], + + "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="], + + "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], + + "http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="], + + "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], + + "http2-wrapper": ["http2-wrapper@1.0.3", "", { "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" } }, "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg=="], + + "iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], + + "import-without-cache": ["import-without-cache@0.2.5", "", {}, "sha512-B6Lc2s6yApwnD2/pMzFh/d5AVjdsDXjgkeJ766FmFuJELIGHNycKRj+l3A39yZPM4CchqNCB4RITEAYB1KUM6A=="], + + "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], + + "ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="], + + "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], + + "ioredis": ["ioredis@5.10.1", "", { "dependencies": { "@ioredis/commands": "1.5.1", "cluster-key-slot": "^1.1.0", "debug": "^4.3.4", "denque": "^2.1.0", "lodash.defaults": "^4.2.0", "lodash.isarguments": "^3.1.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.1.0" } }, "sha512-HuEDBTI70aYdx1v6U97SbNx9F1+svQKBDo30o0b9fw055LMepzpOOd0Ccg9Q6tbqmBSJaMuY0fB7yw9/vjBYCA=="], + + "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="], + + "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], + + "iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="], + + "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], + + "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="], + + "is-binary-path": ["is-binary-path@2.1.0", "", { "dependencies": { "binary-extensions": "^2.0.0" } }, "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="], + + "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], + + "is-docker": ["is-docker@3.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + + "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], + + "is-inside-container": ["is-inside-container@1.0.0", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="], + + "is-node-process": ["is-node-process@1.2.0", "", {}, "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], + + "is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="], + + "is-wsl": ["is-wsl@3.1.1", "", { "dependencies": { "is-inside-container": "^1.0.0" } }, "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw=="], + + "isbot": ["isbot@5.1.39", "", {}, "sha512-obH0yYahGXdzNxo+djmHhBYThUKDkz565cxkIlt2L9hXfv1NlaLKoDBHo6KxXsYrIXx2RK3x5vY36CfZcobxEw=="], + + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "isomorphic.js": ["isomorphic.js@0.2.5", "", {}, "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw=="], + + "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + + "jose": ["jose@6.2.2", "", {}, "sha512-d7kPDd34KO/YnzaDOlikGpOurfF0ByC2sEV4cANCtdqLlTfBlw2p14O/5d/zv40gJPbIQxfES3nSx1/oYNyuZQ=="], + + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + + "js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="], + + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], + + "json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="], + + "json-schema-to-ts": ["json-schema-to-ts@3.1.1", "", { "dependencies": { "@babel/runtime": "^7.18.3", "ts-algebra": "^2.0.0" } }, "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g=="], + + "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + + "json-schema-typed": ["json-schema-typed@8.0.2", "", {}, "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA=="], + + "json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="], + + "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + + "jsonc-parser": ["jsonc-parser@2.3.1", "", {}, "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg=="], + + "jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="], + + "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], + + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], + + "kubernetes-types": ["kubernetes-types@1.30.0", "", {}, "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q=="], + + "lazy-val": ["lazy-val@1.0.5", "", {}, "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q=="], + + "lexical": ["lexical@0.41.0", "", {}, "sha512-pNIm5+n+hVnJHB9gYPDYsIO5Y59dNaDU9rJmPPsfqQhP2ojKFnUoPbcRnrI9FJLXB14sSumcY8LUw7Sq70TZqA=="], + + "lib0": ["lib0@0.2.117", "", { "dependencies": { "isomorphic.js": "^0.2.4" }, "bin": { "0serve": "bin/0serve.js", "0gentesthtml": "bin/gentesthtml.js", "0ecdsa-generate-keypair": "bin/0ecdsa-generate-keypair.js" } }, "sha512-DeXj9X5xDCjgKLU/7RR+/HQEVzuuEUiwldwOGsHK/sfAfELGWEyTcf0x+uOvCvK3O2zPmZePXWL85vtia6GyZw=="], + + "lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="], + + "lightningcss-android-arm64": ["lightningcss-android-arm64@1.32.0", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="], + + "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.32.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="], + + "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.32.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w=="], + + "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.32.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig=="], + + "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.32.0", "", { "os": "linux", "cpu": "arm" }, "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw=="], + + "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ=="], + + "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg=="], + + "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA=="], + + "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg=="], + + "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.32.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw=="], + + "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.32.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q=="], + + "lodash.defaults": ["lodash.defaults@4.2.0", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="], + + "lodash.escaperegexp": ["lodash.escaperegexp@4.1.2", "", {}, "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw=="], + + "lodash.isarguments": ["lodash.isarguments@3.1.0", "", {}, "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg=="], + + "lodash.isequal": ["lodash.isequal@4.5.0", "", {}, "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="], + + "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], + + "lowercase-keys": ["lowercase-keys@2.0.0", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="], + + "lru-cache": ["lru-cache@11.3.5", "", {}, "sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw=="], + + "lru_map": ["lru_map@0.4.1", "", {}, "sha512-I+lBvqMMFfqaV8CJCISjI3wbjmwVu/VyOoU7+qtu9d7ioW5klMgsTTiUOUp+DJvfTTzKXoPbyC6YfgkNcyPSOg=="], + + "lucide-react": ["lucide-react@0.564.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-JJ8GVTQqFwuliifD48U6+h7DXEHdkhJ/E87kksGByII3qHxtPciVb8T8woQONHBQgHVOl7rSMrrip3SeVNy7Fg=="], + + "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], + + "magicast": ["magicast@0.5.2", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "source-map-js": "^1.2.1" } }, "sha512-E3ZJh4J3S9KfwdjZhe2afj6R9lGIN5Pher1pF39UGrXRqq/VDaGVIGN13BjHd2u8B61hArAGOnso7nBOouW3TQ=="], + + "markdown-table": ["markdown-table@3.0.4", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="], + + "matcher": ["matcher@3.0.0", "", { "dependencies": { "escape-string-regexp": "^4.0.0" } }, "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng=="], + + "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], + + "mdast-util-definitions": ["mdast-util-definitions@6.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-scTllyX6pnYNZH/AIp/0ePz6s4cZtARxImwoPJ7kS42n+MnVsI4XbnG6d4ibehRIldYMWM2LD7ImQblVhUejVQ=="], + + "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg=="], + + "mdast-util-from-markdown": ["mdast-util-from-markdown@2.0.3", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q=="], + + "mdast-util-gfm": ["mdast-util-gfm@3.1.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-autolink-literal": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-strikethrough": "^2.0.0", "mdast-util-gfm-table": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ=="], + + "mdast-util-gfm-autolink-literal": ["mdast-util-gfm-autolink-literal@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-find-and-replace": "^3.0.0", "micromark-util-character": "^2.0.0" } }, "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ=="], + + "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], + + "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg=="], + + "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg=="], + + "mdast-util-gfm-task-list-item": ["mdast-util-gfm-task-list-item@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ=="], + + "mdast-util-mdx-expression": ["mdast-util-mdx-expression@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ=="], + + "mdast-util-mdx-jsx": ["mdast-util-mdx-jsx@3.2.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" } }, "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q=="], + + "mdast-util-mdxjs-esm": ["mdast-util-mdxjs-esm@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg=="], + + "mdast-util-phrasing": ["mdast-util-phrasing@4.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "unist-util-is": "^6.0.0" } }, "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w=="], + + "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], + + "mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA=="], + + "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], + + "mdn-data": ["mdn-data@2.27.1", "", {}, "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ=="], + + "media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="], + + "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], + + "micromark": ["micromark@4.0.2", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA=="], + + "micromark-core-commonmark": ["micromark-core-commonmark@2.0.3", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg=="], + + "micromark-extension-gfm": ["micromark-extension-gfm@3.0.0", "", { "dependencies": { "micromark-extension-gfm-autolink-literal": "^2.0.0", "micromark-extension-gfm-footnote": "^2.0.0", "micromark-extension-gfm-strikethrough": "^2.0.0", "micromark-extension-gfm-table": "^2.0.0", "micromark-extension-gfm-tagfilter": "^2.0.0", "micromark-extension-gfm-task-list-item": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w=="], + + "micromark-extension-gfm-autolink-literal": ["micromark-extension-gfm-autolink-literal@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw=="], + + "micromark-extension-gfm-footnote": ["micromark-extension-gfm-footnote@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw=="], + + "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], + + "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg=="], + + "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], + + "micromark-extension-gfm-task-list-item": ["micromark-extension-gfm-task-list-item@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw=="], + + "micromark-factory-destination": ["micromark-factory-destination@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA=="], + + "micromark-factory-label": ["micromark-factory-label@2.0.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg=="], + + "micromark-factory-space": ["micromark-factory-space@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg=="], + + "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], + + "micromark-factory-whitespace": ["micromark-factory-whitespace@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ=="], + + "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], + + "micromark-util-chunked": ["micromark-util-chunked@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA=="], + + "micromark-util-classify-character": ["micromark-util-classify-character@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q=="], + + "micromark-util-combine-extensions": ["micromark-util-combine-extensions@2.0.1", "", { "dependencies": { "micromark-util-chunked": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg=="], + + "micromark-util-decode-numeric-character-reference": ["micromark-util-decode-numeric-character-reference@2.0.2", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw=="], + + "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], + + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], + + "micromark-util-html-tag-name": ["micromark-util-html-tag-name@2.0.1", "", {}, "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA=="], + + "micromark-util-normalize-identifier": ["micromark-util-normalize-identifier@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q=="], + + "micromark-util-resolve-all": ["micromark-util-resolve-all@2.0.1", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg=="], + + "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], + + "micromark-util-subtokenize": ["micromark-util-subtokenize@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA=="], + + "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], + + "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], + + "mime": ["mime@4.1.0", "", { "bin": { "mime": "bin/cli.js" } }, "sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw=="], + + "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], + + "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="], + + "mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="], + + "mrmime": ["mrmime@2.0.1", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "msgpackr": ["msgpackr@1.11.9", "", { "optionalDependencies": { "msgpackr-extract": "^3.0.2" } }, "sha512-FkoAAyyA6HM8wL882EcEyFZ9s7hVADSwG9xrVx3dxxNQAtgADTrJoEWivID82Iv1zWDsv/OtbrrcZAzGzOMdNw=="], + + "msgpackr-extract": ["msgpackr-extract@3.0.3", "", { "dependencies": { "node-gyp-build-optional-packages": "5.2.2" }, "optionalDependencies": { "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" }, "bin": { "download-msgpackr-prebuilds": "bin/download-prebuilds.js" } }, "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA=="], + + "msw": ["msw@2.12.11", "", { "dependencies": { "@inquirer/confirm": "^5.0.0", "@mswjs/interceptors": "^0.41.2", "@open-draft/deferred-promise": "^2.2.0", "@types/statuses": "^2.0.6", "cookie": "^1.0.2", "graphql": "^16.12.0", "headers-polyfill": "^4.0.2", "is-node-process": "^1.2.0", "outvariant": "^1.4.3", "path-to-regexp": "^6.3.0", "picocolors": "^1.1.1", "rettime": "^0.10.1", "statuses": "^2.0.2", "strict-event-emitter": "^0.5.1", "tough-cookie": "^6.0.0", "type-fest": "^5.2.0", "until-async": "^3.0.2", "yargs": "^17.7.2" }, "peerDependencies": { "typescript": ">= 4.8.x" }, "optionalPeers": ["typescript"], "bin": { "msw": "cli/index.js" } }, "sha512-dVg20zi2I2EvnwH/+WupzsOC2mCa7qsIhyMAWtfRikn6RKtwL9+7SaF1IQ5LyZry4tlUtf6KyTVhnlQiZXozTQ=="], + + "muggle-string": ["muggle-string@0.4.1", "", {}, "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ=="], + + "multipasta": ["multipasta@0.2.7", "", {}, "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA=="], + + "mute-stream": ["mute-stream@2.0.0", "", {}, "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA=="], + + "nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], + + "negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="], + + "neotraverse": ["neotraverse@0.6.18", "", {}, "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA=="], + + "nlcst-to-string": ["nlcst-to-string@4.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0" } }, "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA=="], + + "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], + + "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], + + "node-gyp-build-optional-packages": ["node-gyp-build-optional-packages@5.2.2", "", { "dependencies": { "detect-libc": "^2.0.1" }, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw=="], + + "node-mock-http": ["node-mock-http@1.0.4", "", {}, "sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ=="], + + "node-pty": ["node-pty@1.1.0", "", { "dependencies": { "node-addon-api": "^7.1.0" } }, "sha512-20JqtutY6JPXTUnL0ij1uad7Qe1baT46lyolh2sSENDd4sTzKZ4nmAFkeAARDKwmlLjPx6XKRlwRUxwjOy+lUg=="], + + "node-releases": ["node-releases@2.0.37", "", {}, "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "normalize-url": ["normalize-url@6.1.0", "", {}, "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A=="], + + "nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="], + + "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], + + "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], + + "object-keys": ["object-keys@1.1.1", "", {}, "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="], + + "obug": ["obug@2.1.1", "", {}, "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ=="], + + "ofetch": ["ofetch@1.5.1", "", { "dependencies": { "destr": "^2.0.5", "node-fetch-native": "^1.6.7", "ufo": "^1.6.1" } }, "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA=="], + + "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], + + "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], + + "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], + + "oniguruma-parser": ["oniguruma-parser@0.12.1", "", {}, "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w=="], + + "oniguruma-to-es": ["oniguruma-to-es@4.3.5", "", { "dependencies": { "oniguruma-parser": "^0.12.1", "regex": "^6.1.0", "regex-recursion": "^6.0.2" } }, "sha512-Zjygswjpsewa0NLTsiizVuMQZbp0MDyM6lIt66OxsF21npUDlzpHi1Mgb/qhQdkb+dWFTzJmFbEWdvZgRho8eQ=="], + + "open": ["open@10.2.0", "", { "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", "wsl-utils": "^0.1.0" } }, "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA=="], + + "outvariant": ["outvariant@1.4.3", "", {}, "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA=="], + + "oxfmt": ["oxfmt@0.40.0", "", { "dependencies": { "tinypool": "2.1.0" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.40.0", "@oxfmt/binding-android-arm64": "0.40.0", "@oxfmt/binding-darwin-arm64": "0.40.0", "@oxfmt/binding-darwin-x64": "0.40.0", "@oxfmt/binding-freebsd-x64": "0.40.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.40.0", "@oxfmt/binding-linux-arm-musleabihf": "0.40.0", "@oxfmt/binding-linux-arm64-gnu": "0.40.0", "@oxfmt/binding-linux-arm64-musl": "0.40.0", "@oxfmt/binding-linux-ppc64-gnu": "0.40.0", "@oxfmt/binding-linux-riscv64-gnu": "0.40.0", "@oxfmt/binding-linux-riscv64-musl": "0.40.0", "@oxfmt/binding-linux-s390x-gnu": "0.40.0", "@oxfmt/binding-linux-x64-gnu": "0.40.0", "@oxfmt/binding-linux-x64-musl": "0.40.0", "@oxfmt/binding-openharmony-arm64": "0.40.0", "@oxfmt/binding-win32-arm64-msvc": "0.40.0", "@oxfmt/binding-win32-ia32-msvc": "0.40.0", "@oxfmt/binding-win32-x64-msvc": "0.40.0" }, "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-g0C3I7xUj4b4DcagevM9kgH6+pUHytikxUcn3/VUkvzTNaaXBeyZqb7IBsHwojeXm4mTBEC/aBjBTMVUkZwWUQ=="], + + "oxlint": ["oxlint@1.60.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.60.0", "@oxlint/binding-android-arm64": "1.60.0", "@oxlint/binding-darwin-arm64": "1.60.0", "@oxlint/binding-darwin-x64": "1.60.0", "@oxlint/binding-freebsd-x64": "1.60.0", "@oxlint/binding-linux-arm-gnueabihf": "1.60.0", "@oxlint/binding-linux-arm-musleabihf": "1.60.0", "@oxlint/binding-linux-arm64-gnu": "1.60.0", "@oxlint/binding-linux-arm64-musl": "1.60.0", "@oxlint/binding-linux-ppc64-gnu": "1.60.0", "@oxlint/binding-linux-riscv64-gnu": "1.60.0", "@oxlint/binding-linux-riscv64-musl": "1.60.0", "@oxlint/binding-linux-s390x-gnu": "1.60.0", "@oxlint/binding-linux-x64-gnu": "1.60.0", "@oxlint/binding-linux-x64-musl": "1.60.0", "@oxlint/binding-openharmony-arm64": "1.60.0", "@oxlint/binding-win32-arm64-msvc": "1.60.0", "@oxlint/binding-win32-ia32-msvc": "1.60.0", "@oxlint/binding-win32-x64-msvc": "1.60.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.18.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-tnRzTWiWJ9pg3ftRWnD0+Oqh78L6ZSwcEudvCZaER0PIqiAnNyXj5N1dPwjmNpDalkKS9m/WMLN1CTPUBPmsgw=="], + + "p-cancelable": ["p-cancelable@2.1.1", "", {}, "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="], + + "p-limit": ["p-limit@7.3.0", "", { "dependencies": { "yocto-queue": "^1.2.1" } }, "sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw=="], + + "p-queue": ["p-queue@9.1.2", "", { "dependencies": { "eventemitter3": "^5.0.1", "p-timeout": "^7.0.0" } }, "sha512-ktsDOALzTYTWWF1PbkNVg2rOt+HaOaMWJMUnt7T3qf5tvZ1L8dBW3tObzprBcXNMKkwj+yFSLqHso0x+UFcJXw=="], + + "p-timeout": ["p-timeout@7.0.1", "", {}, "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg=="], + + "package-manager-detector": ["package-manager-detector@1.6.0", "", {}, "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA=="], + + "parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="], + + "parse-latin": ["parse-latin@7.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "@types/unist": "^3.0.0", "nlcst-to-string": "^4.0.0", "unist-util-modify-children": "^4.0.0", "unist-util-visit-children": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ=="], + + "parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="], + + "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], + + "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="], + + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "pend": ["pend@1.2.0", "", {}, "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="], + + "piccolore": ["piccolore@0.1.3", "", {}, "sha512-o8bTeDWjE086iwKrROaDf31K0qC/BENdm15/uH9usSC/uZjJOKb2YGiVHfLY4GhwsERiPI1jmwI2XrA7ACOxVw=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@4.0.4", "", {}, "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A=="], + + "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], + + "playwright": ["playwright@1.59.1", "", { "dependencies": { "playwright-core": "1.59.1" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw=="], + + "playwright-core": ["playwright-core@1.59.1", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg=="], + + "pngjs": ["pngjs@7.0.0", "", {}, "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow=="], + + "postcss": ["postcss@8.5.10", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ=="], + + "prettier": ["prettier@3.8.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw=="], + + "prismjs": ["prismjs@1.30.0", "", {}, "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw=="], + + "progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="], + + "property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="], + + "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], + + "pump": ["pump@3.0.4", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="], + + "pure-rand": ["pure-rand@8.4.0", "", {}, "sha512-IoM8YF/jY0hiugFo/wOWqfmarlE6J0wc6fDK1PhftMk7MGhVZl88sZimmqBBFomLOCSmcCCpsfj7wXASCpvK9A=="], + + "qs": ["qs@6.15.1", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg=="], + + "quansync": ["quansync@1.0.0", "", {}, "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA=="], + + "quick-lru": ["quick-lru@5.1.1", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="], + + "radix3": ["radix3@1.1.2", "", {}, "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA=="], + + "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], + + "raw-body": ["raw-body@3.0.2", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.7.0", "unpipe": "~1.0.0" } }, "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA=="], + + "react": ["react@19.2.5", "", {}, "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA=="], + + "react-dom": ["react-dom@19.2.5", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.5" } }, "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag=="], + + "react-error-boundary": ["react-error-boundary@6.1.1", "", { "peerDependencies": { "react": "^18.0.0 || ^19.0.0" } }, "sha512-BrYwPOdXi5mqkk5lw+Uvt0ThHx32rCt3BkukS4X23A2AIWDPSGX6iaWTc0y9TU/mHDA/6qOSGel+B2ERkOvD1w=="], + + "react-markdown": ["react-markdown@10.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ=="], + + "readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], + + "redis-errors": ["redis-errors@1.2.0", "", {}, "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="], + + "redis-parser": ["redis-parser@3.0.0", "", { "dependencies": { "redis-errors": "^1.0.0" } }, "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A=="], + + "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="], + + "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="], + + "regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="], + + "rehype": ["rehype@13.0.2", "", { "dependencies": { "@types/hast": "^3.0.0", "rehype-parse": "^9.0.0", "rehype-stringify": "^10.0.0", "unified": "^11.0.0" } }, "sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A=="], + + "rehype-parse": ["rehype-parse@9.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-from-html": "^2.0.0", "unified": "^11.0.0" } }, "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag=="], + + "rehype-raw": ["rehype-raw@7.0.0", "", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-raw": "^9.0.0", "vfile": "^6.0.0" } }, "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww=="], + + "rehype-stringify": ["rehype-stringify@10.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-to-html": "^9.0.0", "unified": "^11.0.0" } }, "sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA=="], + + "remark-gfm": ["remark-gfm@4.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg=="], + + "remark-parse": ["remark-parse@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "micromark-util-types": "^2.0.0", "unified": "^11.0.0" } }, "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA=="], + + "remark-rehype": ["remark-rehype@11.1.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "mdast-util-to-hast": "^13.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw=="], + + "remark-smartypants": ["remark-smartypants@3.0.2", "", { "dependencies": { "retext": "^9.0.0", "retext-smartypants": "^6.0.0", "unified": "^11.0.4", "unist-util-visit": "^5.0.0" } }, "sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA=="], + + "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], + + "request-light": ["request-light@0.7.0", "", {}, "sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q=="], + + "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], + + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + + "reselect": ["reselect@5.1.1", "", {}, "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w=="], + + "resolve-alpn": ["resolve-alpn@1.2.1", "", {}, "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="], + + "resolve-pkg-maps": ["resolve-pkg-maps@1.0.0", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="], + + "responselike": ["responselike@2.0.1", "", { "dependencies": { "lowercase-keys": "^2.0.0" } }, "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw=="], + + "retext": ["retext@9.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "retext-latin": "^4.0.0", "retext-stringify": "^4.0.0", "unified": "^11.0.0" } }, "sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA=="], + + "retext-latin": ["retext-latin@4.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "parse-latin": "^7.0.0", "unified": "^11.0.0" } }, "sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA=="], + + "retext-smartypants": ["retext-smartypants@6.2.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "nlcst-to-string": "^4.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ=="], + + "retext-stringify": ["retext-stringify@4.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "nlcst-to-string": "^4.0.0", "unified": "^11.0.0" } }, "sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA=="], + + "rettime": ["rettime@0.10.1", "", {}, "sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw=="], + + "roarr": ["roarr@2.15.4", "", { "dependencies": { "boolean": "^3.0.1", "detect-node": "^2.0.4", "globalthis": "^1.0.1", "json-stringify-safe": "^5.0.1", "semver-compare": "^1.0.0", "sprintf-js": "^1.1.2" } }, "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A=="], + + "rolldown": ["rolldown@1.0.0-rc.3", "", { "dependencies": { "@oxc-project/types": "=0.112.0", "@rolldown/pluginutils": "1.0.0-rc.3" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.3", "@rolldown/binding-darwin-arm64": "1.0.0-rc.3", "@rolldown/binding-darwin-x64": "1.0.0-rc.3", "@rolldown/binding-freebsd-x64": "1.0.0-rc.3", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.3", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.3", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.3", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.3", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.3", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.3", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.3", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.3", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.3" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-Po/YZECDOqVXjIXrtC5h++a5NLvKAQNrd9ggrIG3sbDfGO5BqTUsrI6l8zdniKRp3r5Tp/2JTrXqx4GIguFCMw=="], + + "rolldown-plugin-dts": ["rolldown-plugin-dts@0.22.5", "", { "dependencies": { "@babel/generator": "8.0.0-rc.2", "@babel/helper-validator-identifier": "8.0.0-rc.2", "@babel/parser": "8.0.0-rc.2", "@babel/types": "8.0.0-rc.2", "ast-kit": "^3.0.0-beta.1", "birpc": "^4.0.0", "dts-resolver": "^2.1.3", "get-tsconfig": "^4.13.6", "obug": "^2.1.1" }, "peerDependencies": { "@ts-macro/tsc": "^0.3.6", "@typescript/native-preview": ">=7.0.0-dev.20250601.1", "rolldown": "^1.0.0-rc.3", "typescript": "^5.0.0 || ^6.0.0-beta", "vue-tsc": "~3.2.0" }, "optionalPeers": ["@ts-macro/tsc", "@typescript/native-preview", "typescript", "vue-tsc"] }, "sha512-M/HXfM4cboo+jONx9Z0X+CUf3B5tCi7ni+kR5fUW50Fp9AlZk0oVLesibGWgCXDKFp5lpgQ9yhKoImUFjl3VZw=="], + + "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], + + "run-applescript": ["run-applescript@7.1.0", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="], + + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + + "sax": ["sax@1.6.0", "", {}, "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA=="], + + "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + + "semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], + + "semver-compare": ["semver-compare@1.0.0", "", {}, "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow=="], + + "send": ["send@1.2.1", "", { "dependencies": { "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.1", "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.2" } }, "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ=="], + + "serialize-error": ["serialize-error@7.0.1", "", { "dependencies": { "type-fest": "^0.13.1" } }, "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw=="], + + "seroval": ["seroval@1.5.2", "", {}, "sha512-xcRN39BdsnO9Tf+VzsE7b3JyTJASItIV1FVFewJKCFcW4s4haIKS3e6vj8PGB9qBwC7tnuOywQMdv5N4qkzi7Q=="], + + "seroval-plugins": ["seroval-plugins@1.5.2", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-qpY0Cl+fKYFn4GOf3cMiq6l72CpuVaawb6ILjubOQ+diJ54LfOWaSSPsaswN8DRPIPW4Yq+tE1k5aKd7ILyaFg=="], + + "serve-static": ["serve-static@2.2.1", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw=="], + + "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], + + "sharp": ["sharp@0.34.5", "", { "dependencies": { "@img/colour": "^1.0.0", "detect-libc": "^2.1.2", "semver": "^7.7.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.5", "@img/sharp-darwin-x64": "0.34.5", "@img/sharp-libvips-darwin-arm64": "1.2.4", "@img/sharp-libvips-darwin-x64": "1.2.4", "@img/sharp-libvips-linux-arm": "1.2.4", "@img/sharp-libvips-linux-arm64": "1.2.4", "@img/sharp-libvips-linux-ppc64": "1.2.4", "@img/sharp-libvips-linux-riscv64": "1.2.4", "@img/sharp-libvips-linux-s390x": "1.2.4", "@img/sharp-libvips-linux-x64": "1.2.4", "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", "@img/sharp-libvips-linuxmusl-x64": "1.2.4", "@img/sharp-linux-arm": "0.34.5", "@img/sharp-linux-arm64": "0.34.5", "@img/sharp-linux-ppc64": "0.34.5", "@img/sharp-linux-riscv64": "0.34.5", "@img/sharp-linux-s390x": "0.34.5", "@img/sharp-linux-x64": "0.34.5", "@img/sharp-linuxmusl-arm64": "0.34.5", "@img/sharp-linuxmusl-x64": "0.34.5", "@img/sharp-wasm32": "0.34.5", "@img/sharp-win32-arm64": "0.34.5", "@img/sharp-win32-ia32": "0.34.5", "@img/sharp-win32-x64": "0.34.5" } }, "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "shiki": ["shiki@4.0.2", "", { "dependencies": { "@shikijs/core": "4.0.2", "@shikijs/engine-javascript": "4.0.2", "@shikijs/engine-oniguruma": "4.0.2", "@shikijs/langs": "4.0.2", "@shikijs/themes": "4.0.2", "@shikijs/types": "4.0.2", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ=="], + + "side-channel": ["side-channel@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="], + + "side-channel-list": ["side-channel-list@1.0.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4" } }, "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w=="], + + "side-channel-map": ["side-channel-map@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="], + + "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], + + "siginfo": ["siginfo@2.0.0", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="], + + "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + + "sirv": ["sirv@3.0.2", "", { "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", "totalist": "^3.0.0" } }, "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g=="], + + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], + + "smol-toml": ["smol-toml@1.6.1", "", {}, "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg=="], + + "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + + "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + + "sprintf-js": ["sprintf-js@1.1.3", "", {}, "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA=="], + + "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="], + + "standard-as-callback": ["standard-as-callback@2.1.0", "", {}, "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="], + + "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + + "std-env": ["std-env@4.1.0", "", {}, "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ=="], + + "strict-event-emitter": ["strict-event-emitter@0.5.1", "", {}, "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ=="], + + "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + + "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "style-to-js": ["style-to-js@1.1.21", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="], + + "style-to-object": ["style-to-object@1.0.14", "", { "dependencies": { "inline-style-parser": "0.2.7" } }, "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw=="], + + "sumchecker": ["sumchecker@3.0.1", "", { "dependencies": { "debug": "^4.1.0" } }, "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg=="], + + "svgo": ["svgo@4.0.1", "", { "dependencies": { "commander": "^11.1.0", "css-select": "^5.1.0", "css-tree": "^3.0.1", "css-what": "^6.1.0", "csso": "^5.0.5", "picocolors": "^1.1.1", "sax": "^1.5.0" }, "bin": "./bin/svgo.js" }, "sha512-XDpWUOPC6FEibaLzjfe0ucaV0YrOjYotGJO1WpF0Zd+n6ZGEQUsSugaoLq9QkEZtAfQIxT42UChcssDVPP3+/w=="], + + "t3": ["t3@workspace:apps/server"], + + "tabbable": ["tabbable@6.4.0", "", {}, "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg=="], + + "tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="], + + "tailwind-merge": ["tailwind-merge@3.5.0", "", {}, "sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A=="], + + "tailwindcss": ["tailwindcss@4.2.2", "", {}, "sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q=="], + + "tapable": ["tapable@2.3.2", "", {}, "sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA=="], + + "tiny-inflate": ["tiny-inflate@1.0.3", "", {}, "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="], + + "tiny-typed-emitter": ["tiny-typed-emitter@2.1.0", "", {}, "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA=="], + + "tinybench": ["tinybench@2.9.0", "", {}, "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg=="], + + "tinyclip": ["tinyclip@0.1.12", "", {}, "sha512-Ae3OVUqifDw0wBriIBS7yVaW44Dp6eSHQcyq4Igc7eN2TJH/2YsicswaW+J/OuMvhpDPOKEgpAZCjkb4hpoyeA=="], + + "tinyexec": ["tinyexec@1.1.1", "", {}, "sha512-VKS/ZaQhhkKFMANmAOhhXVoIfBXblQxGX1myCQ2faQrfmobMftXeJPcZGp0gS07ocvGJWDLZGyOZDadDBqYIJg=="], + + "tinyglobby": ["tinyglobby@0.2.16", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg=="], + + "tinypool": ["tinypool@2.1.0", "", {}, "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw=="], + + "tinyrainbow": ["tinyrainbow@3.1.0", "", {}, "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw=="], + + "tldts": ["tldts@7.0.28", "", { "dependencies": { "tldts-core": "^7.0.28" }, "bin": { "tldts": "bin/cli.js" } }, "sha512-+Zg3vWhRUv8B1maGSTFdev9mjoo8Etn2Ayfs4cnjlD3CsGkxXX4QyW3j2WJ0wdjYcYmy7Lx2RDsZMhgCWafKIw=="], + + "tldts-core": ["tldts-core@7.0.28", "", {}, "sha512-7W5Efjhsc3chVdFhqtaU0KtK32J37Zcr9RKtID54nG+tIpcY79CQK/veYPODxtD/LJ4Lue66jvrQzIX2Z2/pUQ=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], + + "toml": ["toml@3.0.0", "", {}, "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w=="], + + "totalist": ["totalist@3.0.1", "", {}, "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ=="], + + "tough-cookie": ["tough-cookie@6.0.1", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw=="], + + "tree-kill": ["tree-kill@1.2.2", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="], + + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], + + "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], + + "ts-algebra": ["ts-algebra@2.0.0", "", {}, "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw=="], + + "tsconfck": ["tsconfck@3.1.6", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"], "bin": { "tsconfck": "bin/tsconfck.js" } }, "sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w=="], + + "tsdown": ["tsdown@0.20.3", "", { "dependencies": { "ansis": "^4.2.0", "cac": "^6.7.14", "defu": "^6.1.4", "empathic": "^2.0.0", "hookable": "^6.0.1", "import-without-cache": "^0.2.5", "obug": "^2.1.1", "picomatch": "^4.0.3", "rolldown": "1.0.0-rc.3", "rolldown-plugin-dts": "^0.22.1", "semver": "^7.7.3", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tree-kill": "^1.2.2", "unconfig-core": "^7.4.2", "unrun": "^0.2.27" }, "peerDependencies": { "@arethetypeswrong/core": "^0.18.1", "@vitejs/devtools": "*", "publint": "^0.3.0", "typescript": "^5.0.0", "unplugin-lightningcss": "^0.4.0", "unplugin-unused": "^0.5.0" }, "optionalPeers": ["@arethetypeswrong/core", "@vitejs/devtools", "publint", "typescript", "unplugin-lightningcss", "unplugin-unused"], "bin": { "tsdown": "dist/run.mjs" } }, "sha512-qWOUXSbe4jN8JZEgrkc/uhJpC8VN2QpNu3eZkBWwNuTEjc/Ik1kcc54ycfcQ5QPRHeu9OQXaLfCI3o7pEJgB2w=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "tsx": ["tsx@4.21.0", "", { "dependencies": { "esbuild": "~0.27.0", "get-tsconfig": "^4.7.5" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw=="], + + "turbo": ["turbo@2.9.6", "", { "optionalDependencies": { "@turbo/darwin-64": "2.9.6", "@turbo/darwin-arm64": "2.9.6", "@turbo/linux-64": "2.9.6", "@turbo/linux-arm64": "2.9.6", "@turbo/windows-64": "2.9.6", "@turbo/windows-arm64": "2.9.6" }, "bin": { "turbo": "bin/turbo" } }, "sha512-+v2QJey7ZUeUiuigkU+uFfklvNUyPI2VO2vBpMYJA+a1hKFLFiKtUYlRHdb3P9CrAvMzi0upbjI4WT+zKtqkBg=="], + + "type-fest": ["type-fest@5.6.0", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-8ZiHFm91orbSAe2PSAiSVBVko18pbhbiB3U9GglSzF/zCGkR+rxpHx6sEMCUm4kxY4LjDIUGgCfUMtwfZfjfUA=="], + + "type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="], + + "typesafe-path": ["typesafe-path@0.2.2", "", {}, "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "typescript-auto-import-cache": ["typescript-auto-import-cache@0.3.6", "", { "dependencies": { "semver": "^7.3.8" } }, "sha512-RpuHXrknHdVdK7wv/8ug3Fr0WNsNi5l5aB8MYYuXhq2UH5lnEB1htJ1smhtD5VeCsGr2p8mUDtd83LCQDFVgjQ=="], + + "ufo": ["ufo@1.6.3", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="], + + "ultrahtml": ["ultrahtml@1.6.0", "", {}, "sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw=="], + + "unconfig-core": ["unconfig-core@7.5.0", "", { "dependencies": { "@quansync/fs": "^1.0.0", "quansync": "^1.0.0" } }, "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w=="], + + "uncrypto": ["uncrypto@0.1.3", "", {}, "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="], + + "undici": ["undici@7.25.0", "", {}, "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ=="], + + "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + + "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], + + "unifont": ["unifont@0.7.4", "", { "dependencies": { "css-tree": "^3.1.0", "ofetch": "^1.5.1", "ohash": "^2.0.11" } }, "sha512-oHeis4/xl42HUIeHuNZRGEvxj5AaIKR+bHPNegRq5LV1gdc3jundpONbjglKpihmJf+dswygdMJn3eftGIMemg=="], + + "unist-util-find-after": ["unist-util-find-after@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ=="], + + "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], + + "unist-util-modify-children": ["unist-util-modify-children@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "array-iterate": "^2.0.0" } }, "sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw=="], + + "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], + + "unist-util-remove-position": ["unist-util-remove-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q=="], + + "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], + + "unist-util-visit": ["unist-util-visit@5.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg=="], + + "unist-util-visit-children": ["unist-util-visit-children@3.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA=="], + + "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], + + "universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="], + + "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], + + "unplugin": ["unplugin@2.3.11", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "acorn": "^8.15.0", "picomatch": "^4.0.3", "webpack-virtual-modules": "^0.6.2" } }, "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww=="], + + "unrun": ["unrun@0.2.36", "", { "dependencies": { "rolldown": "1.0.0-rc.16" }, "peerDependencies": { "synckit": "^0.11.11" }, "optionalPeers": ["synckit"], "bin": { "unrun": "dist/cli.mjs" } }, "sha512-ICAGv44LHSKjCdI4B4rk99lJLHXBweutO4MUwu3cavMlYtXID0Tn5e1Kwe/Uj6BSAuHHXfi1JheFVCYhcXHfAg=="], + + "unstorage": ["unstorage@1.17.5", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^5.0.0", "destr": "^2.0.5", "h3": "^1.15.10", "lru-cache": "^11.2.7", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", "ufo": "^1.6.3" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/functions", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg=="], + + "until-async": ["until-async@3.0.2", "", {}, "sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw=="], + + "update-browserslist-db": ["update-browserslist-db@1.2.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w=="], + + "use-sync-external-store": ["use-sync-external-store@1.6.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="], + + "uuid": ["uuid@13.0.0", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w=="], + + "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], + + "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], + + "vfile-location": ["vfile-location@5.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg=="], + + "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], + + "vite": ["vite@8.0.8", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.8", "rolldown": "1.0.0-rc.15", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-dbU7/iLVa8KZALJyLOBOQ88nOXtNG8vxKuOT4I2mD+Ya70KPceF4IAmDsmU0h1Qsn5bPrvsY9HJstCRh3hG6Uw=="], + + "vitefu": ["vitefu@1.1.3", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["vite"] }, "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg=="], + + "vitest": ["vitest@4.1.4", "", { "dependencies": { "@vitest/expect": "4.1.4", "@vitest/mocker": "4.1.4", "@vitest/pretty-format": "4.1.4", "@vitest/runner": "4.1.4", "@vitest/snapshot": "4.1.4", "@vitest/spy": "4.1.4", "@vitest/utils": "4.1.4", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^4.0.0-rc.1", "tinybench": "^2.9.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tinyrainbow": "^3.1.0", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "4.1.4", "@vitest/browser-preview": "4.1.4", "@vitest/browser-webdriverio": "4.1.4", "@vitest/coverage-istanbul": "4.1.4", "@vitest/coverage-v8": "4.1.4", "@vitest/ui": "4.1.4", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/coverage-istanbul", "@vitest/coverage-v8", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-tFuJqTxKb8AvfyqMfnavXdzfy3h3sWZRWwfluGbkeR7n0HUev+FmNgZ8SDrRBTVrVCjgH5cA21qGbCffMNtWvg=="], + + "vitest-browser-react": ["vitest-browser-react@2.2.0", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "@types/react-dom": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "vitest": "^4.0.0" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-oY3KM6305kwJMa6nHo92vVtkOsih7mjEf12dLKuphaF+9ywWPEc+qanIBd394SZ6m5LadVEaG6dicvvizOzmjA=="], + + "volar-service-css": ["volar-service-css@0.0.70", "", { "dependencies": { "vscode-css-languageservice": "^6.3.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-K1qyOvBpE3rzdAv3e4/6Rv5yizrYPy5R/ne3IWCAzLBuMO4qBMV3kSqWzj6KUVe6S0AnN6wxF7cRkiaKfYMYJw=="], + + "volar-service-emmet": ["volar-service-emmet@0.0.70", "", { "dependencies": { "@emmetio/css-parser": "^0.4.1", "@emmetio/html-matcher": "^1.3.0", "@vscode/emmet-helper": "^2.9.3", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-xi5bC4m/VyE3zy/n2CXspKeDZs3qA41tHLTw275/7dNWM/RqE2z3BnDICQybHIVp/6G1iOQj5c1qXMgQC08TNg=="], + + "volar-service-html": ["volar-service-html@0.0.70", "", { "dependencies": { "vscode-html-languageservice": "^5.3.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-eR6vCgMdmYAo4n+gcT7DSyBQbwB8S3HZZvSagTf0sxNaD4WppMCFfpqWnkrlGStPKMZvMiejRRVmqsX9dYcTvQ=="], + + "volar-service-prettier": ["volar-service-prettier@0.0.70", "", { "dependencies": { "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0", "prettier": "^2.2 || ^3.0" }, "optionalPeers": ["@volar/language-service", "prettier"] }, "sha512-Z6BCFSpGVCd8BPAsZ785Kce1BGlWd5ODqmqZGVuB14MJvrR4+CYz6cDy4F+igmE1gMifqfvMhdgT8Aud4M5ngg=="], + + "volar-service-typescript": ["volar-service-typescript@0.0.70", "", { "dependencies": { "path-browserify": "^1.0.1", "semver": "^7.6.2", "typescript-auto-import-cache": "^0.3.5", "vscode-languageserver-textdocument": "^1.0.11", "vscode-nls": "^5.2.0", "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-l46Bx4cokkUedTd74ojO5H/zqHZJ8SUuyZ0IB8JN4jfRqUM3bQFBHoOwlZCyZmOeO0A3RQNkMnFclxO4c++gsg=="], + + "volar-service-typescript-twoslash-queries": ["volar-service-typescript-twoslash-queries@0.0.70", "", { "dependencies": { "vscode-uri": "^3.0.8" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-IdD13Z9N2Bu8EM6CM0fDV1E69olEYGHDU25X51YXmq8Y0CmJ2LNj6gOiBJgpS5JGUqFzECVhMNBW7R0sPdRTMQ=="], + + "volar-service-yaml": ["volar-service-yaml@0.0.70", "", { "dependencies": { "vscode-uri": "^3.0.8", "yaml-language-server": "~1.20.0" }, "peerDependencies": { "@volar/language-service": "~2.4.0" }, "optionalPeers": ["@volar/language-service"] }, "sha512-0c8bXDBeoATF9F6iPIlOuYTuZAC4c+yi0siQo920u7eiBJk8oQmUmg9cDUbR4+Gl++bvGP4plj3fErbJuPqdcQ=="], + + "vscode-css-languageservice": ["vscode-css-languageservice@6.3.10", "", { "dependencies": { "@vscode/l10n": "^0.0.18", "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "3.17.5", "vscode-uri": "^3.1.0" } }, "sha512-eq5N9Er3fC4vA9zd9EFhyBG90wtCCuXgRSpAndaOgXMh1Wgep5lBgRIeDgjZBW9pa+332yC9+49cZMW8jcL3MA=="], + + "vscode-html-languageservice": ["vscode-html-languageservice@5.6.2", "", { "dependencies": { "@vscode/l10n": "^0.0.18", "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "^3.17.5", "vscode-uri": "^3.1.0" } }, "sha512-ulCrSnFnfQ16YzvwnYUgEbUEl/ZG7u2eV27YhvLObSHKkb8fw1Z9cgsnUwjTEeDIdJDoTDTDpxuhQwoenoLNMg=="], + + "vscode-json-languageservice": ["vscode-json-languageservice@4.1.8", "", { "dependencies": { "jsonc-parser": "^3.0.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.16.0", "vscode-nls": "^5.0.0", "vscode-uri": "^3.0.2" } }, "sha512-0vSpg6Xd9hfV+eZAaYN63xVVMOTmJ4GgHxXnkLCh+9RsQBkWKIghzLhW2B9ebfG+LQQg8uLtsQ2aUKjTgE+QOg=="], + + "vscode-jsonrpc": ["vscode-jsonrpc@8.2.0", "", {}, "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA=="], + + "vscode-languageserver": ["vscode-languageserver@9.0.1", "", { "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g=="], + + "vscode-languageserver-protocol": ["vscode-languageserver-protocol@3.17.5", "", { "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" } }, "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg=="], + + "vscode-languageserver-textdocument": ["vscode-languageserver-textdocument@1.0.12", "", {}, "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA=="], + + "vscode-languageserver-types": ["vscode-languageserver-types@3.17.5", "", {}, "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg=="], + + "vscode-nls": ["vscode-nls@5.2.0", "", {}, "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng=="], + + "vscode-uri": ["vscode-uri@3.1.0", "", {}, "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ=="], + + "web-namespaces": ["web-namespaces@2.0.1", "", {}, "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ=="], + + "webpack-virtual-modules": ["webpack-virtual-modules@0.6.2", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="], + + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "which-pm-runs": ["which-pm-runs@1.1.0", "", {}, "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA=="], + + "why-is-node-running": ["why-is-node-running@2.3.0", "", { "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" }, "bin": { "why-is-node-running": "cli.js" } }, "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w=="], + + "wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + + "ws": ["ws@8.20.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA=="], + + "wsl-utils": ["wsl-utils@0.1.0", "", { "dependencies": { "is-wsl": "^3.1.0" } }, "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw=="], + + "xxhash-wasm": ["xxhash-wasm@1.1.0", "", {}, "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA=="], + + "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], + + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + + "yaml": ["yaml@2.8.3", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg=="], + + "yaml-language-server": ["yaml-language-server@1.20.0", "", { "dependencies": { "@vscode/l10n": "^0.0.18", "ajv": "^8.17.1", "ajv-draft-04": "^1.0.0", "prettier": "^3.5.0", "request-light": "^0.5.7", "vscode-json-languageservice": "4.1.8", "vscode-languageserver": "^9.0.0", "vscode-languageserver-textdocument": "^1.0.1", "vscode-languageserver-types": "^3.16.0", "vscode-uri": "^3.0.2", "yaml": "2.7.1" }, "bin": { "yaml-language-server": "bin/yaml-language-server" } }, "sha512-qhjK/bzSRZ6HtTvgeFvjNPJGWdZ0+x5NREV/9XZWFjIGezew2b4r5JPy66IfOhd5OA7KeFwk1JfmEbnTvev0cA=="], + + "yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], + + "yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="], + + "yauzl": ["yauzl@2.10.0", "", { "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g=="], + + "yjs": ["yjs@13.6.30", "", { "dependencies": { "lib0": "^0.2.99" } }, "sha512-vv/9h42eCMC81ZHDFswuu/MKzkl/vyq1BhaNGfHyOonwlG4CJbQF4oiBBJPvfdeCt/PlVDWh7Nov9D34YY09uQ=="], + + "yocto-queue": ["yocto-queue@1.2.2", "", {}, "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ=="], + + "yoctocolors-cjs": ["yoctocolors-cjs@2.1.3", "", {}, "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw=="], + + "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], + + "zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="], + + "zustand": ["zustand@5.0.12", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-i77ae3aZq4dhMlRhJVCYgMLKuSiZAaUPAct2AksxQ+gOtimhGMdXljRT21P5BNpeT4kXlLIckvkPM029OljD7g=="], + + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + + "@astrojs/language-server/@astrojs/compiler": ["@astrojs/compiler@2.13.1", "", {}, "sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg=="], + + "@babel/code-frame/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + + "@babel/core/@babel/generator": ["@babel/generator@7.29.1", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw=="], + + "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "@babel/generator/@babel/parser": ["@babel/parser@8.0.0-rc.2", "", { "dependencies": { "@babel/types": "^8.0.0-rc.2" }, "bin": "./bin/babel-parser.js" }, "sha512-29AhEtcq4x8Dp3T72qvUMZHx0OMXCj4Jy/TEReQa+KWLln524Cj1fWb3QFi0l/xSpptQBR6y9RNEXuxpFvwiUQ=="], + + "@babel/generator/@babel/types": ["@babel/types@8.0.0-rc.2", "", { "dependencies": { "@babel/helper-string-parser": "^8.0.0-rc.2", "@babel/helper-validator-identifier": "^8.0.0-rc.2" } }, "sha512-91gAaWRznDwSX4E2tZ1YjBuIfnQVOFDCQ2r0Toby0gu4XEbyF623kXLMA8d4ZbCu+fINcrudkmEcwSUHgDDkNw=="], + + "@babel/helper-compilation-targets/lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + + "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "@babel/helper-module-transforms/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + + "@babel/traverse/@babel/generator": ["@babel/generator@7.29.1", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw=="], + + "@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + + "@electron/get/fs-extra": ["fs-extra@8.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g=="], + + "@electron/get/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "@inquirer/core/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], + + "@pierre/diffs/shiki": ["shiki@3.23.0", "", { "dependencies": { "@shikijs/core": "3.23.0", "@shikijs/engine-javascript": "3.23.0", "@shikijs/engine-oniguruma": "3.23.0", "@shikijs/langs": "3.23.0", "@shikijs/themes": "3.23.0", "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA=="], + + "@rolldown/plugin-babel/rolldown": ["rolldown@1.0.0-rc.16", "", { "dependencies": { "@oxc-project/types": "=0.126.0", "@rolldown/pluginutils": "1.0.0-rc.16" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.16", "@rolldown/binding-darwin-arm64": "1.0.0-rc.16", "@rolldown/binding-darwin-x64": "1.0.0-rc.16", "@rolldown/binding-freebsd-x64": "1.0.0-rc.16", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.16", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.16", "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.16", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.16", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.16", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.16", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.16" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-rzi5WqKzEZw3SooTt7cgm4eqIoujPIyGcJNGFL7iPEuajQw7vxMHUkXylu4/vhCkJGXsgRmxqMKXUpT6FEgl0g=="], + + "@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], + + "@shikijs/transformers/@shikijs/core": ["@shikijs/core@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA=="], + + "@shikijs/transformers/@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], + + "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" }, "bundled": true }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="], + + "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="], + + "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], + + "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" }, "bundled": true }, "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow=="], + + "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], + + "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "@tanstack/react-router/@tanstack/react-store": ["@tanstack/react-store@0.9.3", "", { "dependencies": { "@tanstack/store": "0.9.3", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg=="], + + "@tanstack/router-generator/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], + + "@tanstack/router-plugin/chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], + + "@tanstack/router-plugin/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], + + "@tanstack/router-utils/@babel/generator": ["@babel/generator@7.29.1", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw=="], + + "anymatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + + "ast-kit/@babel/parser": ["@babel/parser@8.0.0-rc.2", "", { "dependencies": { "@babel/types": "^8.0.0-rc.2" }, "bin": "./bin/babel-parser.js" }, "sha512-29AhEtcq4x8Dp3T72qvUMZHx0OMXCj4Jy/TEReQa+KWLln524Cj1fWb3QFi0l/xSpptQBR6y9RNEXuxpFvwiUQ=="], + + "clone-response/mimic-response": ["mimic-response@1.0.1", "", {}, "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="], + + "csso/css-tree": ["css-tree@2.2.1", "", { "dependencies": { "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA=="], + + "dom-serializer/entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="], + + "express/cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="], + + "h3/cookie-es": ["cookie-es@1.2.3", "", {}, "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw=="], + + "mdast-util-find-and-replace/escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], + + "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], + + "rolldown/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.3", "", {}, "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q=="], + + "rolldown-plugin-dts/@babel/parser": ["@babel/parser@8.0.0-rc.2", "", { "dependencies": { "@babel/types": "^8.0.0-rc.2" }, "bin": "./bin/babel-parser.js" }, "sha512-29AhEtcq4x8Dp3T72qvUMZHx0OMXCj4Jy/TEReQa+KWLln524Cj1fWb3QFi0l/xSpptQBR6y9RNEXuxpFvwiUQ=="], + + "rolldown-plugin-dts/@babel/types": ["@babel/types@8.0.0-rc.2", "", { "dependencies": { "@babel/helper-string-parser": "^8.0.0-rc.2", "@babel/helper-validator-identifier": "^8.0.0-rc.2" } }, "sha512-91gAaWRznDwSX4E2tZ1YjBuIfnQVOFDCQ2r0Toby0gu4XEbyF623kXLMA8d4ZbCu+fINcrudkmEcwSUHgDDkNw=="], + + "router/path-to-regexp": ["path-to-regexp@8.4.2", "", {}, "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA=="], + + "serialize-error/type-fest": ["type-fest@0.13.1", "", {}, "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg=="], + + "tsx/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "unrun/rolldown": ["rolldown@1.0.0-rc.16", "", { "dependencies": { "@oxc-project/types": "=0.126.0", "@rolldown/pluginutils": "1.0.0-rc.16" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.16", "@rolldown/binding-darwin-arm64": "1.0.0-rc.16", "@rolldown/binding-darwin-x64": "1.0.0-rc.16", "@rolldown/binding-freebsd-x64": "1.0.0-rc.16", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.16", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.16", "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.16", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.16", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.16", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.16", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.16", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.16" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-rzi5WqKzEZw3SooTt7cgm4eqIoujPIyGcJNGFL7iPEuajQw7vxMHUkXylu4/vhCkJGXsgRmxqMKXUpT6FEgl0g=="], + + "unstorage/chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], + + "vite/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "vite/rolldown": ["rolldown@1.0.0-rc.15", "", { "dependencies": { "@oxc-project/types": "=0.124.0", "@rolldown/pluginutils": "1.0.0-rc.15" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.0-rc.15", "@rolldown/binding-darwin-arm64": "1.0.0-rc.15", "@rolldown/binding-darwin-x64": "1.0.0-rc.15", "@rolldown/binding-freebsd-x64": "1.0.0-rc.15", "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.15", "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.15", "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.15", "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.15", "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.15", "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.15", "@rolldown/binding-linux-x64-musl": "1.0.0-rc.15", "@rolldown/binding-openharmony-arm64": "1.0.0-rc.15", "@rolldown/binding-wasm32-wasi": "1.0.0-rc.15", "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.15", "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.15" }, "bin": { "rolldown": "bin/cli.mjs" } }, "sha512-Ff31guA5zT6WjnGp0SXw76X6hzGRk/OQq2hE+1lcDe+lJdHSgnSX6nK3erbONHyCbpSj9a9E+uX/OvytZoWp2g=="], + + "vscode-json-languageservice/jsonc-parser": ["jsonc-parser@3.3.1", "", {}, "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ=="], + + "yaml-language-server/request-light": ["request-light@0.5.8", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="], + + "yaml-language-server/yaml": ["yaml@2.7.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ=="], + + "yargs/yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="], + + "@babel/generator/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@8.0.0-rc.3", "", {}, "sha512-AmwWFx1m8G/a5cXkxLxTiWl+YEoWuoFLUCwqMlNuWO1tqAYITQAbCRPUkyBHv1VOFgfjVOqEj6L3u15J5ZCzTA=="], + + "@electron/get/fs-extra/jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="], + + "@electron/get/fs-extra/universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="], + + "@pierre/diffs/shiki/@shikijs/core": ["@shikijs/core@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA=="], + + "@pierre/diffs/shiki/@shikijs/engine-javascript": ["@shikijs/engine-javascript@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.4" } }, "sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA=="], + + "@pierre/diffs/shiki/@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g=="], + + "@pierre/diffs/shiki/@shikijs/langs": ["@shikijs/langs@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0" } }, "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg=="], + + "@pierre/diffs/shiki/@shikijs/themes": ["@shikijs/themes@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0" } }, "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA=="], + + "@pierre/diffs/shiki/@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], + + "@rolldown/plugin-babel/rolldown/@oxc-project/types": ["@oxc-project/types@0.126.0", "", {}, "sha512-oGfVtjAgwQVVpfBrbtk4e1XDyWHRFta6BS3GWVzrF8xYBT2VGQAk39yJS/wFSMrZqoiCU4oghT3Ch0HaHGIHcQ=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.0.0-rc.16", "", { "os": "android", "cpu": "arm64" }, "sha512-rhY3k7Bsae9qQfOtph2Pm2jZEA+s8Gmjoz4hhmx70K9iMQ/ddeae+xhRQcM5IuVx5ry1+bGfkvMn7D6MJggVSA=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.0.0-rc.16", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rNz0yK078yrNn3DrdgN+PKiMOW8HfQ92jQiXxwX8yW899ayV00MLVdaCNeVBhG/TbH3ouYVObo8/yrkiectkcQ=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.0.0-rc.16", "", { "os": "darwin", "cpu": "x64" }, "sha512-r/OmdR00HmD4i79Z//xO06uEPOq5hRXdhw7nzkxQxwSavs3PSHa1ijntdpOiZ2mzOQ3fVVu8C1M19FoNM+dMUQ=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.0.0-rc.16", "", { "os": "freebsd", "cpu": "x64" }, "sha512-KcRE5w8h0OnjUatG8pldyD14/CQ5Phs1oxfR+3pKDjboHRo9+MkqQaiIZlZRpsxC15paeXme/I127tUa9TXJ6g=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.16", "", { "os": "linux", "cpu": "arm" }, "sha512-bT0guA1bpxEJ/ZhTRniQf7rNF8ybvXOuWbNIeLABaV5NGjx4EtOWBTSRGWFU9ZWVkPOZ+HNFP8RMcBokBiZ0Kg=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.0.0-rc.16", "", { "os": "linux", "cpu": "arm64" }, "sha512-+tHktCHWV8BDQSjemUqm/Jl/TPk3QObCTIjmdDy/nlupcujZghmKK2962LYrqFpWu+ai01AN/REOH3NEpqvYQg=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.0.0-rc.16", "", { "os": "linux", "cpu": "arm64" }, "sha512-3fPzdREH806oRLxpTWW1Gt4tQHs0TitZFOECB2xzCFLPKnSOy90gwA7P29cksYilFO6XVRY1kzga0cL2nRjKPg=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.0.0-rc.16", "", { "os": "linux", "cpu": "x64" }, "sha512-FIb8+uG49sZBtLTn+zt1AJ20TqVcqWeSIyoVt0or7uAWesgKaHbiBh6OpA/k9v0LTt+PTrb1Lao133kP4uVxkg=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.0.0-rc.16", "", { "os": "linux", "cpu": "x64" }, "sha512-RuERhF9/EgWxZEXYWCOaViUWHIboceK4/ivdtQ3R0T44NjLkIIlGIAVAuCddFxsZ7vnRHtNQUrt2vR2n2slB2w=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.0.0-rc.16", "", { "os": "none", "cpu": "arm64" }, "sha512-mXcXnvd9GpazCxeUCCnZ2+YF7nut+ZOEbE4GtaiPtyY6AkhZWbK70y1KK3j+RDhjVq5+U8FySkKRb/+w0EeUwA=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.0.0-rc.16", "", { "dependencies": { "@emnapi/core": "1.9.2", "@emnapi/runtime": "1.9.2", "@napi-rs/wasm-runtime": "^1.1.4" }, "cpu": "none" }, "sha512-3Q2KQxnC8IJOLqXmUMoYwyIPZU9hzRbnHaoV3Euz+VVnjZKcY8ktnNP8T9R4/GGQtb27C/UYKABxesKWb8lsvQ=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.0.0-rc.16", "", { "os": "win32", "cpu": "arm64" }, "sha512-tj7XRemQcOcFwv7qhpUxMTBbI5mWMlE4c1Omhg5+h8GuLXzyj8HviYgR+bB2DMDgRqUE+jiDleqSCRjx4aYk/Q=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.0.0-rc.16", "", { "os": "win32", "cpu": "x64" }, "sha512-PH5DRZT+F4f2PTXRXR8uJxnBq2po/xFtddyabTJVJs/ZYVHqXPEgNIr35IHTEa6bpa0Q8Awg+ymkTaGnKITw4g=="], + + "@rolldown/plugin-babel/rolldown/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.16", "", {}, "sha512-45+YtqxLYKDWQouLKCrpIZhke+nXxhsw+qAHVzHDVwttyBlHNBVs2K25rDXrZzhpTp9w1FlAlvweV1H++fdZoA=="], + + "@tanstack/react-router/@tanstack/react-store/@tanstack/store": ["@tanstack/store@0.9.3", "", {}, "sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw=="], + + "@tanstack/router-plugin/chokidar/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "@tanstack/router-plugin/chokidar/readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], + + "ast-kit/@babel/parser/@babel/types": ["@babel/types@8.0.0-rc.2", "", { "dependencies": { "@babel/helper-string-parser": "^8.0.0-rc.2", "@babel/helper-validator-identifier": "^8.0.0-rc.2" } }, "sha512-91gAaWRznDwSX4E2tZ1YjBuIfnQVOFDCQ2r0Toby0gu4XEbyF623kXLMA8d4ZbCu+fINcrudkmEcwSUHgDDkNw=="], + + "csso/css-tree/mdn-data": ["mdn-data@2.0.28", "", {}, "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g=="], + + "rolldown-plugin-dts/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@8.0.0-rc.3", "", {}, "sha512-AmwWFx1m8G/a5cXkxLxTiWl+YEoWuoFLUCwqMlNuWO1tqAYITQAbCRPUkyBHv1VOFgfjVOqEj6L3u15J5ZCzTA=="], + + "unrun/rolldown/@oxc-project/types": ["@oxc-project/types@0.126.0", "", {}, "sha512-oGfVtjAgwQVVpfBrbtk4e1XDyWHRFta6BS3GWVzrF8xYBT2VGQAk39yJS/wFSMrZqoiCU4oghT3Ch0HaHGIHcQ=="], + + "unrun/rolldown/@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.0.0-rc.16", "", { "os": "android", "cpu": "arm64" }, "sha512-rhY3k7Bsae9qQfOtph2Pm2jZEA+s8Gmjoz4hhmx70K9iMQ/ddeae+xhRQcM5IuVx5ry1+bGfkvMn7D6MJggVSA=="], + + "unrun/rolldown/@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.0.0-rc.16", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rNz0yK078yrNn3DrdgN+PKiMOW8HfQ92jQiXxwX8yW899ayV00MLVdaCNeVBhG/TbH3ouYVObo8/yrkiectkcQ=="], + + "unrun/rolldown/@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.0.0-rc.16", "", { "os": "darwin", "cpu": "x64" }, "sha512-r/OmdR00HmD4i79Z//xO06uEPOq5hRXdhw7nzkxQxwSavs3PSHa1ijntdpOiZ2mzOQ3fVVu8C1M19FoNM+dMUQ=="], + + "unrun/rolldown/@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.0.0-rc.16", "", { "os": "freebsd", "cpu": "x64" }, "sha512-KcRE5w8h0OnjUatG8pldyD14/CQ5Phs1oxfR+3pKDjboHRo9+MkqQaiIZlZRpsxC15paeXme/I127tUa9TXJ6g=="], + + "unrun/rolldown/@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.16", "", { "os": "linux", "cpu": "arm" }, "sha512-bT0guA1bpxEJ/ZhTRniQf7rNF8ybvXOuWbNIeLABaV5NGjx4EtOWBTSRGWFU9ZWVkPOZ+HNFP8RMcBokBiZ0Kg=="], + + "unrun/rolldown/@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.0.0-rc.16", "", { "os": "linux", "cpu": "arm64" }, "sha512-+tHktCHWV8BDQSjemUqm/Jl/TPk3QObCTIjmdDy/nlupcujZghmKK2962LYrqFpWu+ai01AN/REOH3NEpqvYQg=="], + + "unrun/rolldown/@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.0.0-rc.16", "", { "os": "linux", "cpu": "arm64" }, "sha512-3fPzdREH806oRLxpTWW1Gt4tQHs0TitZFOECB2xzCFLPKnSOy90gwA7P29cksYilFO6XVRY1kzga0cL2nRjKPg=="], + + "unrun/rolldown/@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.0.0-rc.16", "", { "os": "linux", "cpu": "x64" }, "sha512-FIb8+uG49sZBtLTn+zt1AJ20TqVcqWeSIyoVt0or7uAWesgKaHbiBh6OpA/k9v0LTt+PTrb1Lao133kP4uVxkg=="], + + "unrun/rolldown/@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.0.0-rc.16", "", { "os": "linux", "cpu": "x64" }, "sha512-RuERhF9/EgWxZEXYWCOaViUWHIboceK4/ivdtQ3R0T44NjLkIIlGIAVAuCddFxsZ7vnRHtNQUrt2vR2n2slB2w=="], + + "unrun/rolldown/@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.0.0-rc.16", "", { "os": "none", "cpu": "arm64" }, "sha512-mXcXnvd9GpazCxeUCCnZ2+YF7nut+ZOEbE4GtaiPtyY6AkhZWbK70y1KK3j+RDhjVq5+U8FySkKRb/+w0EeUwA=="], + + "unrun/rolldown/@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.0.0-rc.16", "", { "dependencies": { "@emnapi/core": "1.9.2", "@emnapi/runtime": "1.9.2", "@napi-rs/wasm-runtime": "^1.1.4" }, "cpu": "none" }, "sha512-3Q2KQxnC8IJOLqXmUMoYwyIPZU9hzRbnHaoV3Euz+VVnjZKcY8ktnNP8T9R4/GGQtb27C/UYKABxesKWb8lsvQ=="], + + "unrun/rolldown/@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.0.0-rc.16", "", { "os": "win32", "cpu": "arm64" }, "sha512-tj7XRemQcOcFwv7qhpUxMTBbI5mWMlE4c1Omhg5+h8GuLXzyj8HviYgR+bB2DMDgRqUE+jiDleqSCRjx4aYk/Q=="], + + "unrun/rolldown/@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.0.0-rc.16", "", { "os": "win32", "cpu": "x64" }, "sha512-PH5DRZT+F4f2PTXRXR8uJxnBq2po/xFtddyabTJVJs/ZYVHqXPEgNIr35IHTEa6bpa0Q8Awg+ymkTaGnKITw4g=="], + + "unrun/rolldown/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.16", "", {}, "sha512-45+YtqxLYKDWQouLKCrpIZhke+nXxhsw+qAHVzHDVwttyBlHNBVs2K25rDXrZzhpTp9w1FlAlvweV1H++fdZoA=="], + + "unstorage/chokidar/readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="], + + "vite/rolldown/@oxc-project/types": ["@oxc-project/types@0.124.0", "", {}, "sha512-VBFWMTBvHxS11Z5Lvlr3IWgrwhMTXV+Md+EQF0Xf60+wAdsGFTBx7X7K/hP4pi8N7dcm1RvcHwDxZ16Qx8keUg=="], + + "vite/rolldown/@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.0.0-rc.15", "", { "os": "android", "cpu": "arm64" }, "sha512-YYe6aWruPZDtHNpwu7+qAHEMbQ/yRl6atqb/AhznLTnD3UY99Q1jE7ihLSahNWkF4EqRPVC4SiR4O0UkLK02tA=="], + + "vite/rolldown/@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.0.0-rc.15", "", { "os": "darwin", "cpu": "arm64" }, "sha512-oArR/ig8wNTPYsXL+Mzhs0oxhxfuHRfG7Ikw7jXsw8mYOtk71W0OkF2VEVh699pdmzjPQsTjlD1JIOoHkLP1Fg=="], + + "vite/rolldown/@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.0.0-rc.15", "", { "os": "darwin", "cpu": "x64" }, "sha512-YzeVqOqjPYvUbJSWJ4EDL8ahbmsIXQpgL3JVipmN+MX0XnXMeWomLN3Fb+nwCmP/jfyqte5I3XRSm7OfQrbyxw=="], + + "vite/rolldown/@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.0.0-rc.15", "", { "os": "freebsd", "cpu": "x64" }, "sha512-9Erhx956jeQ0nNTyif1+QWAXDRD38ZNjr//bSHrt6wDwB+QkAfl2q6Mn1k6OBPerznjRmbM10lgRb1Pli4xZPw=="], + + "vite/rolldown/@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.15", "", { "os": "linux", "cpu": "arm" }, "sha512-cVwk0w8QbZJGTnP/AHQBs5yNwmpgGYStL88t4UIaqcvYJWBfS0s3oqVLZPwsPU6M0zlW4GqjP0Zq5MnAGwFeGA=="], + + "vite/rolldown/@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.0.0-rc.15", "", { "os": "linux", "cpu": "arm64" }, "sha512-eBZ/u8iAK9SoHGanqe/jrPnY0JvBN6iXbVOsbO38mbz+ZJsaobExAm1Iu+rxa4S1l2FjG0qEZn4Rc6X8n+9M+w=="], + + "vite/rolldown/@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.0.0-rc.15", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZvRYMGrAklV9PEkgt4LQM6MjQX2P58HPAuecwYObY2DhS2t35R0I810bKi0wmaYORt6m/2Sm+Z+nFgb0WhXNcQ=="], + + "vite/rolldown/@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.15", "", { "os": "linux", "cpu": "ppc64" }, "sha512-VDpgGBzgfg5hLg+uBpCLoFG5kVvEyafmfxGUV0UHLcL5irxAK7PKNeC2MwClgk6ZAiNhmo9FLhRYgvMmedLtnQ=="], + + "vite/rolldown/@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.0.0-rc.15", "", { "os": "linux", "cpu": "s390x" }, "sha512-y1uXY3qQWCzcPgRJATPSOUP4tCemh4uBdY7e3EZbVwCJTY3gLJWnQABgeUetvED+bt1FQ01OeZwvhLS2bpNrAQ=="], + + "vite/rolldown/@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.0.0-rc.15", "", { "os": "linux", "cpu": "x64" }, "sha512-023bTPBod7J3Y/4fzAN6QtpkSABR0rigtrwaP+qSEabUh5zf6ELr9Nc7GujaROuPY3uwdSIXWrvhn1KxOvurWA=="], + + "vite/rolldown/@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.0.0-rc.15", "", { "os": "linux", "cpu": "x64" }, "sha512-witB2O0/hU4CgfOOKUoeFgQ4GktPi1eEbAhaLAIpgD6+ZnhcPkUtPsoKKHRzmOoWPZue46IThdSgdo4XneOLYw=="], + + "vite/rolldown/@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.0.0-rc.15", "", { "os": "none", "cpu": "arm64" }, "sha512-UCL68NJ0Ud5zRipXZE9dF5PmirzJE4E4BCIOOssEnM7wLDsxjc6Qb0sGDxTNRTP53I6MZpygyCpY8Aa8sPfKPg=="], + + "vite/rolldown/@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.0.0-rc.15", "", { "dependencies": { "@emnapi/core": "1.9.2", "@emnapi/runtime": "1.9.2", "@napi-rs/wasm-runtime": "^1.1.3" }, "cpu": "none" }, "sha512-ApLruZq/ig+nhaE7OJm4lDjayUnOHVUa77zGeqnqZ9pn0ovdVbbNPerVibLXDmWeUZXjIYIT8V3xkT58Rm9u5Q=="], + + "vite/rolldown/@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.0.0-rc.15", "", { "os": "win32", "cpu": "arm64" }, "sha512-KmoUoU7HnN+Si5YWJigfTws1jz1bKBYDQKdbLspz0UaqjjFkddHsqorgiW1mxcAj88lYUE6NC/zJNwT+SloqtA=="], + + "vite/rolldown/@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.0.0-rc.15", "", { "os": "win32", "cpu": "x64" }, "sha512-3P2A8L+x75qavWLe/Dll3EYBJLQmtkJN8rfh+U/eR3MqMgL/h98PhYI+JFfXuDPgPeCB7iZAKiqii5vqOvnA0g=="], + + "vite/rolldown/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.15", "", {}, "sha512-UromN0peaE53IaBRe9W7CjrZgXl90fqGpK+mIZbA3qSTeYqg3pqpROBdIPvOG3F5ereDHNwoHBI2e50n1BDr1g=="], + + "@tanstack/router-plugin/chokidar/readdirp/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + + "ast-kit/@babel/parser/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@8.0.0-rc.3", "", {}, "sha512-AmwWFx1m8G/a5cXkxLxTiWl+YEoWuoFLUCwqMlNuWO1tqAYITQAbCRPUkyBHv1VOFgfjVOqEj6L3u15J5ZCzTA=="], + } +} diff --git a/packages/contracts/src/model.ts b/packages/contracts/src/model.ts index 9fcd0d266d..59a42c5af9 100644 --- a/packages/contracts/src/model.ts +++ b/packages/contracts/src/model.ts @@ -7,8 +7,49 @@ import { ProviderDriverKind } from "./providerInstance.ts"; export const ProviderOptionDescriptorType = Schema.Literals(["select", "boolean"]); export type ProviderOptionDescriptorType = typeof ProviderOptionDescriptorType.Type; -export const ProviderOptionChoice = Schema.Struct({ - id: TrimmedNonEmptyString, +export type ProviderReasoningEffort = + | CodexReasoningEffort + | ClaudeAgentEffort + | CursorReasoningOption; + +export const CodexModelOptions = Schema.Struct({ + reasoningEffort: Schema.optional(CodexReasoningEffort), + fastMode: Schema.optional(Schema.Boolean), +}); +export type CodexModelOptions = typeof CodexModelOptions.Type; + +export const ClaudeModelOptions = Schema.Struct({ + thinking: Schema.optional(Schema.Boolean), + effort: Schema.optional(ClaudeAgentEffort), + fastMode: Schema.optional(Schema.Boolean), + contextWindow: Schema.optional(Schema.String), +}); +export type ClaudeModelOptions = typeof ClaudeModelOptions.Type; + +export const CursorModelOptions = Schema.Struct({ + reasoning: Schema.optional(CursorReasoningOption), + fastMode: Schema.optional(Schema.Boolean), + thinking: Schema.optional(Schema.Boolean), + contextWindow: Schema.optional(Schema.String), +}); +export type CursorModelOptions = typeof CursorModelOptions.Type; + +export const OpenCodeModelOptions = Schema.Struct({ + variant: Schema.optional(TrimmedNonEmptyString), + agent: Schema.optional(TrimmedNonEmptyString), +}); +export type OpenCodeModelOptions = typeof OpenCodeModelOptions.Type; + +export const ProviderModelOptions = Schema.Struct({ + codex: Schema.optional(CodexModelOptions), + claudeAgent: Schema.optional(ClaudeModelOptions), + cursor: Schema.optional(CursorModelOptions), + opencode: Schema.optional(OpenCodeModelOptions), +}); +export type ProviderModelOptions = typeof ProviderModelOptions.Type; + +export const EffortOption = Schema.Struct({ + value: TrimmedNonEmptyString, label: TrimmedNonEmptyString, description: Schema.optional(TrimmedNonEmptyString), isDefault: Schema.optional(Schema.Boolean), @@ -214,12 +255,9 @@ export const MODEL_SLUG_ALIASES_BY_PROVIDER: Partial< [OPENCODE_DRIVER_KIND]: {}, }; -// ── Provider display names ──────────────────────────────────────────── - -export const PROVIDER_DISPLAY_NAMES: Partial> = { - [CODEX_DRIVER_KIND]: "Codex", - [CLAUDE_DRIVER_KIND]: "Claude", - [CURSOR_DRIVER_KIND]: "Cursor", - [GROK_DRIVER_KIND]: "Grok", - [OPENCODE_DRIVER_KIND]: "OpenCode", +export const PROVIDER_DISPLAY_NAMES: Record = { + codex: "Codex", + claudeAgent: "Claude", + cursor: "Cursor", + opencode: "OpenCode", }; diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.ts index 35fef721ef..3c8b17ff68 100644 --- a/packages/contracts/src/orchestration.ts +++ b/packages/contracts/src/orchestration.ts @@ -34,6 +34,12 @@ export const ORCHESTRATION_WS_METHODS = { subscribeThread: "orchestration.subscribeThread", } as const; +export const ORCHESTRATION_WS_CHANNELS = { + domainEvent: "orchestration.domainEvent", +} as const; + +export const ProviderKind = Schema.Literals(["codex", "claudeAgent", "cursor", "opencode"]); +export type ProviderKind = typeof ProviderKind.Type; export const ProviderApprovalPolicy = Schema.Literals([ "untrusted", "on-failure", diff --git a/packages/contracts/src/providerRuntime.ts b/packages/contracts/src/providerRuntime.ts index bd525e6542..17ba5ff5ad 100644 --- a/packages/contracts/src/providerRuntime.ts +++ b/packages/contracts/src/providerRuntime.ts @@ -25,7 +25,6 @@ const RuntimeEventRawSource = Schema.Union([ Schema.Literal("claude.sdk.message"), Schema.Literal("claude.sdk.permission"), Schema.Literal("codex.sdk.thread-event"), - Schema.Literal("opencode.sdk.event"), Schema.Literal("acp.jsonrpc"), Schema.TemplateLiteral(["acp.", Schema.String, ".extension"]), ]); diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts index ee1970639a..fa128a4127 100644 --- a/packages/contracts/src/settings.ts +++ b/packages/contracts/src/settings.ts @@ -363,39 +363,12 @@ export const ClaudeSettings = makeProviderSettingsSchema( ); export type ClaudeSettings = typeof ClaudeSettings.Type; -export const CursorSettings = makeProviderSettingsSchema( - { - enabled: Schema.Boolean.pipe( - Schema.withDecodingDefault(Effect.succeed(false)), - Schema.annotateKey({ providerSettingsForm: { hidden: true } }), - ), - binaryPath: makeBinaryPathSetting("cursor-agent").pipe( - Schema.annotateKey({ - title: "Binary path", - description: "Path to the Cursor agent binary.", - providerSettingsForm: { placeholder: "cursor-agent", clearWhenEmpty: "omit" }, - }), - ), - apiEndpoint: TrimmedString.pipe( - Schema.withDecodingDefault(Effect.succeed("")), - Schema.annotateKey({ - title: "API endpoint", - description: "Override the Cursor API endpoint for this instance.", - providerSettingsForm: { - placeholder: "https://...", - clearWhenEmpty: "omit", - }, - }), - ), - customModels: Schema.Array(Schema.String).pipe( - Schema.withDecodingDefault(Effect.succeed([])), - Schema.annotateKey({ providerSettingsForm: { hidden: true } }), - ), - }, - { - order: ["binaryPath", "apiEndpoint"], - }, -); +export const CursorSettings = Schema.Struct({ + enabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), + binaryPath: makeBinaryPathSetting("agent"), + apiEndpoint: TrimmedString.pipe(Schema.withDecodingDefault(Effect.succeed(""))), + customModels: Schema.Array(Schema.String).pipe(Schema.withDecodingDefault(Effect.succeed([]))), +}); export type CursorSettings = typeof CursorSettings.Type; export const GrokSettings = makeProviderSettingsSchema( diff --git a/packages/effect-codex-app-server/package.json b/packages/effect-codex-app-server/package.json index a067976c61..01249f5608 100644 --- a/packages/effect-codex-app-server/package.json +++ b/packages/effect-codex-app-server/package.json @@ -25,19 +25,24 @@ } }, "scripts": { - "typecheck": "tsgo --noEmit", - "test": "vp test run", - "generate": "node scripts/generate.ts", - "probe": "node test/examples/codex-app-server-probe.ts" + "dev": "tsdown src/client.ts src/rpc.ts src/protocol.ts src/schema.ts --format esm,cjs --dts --watch --clean", + "build": "tsdown src/client.ts src/rpc.ts src/protocol.ts src/schema.ts --format esm,cjs --dts --clean", + "prepare": "effect-language-service patch", + "typecheck": "tsc --noEmit", + "test": "vitest run", + "generate": "bun run scripts/generate.ts", + "probe": "bun run test/examples/codex-app-server-probe.ts" }, "dependencies": { "effect": "catalog:" }, "devDependencies": { + "@effect/language-service": "catalog:", "@effect/openapi-generator": "catalog:", "@effect/platform-node": "catalog:", "@effect/vitest": "catalog:", - "@types/node": "catalog:", - "vite-plus": "catalog:" + "tsdown": "catalog:", + "typescript": "catalog:", + "vitest": "catalog:" } } diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts index 9f23a14452..5f0991c39f 100644 --- a/packages/effect-codex-app-server/scripts/generate.ts +++ b/packages/effect-codex-app-server/scripts/generate.ts @@ -3,21 +3,10 @@ import * as NodeRuntime from "@effect/platform-node/NodeRuntime"; import * as NodeServices from "@effect/platform-node/NodeServices"; import { make as makeJsonSchemaGenerator } from "@effect/openapi-generator/JsonSchemaGenerator"; -import * as Effect from "effect/Effect"; -import * as FileSystem from "effect/FileSystem"; -import * as Layer from "effect/Layer"; -import * as Logger from "effect/Logger"; -import * as Path from "effect/Path"; -import * as Schema from "effect/Schema"; -import { - FetchHttpClient, - HttpClient, - HttpClientRequest, - HttpClientResponse, -} from "effect/unstable/http"; +import { Effect, FileSystem, Layer, Logger, Path, Schema } from "effect"; import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; -const UPSTREAM_REF = "678157acaa819d5510adfe359abb5d0392cfe461"; +const UPSTREAM_REF = "dbfe855f4fd0f5dcdf079882652a8efe622b0595"; const USER_AGENT = "effect-codex-app-server-generator"; const GITHUB_API_BASE = "https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol"; @@ -32,15 +21,6 @@ const GithubContentEntries = Schema.Array( ); type GithubContentEntry = (typeof GithubContentEntries.Type)[number]; -const JsonSchemaDocument = Schema.StructWithRest( - Schema.Struct({ - definitions: Schema.optionalKey(Schema.Record(Schema.String, Schema.Json)), - }), - [Schema.Record(Schema.String, Schema.Json)], -); -const decodeGithubContentEntries = Schema.decodeEffect(Schema.fromJsonString(GithubContentEntries)); -const decodeJsonSchemaDocument = Schema.decodeEffect(Schema.fromJsonString(JsonSchemaDocument)); - interface GeneratedPaths { readonly generatedDir: string; readonly schemaOutputPath: string; @@ -63,14 +43,14 @@ interface JsonSchemaFile { class GeneratorError extends Schema.TaggedErrorClass()("GeneratorError", { detail: Schema.String, - cause: Schema.optional(Schema.Defect()), + cause: Schema.optional(Schema.Defect), }) { override get message() { return this.detail; } } -const ManualSchemas: Record = { +const ManualSchemas: Record = { GetAuthStatusParams: { type: "object", title: "GetAuthStatusParams", @@ -163,24 +143,45 @@ const ensureGeneratedDir = Effect.fn("ensureGeneratedDir")(function* () { }); const fetchText = Effect.fn("fetchText")(function* (url: string) { - return yield* HttpClientRequest.get(url).pipe( - HttpClientRequest.setHeader("user-agent", USER_AGENT), - HttpClient.execute, - Effect.flatMap(HttpClientResponse.filterStatusOk), - Effect.flatMap((okResponse) => okResponse.text), - Effect.mapError( - (cause) => - new GeneratorError({ - detail: `Failed to fetch ${url}`, - cause, - }), - ), - ); + const response = yield* Effect.tryPromise({ + try: () => + fetch(url, { + headers: { + "user-agent": USER_AGENT, + }, + }), + catch: (cause) => + new GeneratorError({ + detail: `Failed to fetch ${url}`, + cause, + }), + }); + + if (!response.ok) { + const detail = yield* Effect.tryPromise({ + try: () => response.text(), + catch: () => "", + }); + return yield* Effect.fail( + new GeneratorError({ + detail: `Failed to download ${url}: ${response.status} ${detail}`, + }), + ); + } + + return yield* Effect.tryPromise({ + try: () => response.text(), + catch: (cause) => + new GeneratorError({ + detail: `Failed to read response body for ${url}`, + cause, + }), + }); }); const fetchDirectoryEntries = Effect.fn("fetchDirectoryEntries")(function* (path: string) { const raw = yield* fetchText(`${GITHUB_API_BASE}/${path}?ref=${UPSTREAM_REF}`); - return yield* decodeGithubContentEntries(raw); + return yield* Schema.decodeEffect(Schema.fromJsonString(GithubContentEntries))(raw); }); function collectSchemaEntries( @@ -218,7 +219,7 @@ function collectSchemaEntries( return entries; } -function normalizeNullableTypes(value: Schema.Json): Schema.Json { +function normalizeNullableTypes(value: typeof Schema.Json.Type): typeof Schema.Json.Type { if (Array.isArray(value)) { return value.map(normalizeNullableTypes); } @@ -230,7 +231,10 @@ function normalizeNullableTypes(value: Schema.Json): Schema.Json { key, normalizeNullableTypes(child), ]); - const normalizedObject = Object.fromEntries(normalizedEntries) as Record; + const normalizedObject = Object.fromEntries(normalizedEntries) as Record< + string, + typeof Schema.Json.Type + >; const typeValue = normalizedObject.type; if (!Array.isArray(typeValue)) { @@ -248,7 +252,7 @@ function normalizeNullableTypes(value: Schema.Json): Schema.Json { } const nonNullType = nonNullTypes[0]!; - const nextObject: Record = {}; + const nextObject: Record = {}; for (const [key, child] of Object.entries(normalizedObject)) { if (key !== "type") { nextObject[key] = child; @@ -266,7 +270,7 @@ function normalizeNullableTypes(value: Schema.Json): Schema.Json { }; } -function stripNullDefaults(value: Schema.Json): Schema.Json { +function stripNullDefaults(value: typeof Schema.Json.Type): typeof Schema.Json.Type { if (Array.isArray(value)) { return value.map(stripNullDefaults); } @@ -278,7 +282,7 @@ function stripNullDefaults(value: Schema.Json): Schema.Json { Object.entries(value) .filter(([key, child]) => !(key === "default" && child === null)) .map(([key, child]) => [key, stripNullDefaults(child)]), - ) as Schema.Json; + ) as typeof Schema.Json.Type; } function toPascalCaseMethod(method: string) { @@ -348,13 +352,10 @@ function resolveResponseTypeName( const overrides: Record = { "account/logout": "LogoutAccountResponse", "account/rateLimits/read": "GetAccountRateLimitsResponse", - "account/usage/read": "GetAccountTokenUsageResponse", - "account/workspaceMessages/read": "GetWorkspaceMessagesResponse", "config/batchWrite": "ConfigWriteResponse", "config/mcpServer/reload": "McpServerRefreshResponse", "config/value/write": "ConfigWriteResponse", "configRequirements/read": "ConfigRequirementsReadResponse", - "externalAgentConfig/import/readHistories": "ExternalAgentConfigImportHistoriesReadResponse", }; const override = overrides[method]; @@ -417,7 +418,7 @@ function renderSchemaMap( } function renderSchemaTypeReference(schemaName: string) { - return schemaName === "undefined" ? "undefined" : `CodexSchema.${schemaName}`; + return schemaName === "undefined" ? "undefined" : `typeof CodexSchema.${schemaName}.Type`; } function exportNameForPath(filePath: string): string { @@ -468,11 +469,11 @@ function buildJsonSchemaFiles( } function rewriteExternalRefs( - value: Schema.Json, + value: typeof Schema.Json.Type, localDefinitionNames: ReadonlyMap, currentNamespace: string | undefined, exportNameByQualifiedName: ReadonlyMap, -): Schema.Json { +): typeof Schema.Json.Type { if (Array.isArray(value)) { return value.map((entry) => rewriteExternalRefs(entry, localDefinitionNames, currentNamespace, exportNameByQualifiedName), @@ -522,7 +523,7 @@ function rewriteExternalRefs( ), ]; }), - ) as Schema.Json; + ) as typeof Schema.Json.Type; } const generateFiles = Effect.fn("generateFiles")(function* () { @@ -543,11 +544,13 @@ const generateFiles = Effect.fn("generateFiles")(function* () { const exportNameByQualifiedName = new Map( jsonSchemaFiles.map((file) => [file.qualifiedName, file.exportName]), ); - const aggregateSchemas: Record = {}; + const aggregateSchemas: Record = {}; for (const file of jsonSchemaFiles) { const raw = yield* fetchText(file.downloadUrl); - const parsed = yield* decodeJsonSchemaDocument(raw); + const parsed = JSON.parse(raw) as { + readonly definitions?: Record; + } & Record; const localDefinitionNames = new Map( Object.keys(parsed.definitions ?? {}).map((definitionName) => [ definitionName, @@ -568,7 +571,7 @@ const generateFiles = Effect.fn("generateFiles")(function* () { ); } - const topLevelSchema: Record = {}; + const topLevelSchema: Record = {}; for (const [key, value] of Object.entries(parsed)) { if (key !== "definitions") { topLevelSchema[key] = value; @@ -748,16 +751,14 @@ const generateFiles = Effect.fn("generateFiles")(function* () { yield* Effect.log(`Generated Codex App Server schemas from ${UPSTREAM_REF}`); yield* Effect.service(ChildProcessSpawner.ChildProcessSpawner).pipe( - Effect.flatMap((spawner) => - spawner.spawn(ChildProcess.make("vp", ["fmt", generatedDir, "--write"])), - ), + Effect.flatMap((spawner) => spawner.spawn(ChildProcess.make("bun", ["oxfmt", generatedDir]))), Effect.flatMap((child) => child.exitCode), Effect.tap((code) => code === 0 ? Effect.void : Effect.fail( new GeneratorError({ - detail: `vp fmt failed with exit code ${code}`, + detail: `oxfmt failed with exit code ${code}`, }), ), ), @@ -766,12 +767,6 @@ const generateFiles = Effect.fn("generateFiles")(function* () { generateFiles().pipe( Effect.scoped, - Effect.provide( - Layer.mergeAll( - Logger.layer([Logger.consolePretty()]), - NodeServices.layer, - FetchHttpClient.layer, - ), - ), + Effect.provide(Layer.mergeAll(Logger.layer([Logger.consolePretty()]), NodeServices.layer)), NodeRuntime.runMain, ); diff --git a/packages/effect-codex-app-server/src/_generated/meta.gen.ts b/packages/effect-codex-app-server/src/_generated/meta.gen.ts index 24452e881f..d0b7376495 100644 --- a/packages/effect-codex-app-server/src/_generated/meta.gen.ts +++ b/packages/effect-codex-app-server/src/_generated/meta.gen.ts @@ -1,5 +1,5 @@ // This file is generated by the effect-codex-app-server package. Do not edit manually. -// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461 +// Upstream protocol ref: dbfe855f4fd0f5dcdf079882652a8efe622b0595 import * as CodexSchema from "./schema.gen.ts"; @@ -9,40 +9,20 @@ export const CLIENT_REQUEST_METHODS = { "thread/resume": "thread/resume", "thread/fork": "thread/fork", "thread/archive": "thread/archive", - "thread/delete": "thread/delete", "thread/unsubscribe": "thread/unsubscribe", "thread/name/set": "thread/name/set", - "thread/goal/set": "thread/goal/set", - "thread/goal/get": "thread/goal/get", - "thread/goal/clear": "thread/goal/clear", "thread/metadata/update": "thread/metadata/update", "thread/unarchive": "thread/unarchive", "thread/compact/start": "thread/compact/start", "thread/shellCommand": "thread/shellCommand", - "thread/approveGuardianDeniedAction": "thread/approveGuardianDeniedAction", "thread/rollback": "thread/rollback", "thread/list": "thread/list", "thread/loaded/list": "thread/loaded/list", "thread/read": "thread/read", - "thread/inject_items": "thread/inject_items", "skills/list": "skills/list", - "skills/extraRoots/set": "skills/extraRoots/set", - "hooks/list": "hooks/list", - "marketplace/add": "marketplace/add", - "marketplace/remove": "marketplace/remove", - "marketplace/upgrade": "marketplace/upgrade", "plugin/list": "plugin/list", - "plugin/installed": "plugin/installed", "plugin/read": "plugin/read", - "plugin/skill/read": "plugin/skill/read", - "plugin/share/save": "plugin/share/save", - "plugin/share/updateTargets": "plugin/share/updateTargets", - "plugin/share/list": "plugin/share/list", - "plugin/share/checkout": "plugin/share/checkout", - "plugin/share/delete": "plugin/share/delete", - "app/read": "app/read", "app/list": "app/list", - "app/installed": "app/installed", "fs/readFile": "fs/readFile", "fs/writeFile": "fs/writeFile", "fs/createDirectory": "fs/createDirectory", @@ -60,9 +40,7 @@ export const CLIENT_REQUEST_METHODS = { "turn/interrupt": "turn/interrupt", "review/start": "review/start", "model/list": "model/list", - "modelProvider/capabilities/read": "modelProvider/capabilities/read", "experimentalFeature/list": "experimentalFeature/list", - "permissionProfile/list": "permissionProfile/list", "experimentalFeature/enablement/set": "experimentalFeature/enablement/set", "mcpServer/oauth/login": "mcpServer/oauth/login", "config/mcpServer/reload": "config/mcpServer/reload", @@ -70,15 +48,10 @@ export const CLIENT_REQUEST_METHODS = { "mcpServer/resource/read": "mcpServer/resource/read", "mcpServer/tool/call": "mcpServer/tool/call", "windowsSandbox/setupStart": "windowsSandbox/setupStart", - "windowsSandbox/readiness": "windowsSandbox/readiness", "account/login/start": "account/login/start", "account/login/cancel": "account/login/cancel", "account/logout": "account/logout", "account/rateLimits/read": "account/rateLimits/read", - "account/rateLimitResetCredit/consume": "account/rateLimitResetCredit/consume", - "account/usage/read": "account/usage/read", - "account/workspaceMessages/read": "account/workspaceMessages/read", - "account/sendAddCreditsNudgeEmail": "account/sendAddCreditsNudgeEmail", "feedback/upload": "feedback/upload", "command/exec": "command/exec", "command/exec/write": "command/exec/write", @@ -87,7 +60,6 @@ export const CLIENT_REQUEST_METHODS = { "config/read": "config/read", "externalAgentConfig/detect": "externalAgentConfig/detect", "externalAgentConfig/import": "externalAgentConfig/import", - "externalAgentConfig/import/readHistories": "externalAgentConfig/import/readHistories", "config/value/write": "config/value/write", "config/batchWrite": "config/batchWrite", "configRequirements/read": "configRequirements/read", @@ -110,7 +82,6 @@ export const SERVER_REQUEST_METHODS = { "item/permissions/requestApproval": "item/permissions/requestApproval", "item/tool/call": "item/tool/call", "account/chatgptAuthTokens/refresh": "account/chatgptAuthTokens/refresh", - "attestation/generate": "attestation/generate", applyPatchApproval: "applyPatchApproval", execCommandApproval: "execCommandApproval", } as const; @@ -120,16 +91,10 @@ export const SERVER_NOTIFICATION_METHODS = { "thread/started": "thread/started", "thread/status/changed": "thread/status/changed", "thread/archived": "thread/archived", - "thread/deleted": "thread/deleted", "thread/unarchived": "thread/unarchived", "thread/closed": "thread/closed", "skills/changed": "skills/changed", "thread/name/updated": "thread/name/updated", - "thread/goal/updated": "thread/goal/updated", - "thread/goal/cleared": "thread/goal/cleared", - "thread/environment/connected": "thread/environment/connected", - "thread/environment/disconnected": "thread/environment/disconnected", - "thread/settings/updated": "thread/settings/updated", "thread/tokenUsage/updated": "thread/tokenUsage/updated", "turn/started": "turn/started", "hook/started": "hook/started", @@ -142,16 +107,12 @@ export const SERVER_NOTIFICATION_METHODS = { "item/autoApprovalReview/completed": "item/autoApprovalReview/completed", "item/completed": "item/completed", "rawResponseItem/completed": "rawResponseItem/completed", - "rawResponse/completed": "rawResponse/completed", "item/agentMessage/delta": "item/agentMessage/delta", "item/plan/delta": "item/plan/delta", "command/exec/outputDelta": "command/exec/outputDelta", - "process/outputDelta": "process/outputDelta", - "process/exited": "process/exited", "item/commandExecution/outputDelta": "item/commandExecution/outputDelta", "item/commandExecution/terminalInteraction": "item/commandExecution/terminalInteraction", "item/fileChange/outputDelta": "item/fileChange/outputDelta", - "item/fileChange/patchUpdated": "item/fileChange/patchUpdated", "serverRequest/resolved": "serverRequest/resolved", "item/mcpToolCall/progress": "item/mcpToolCall/progress", "mcpServer/oauthLogin/completed": "mcpServer/oauthLogin/completed", @@ -159,28 +120,19 @@ export const SERVER_NOTIFICATION_METHODS = { "account/updated": "account/updated", "account/rateLimits/updated": "account/rateLimits/updated", "app/list/updated": "app/list/updated", - "remoteControl/status/changed": "remoteControl/status/changed", - "externalAgentConfig/import/progress": "externalAgentConfig/import/progress", - "externalAgentConfig/import/completed": "externalAgentConfig/import/completed", "fs/changed": "fs/changed", "item/reasoning/summaryTextDelta": "item/reasoning/summaryTextDelta", "item/reasoning/summaryPartAdded": "item/reasoning/summaryPartAdded", "item/reasoning/textDelta": "item/reasoning/textDelta", "thread/compacted": "thread/compacted", "model/rerouted": "model/rerouted", - "model/verification": "model/verification", - "turn/moderationMetadata": "turn/moderationMetadata", - "model/safetyBuffering/updated": "model/safetyBuffering/updated", - warning: "warning", - guardianWarning: "guardianWarning", deprecationNotice: "deprecationNotice", configWarning: "configWarning", "fuzzyFileSearch/sessionUpdated": "fuzzyFileSearch/sessionUpdated", "fuzzyFileSearch/sessionCompleted": "fuzzyFileSearch/sessionCompleted", "thread/realtime/started": "thread/realtime/started", "thread/realtime/itemAdded": "thread/realtime/itemAdded", - "thread/realtime/transcript/delta": "thread/realtime/transcript/delta", - "thread/realtime/transcript/done": "thread/realtime/transcript/done", + "thread/realtime/transcriptUpdated": "thread/realtime/transcriptUpdated", "thread/realtime/outputAudio/delta": "thread/realtime/outputAudio/delta", "thread/realtime/sdp": "thread/realtime/sdp", "thread/realtime/error": "thread/realtime/error", @@ -196,193 +148,137 @@ export type ServerRequestMethod = keyof typeof SERVER_REQUEST_METHODS; export type ServerNotificationMethod = keyof typeof SERVER_NOTIFICATION_METHODS; export interface ClientRequestParamsByMethod { - readonly initialize: CodexSchema.V1InitializeParams; - readonly "thread/start": CodexSchema.V2ThreadStartParams; - readonly "thread/resume": CodexSchema.V2ThreadResumeParams; - readonly "thread/fork": CodexSchema.V2ThreadForkParams; - readonly "thread/archive": CodexSchema.V2ThreadArchiveParams; - readonly "thread/delete": CodexSchema.V2ThreadDeleteParams; - readonly "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeParams; - readonly "thread/name/set": CodexSchema.V2ThreadSetNameParams; - readonly "thread/goal/set": CodexSchema.V2ThreadGoalSetParams; - readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetParams; - readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams; - readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams; - readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams; - readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartParams; - readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams; - readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams; - readonly "thread/rollback": CodexSchema.V2ThreadRollbackParams; - readonly "thread/list": CodexSchema.V2ThreadListParams; - readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams; - readonly "thread/read": CodexSchema.V2ThreadReadParams; - readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams; - readonly "skills/list": CodexSchema.V2SkillsListParams; - readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams; - readonly "hooks/list": CodexSchema.V2HooksListParams; - readonly "marketplace/add": CodexSchema.V2MarketplaceAddParams; - readonly "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams; - readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams; - readonly "plugin/list": CodexSchema.V2PluginListParams; - readonly "plugin/installed": CodexSchema.V2PluginInstalledParams; - readonly "plugin/read": CodexSchema.V2PluginReadParams; - readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadParams; - readonly "plugin/share/save": CodexSchema.V2PluginShareSaveParams; - readonly "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams; - readonly "plugin/share/list": CodexSchema.V2PluginShareListParams; - readonly "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams; - readonly "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams; - readonly "app/read": CodexSchema.V2AppsReadParams; - readonly "app/list": CodexSchema.V2AppsListParams; - readonly "app/installed": CodexSchema.V2AppsInstalledParams; - readonly "fs/readFile": CodexSchema.V2FsReadFileParams; - readonly "fs/writeFile": CodexSchema.V2FsWriteFileParams; - readonly "fs/createDirectory": CodexSchema.V2FsCreateDirectoryParams; - readonly "fs/getMetadata": CodexSchema.V2FsGetMetadataParams; - readonly "fs/readDirectory": CodexSchema.V2FsReadDirectoryParams; - readonly "fs/remove": CodexSchema.V2FsRemoveParams; - readonly "fs/copy": CodexSchema.V2FsCopyParams; - readonly "fs/watch": CodexSchema.V2FsWatchParams; - readonly "fs/unwatch": CodexSchema.V2FsUnwatchParams; - readonly "skills/config/write": CodexSchema.V2SkillsConfigWriteParams; - readonly "plugin/install": CodexSchema.V2PluginInstallParams; - readonly "plugin/uninstall": CodexSchema.V2PluginUninstallParams; - readonly "turn/start": CodexSchema.V2TurnStartParams; - readonly "turn/steer": CodexSchema.V2TurnSteerParams; - readonly "turn/interrupt": CodexSchema.V2TurnInterruptParams; - readonly "review/start": CodexSchema.V2ReviewStartParams; - readonly "model/list": CodexSchema.V2ModelListParams; - readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams; - readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams; - readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams; - readonly "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams; - readonly "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams; + readonly initialize: typeof CodexSchema.V1InitializeParams.Type; + readonly "thread/start": typeof CodexSchema.V2ThreadStartParams.Type; + readonly "thread/resume": typeof CodexSchema.V2ThreadResumeParams.Type; + readonly "thread/fork": typeof CodexSchema.V2ThreadForkParams.Type; + readonly "thread/archive": typeof CodexSchema.V2ThreadArchiveParams.Type; + readonly "thread/unsubscribe": typeof CodexSchema.V2ThreadUnsubscribeParams.Type; + readonly "thread/name/set": typeof CodexSchema.V2ThreadSetNameParams.Type; + readonly "thread/metadata/update": typeof CodexSchema.V2ThreadMetadataUpdateParams.Type; + readonly "thread/unarchive": typeof CodexSchema.V2ThreadUnarchiveParams.Type; + readonly "thread/compact/start": typeof CodexSchema.V2ThreadCompactStartParams.Type; + readonly "thread/shellCommand": typeof CodexSchema.V2ThreadShellCommandParams.Type; + readonly "thread/rollback": typeof CodexSchema.V2ThreadRollbackParams.Type; + readonly "thread/list": typeof CodexSchema.V2ThreadListParams.Type; + readonly "thread/loaded/list": typeof CodexSchema.V2ThreadLoadedListParams.Type; + readonly "thread/read": typeof CodexSchema.V2ThreadReadParams.Type; + readonly "skills/list": typeof CodexSchema.V2SkillsListParams.Type; + readonly "plugin/list": typeof CodexSchema.V2PluginListParams.Type; + readonly "plugin/read": typeof CodexSchema.V2PluginReadParams.Type; + readonly "app/list": typeof CodexSchema.V2AppsListParams.Type; + readonly "fs/readFile": typeof CodexSchema.V2FsReadFileParams.Type; + readonly "fs/writeFile": typeof CodexSchema.V2FsWriteFileParams.Type; + readonly "fs/createDirectory": typeof CodexSchema.V2FsCreateDirectoryParams.Type; + readonly "fs/getMetadata": typeof CodexSchema.V2FsGetMetadataParams.Type; + readonly "fs/readDirectory": typeof CodexSchema.V2FsReadDirectoryParams.Type; + readonly "fs/remove": typeof CodexSchema.V2FsRemoveParams.Type; + readonly "fs/copy": typeof CodexSchema.V2FsCopyParams.Type; + readonly "fs/watch": typeof CodexSchema.V2FsWatchParams.Type; + readonly "fs/unwatch": typeof CodexSchema.V2FsUnwatchParams.Type; + readonly "skills/config/write": typeof CodexSchema.V2SkillsConfigWriteParams.Type; + readonly "plugin/install": typeof CodexSchema.V2PluginInstallParams.Type; + readonly "plugin/uninstall": typeof CodexSchema.V2PluginUninstallParams.Type; + readonly "turn/start": typeof CodexSchema.V2TurnStartParams.Type; + readonly "turn/steer": typeof CodexSchema.V2TurnSteerParams.Type; + readonly "turn/interrupt": typeof CodexSchema.V2TurnInterruptParams.Type; + readonly "review/start": typeof CodexSchema.V2ReviewStartParams.Type; + readonly "model/list": typeof CodexSchema.V2ModelListParams.Type; + readonly "experimentalFeature/list": typeof CodexSchema.V2ExperimentalFeatureListParams.Type; + readonly "experimentalFeature/enablement/set": typeof CodexSchema.V2ExperimentalFeatureEnablementSetParams.Type; + readonly "mcpServer/oauth/login": typeof CodexSchema.V2McpServerOauthLoginParams.Type; readonly "config/mcpServer/reload": undefined; - readonly "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusParams; - readonly "mcpServer/resource/read": CodexSchema.V2McpResourceReadParams; - readonly "mcpServer/tool/call": CodexSchema.V2McpServerToolCallParams; - readonly "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartParams; - readonly "windowsSandbox/readiness": undefined; - readonly "account/login/start": CodexSchema.V2LoginAccountParams; - readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountParams; + readonly "mcpServerStatus/list": typeof CodexSchema.V2ListMcpServerStatusParams.Type; + readonly "mcpServer/resource/read": typeof CodexSchema.V2McpResourceReadParams.Type; + readonly "mcpServer/tool/call": typeof CodexSchema.V2McpServerToolCallParams.Type; + readonly "windowsSandbox/setupStart": typeof CodexSchema.V2WindowsSandboxSetupStartParams.Type; + readonly "account/login/start": typeof CodexSchema.V2LoginAccountParams.Type; + readonly "account/login/cancel": typeof CodexSchema.V2CancelLoginAccountParams.Type; readonly "account/logout": undefined; readonly "account/rateLimits/read": undefined; - readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams; - readonly "account/usage/read": undefined; - readonly "account/workspaceMessages/read": undefined; - readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams; - readonly "feedback/upload": CodexSchema.V2FeedbackUploadParams; - readonly "command/exec": CodexSchema.V2CommandExecParams; - readonly "command/exec/write": CodexSchema.V2CommandExecWriteParams; - readonly "command/exec/terminate": CodexSchema.V2CommandExecTerminateParams; - readonly "command/exec/resize": CodexSchema.V2CommandExecResizeParams; - readonly "config/read": CodexSchema.V2ConfigReadParams; - readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams; - readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams; - readonly "externalAgentConfig/import/readHistories": undefined; - readonly "config/value/write": CodexSchema.V2ConfigValueWriteParams; - readonly "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams; + readonly "feedback/upload": typeof CodexSchema.V2FeedbackUploadParams.Type; + readonly "command/exec": typeof CodexSchema.V2CommandExecParams.Type; + readonly "command/exec/write": typeof CodexSchema.V2CommandExecWriteParams.Type; + readonly "command/exec/terminate": typeof CodexSchema.V2CommandExecTerminateParams.Type; + readonly "command/exec/resize": typeof CodexSchema.V2CommandExecResizeParams.Type; + readonly "config/read": typeof CodexSchema.V2ConfigReadParams.Type; + readonly "externalAgentConfig/detect": typeof CodexSchema.V2ExternalAgentConfigDetectParams.Type; + readonly "externalAgentConfig/import": typeof CodexSchema.V2ExternalAgentConfigImportParams.Type; + readonly "config/value/write": typeof CodexSchema.V2ConfigValueWriteParams.Type; + readonly "config/batchWrite": typeof CodexSchema.V2ConfigBatchWriteParams.Type; readonly "configRequirements/read": undefined; - readonly "account/read": CodexSchema.V2GetAccountParams; - readonly getConversationSummary: CodexSchema.GetConversationSummaryParams; - readonly gitDiffToRemote: CodexSchema.GitDiffToRemoteParams; - readonly getAuthStatus: CodexSchema.GetAuthStatusParams; - readonly fuzzyFileSearch: CodexSchema.FuzzyFileSearchParams; + readonly "account/read": typeof CodexSchema.V2GetAccountParams.Type; + readonly getConversationSummary: typeof CodexSchema.GetConversationSummaryParams.Type; + readonly gitDiffToRemote: typeof CodexSchema.GitDiffToRemoteParams.Type; + readonly getAuthStatus: typeof CodexSchema.GetAuthStatusParams.Type; + readonly fuzzyFileSearch: typeof CodexSchema.FuzzyFileSearchParams.Type; } export interface ClientRequestResponsesByMethod { - readonly initialize: CodexSchema.V1InitializeResponse; - readonly "thread/start": CodexSchema.V2ThreadStartResponse; - readonly "thread/resume": CodexSchema.V2ThreadResumeResponse; - readonly "thread/fork": CodexSchema.V2ThreadForkResponse; - readonly "thread/archive": CodexSchema.V2ThreadArchiveResponse; - readonly "thread/delete": CodexSchema.V2ThreadDeleteResponse; - readonly "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeResponse; - readonly "thread/name/set": CodexSchema.V2ThreadSetNameResponse; - readonly "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse; - readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse; - readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse; - readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse; - readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse; - readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse; - readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse; - readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse; - readonly "thread/rollback": CodexSchema.V2ThreadRollbackResponse; - readonly "thread/list": CodexSchema.V2ThreadListResponse; - readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse; - readonly "thread/read": CodexSchema.V2ThreadReadResponse; - readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse; - readonly "skills/list": CodexSchema.V2SkillsListResponse; - readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse; - readonly "hooks/list": CodexSchema.V2HooksListResponse; - readonly "marketplace/add": CodexSchema.V2MarketplaceAddResponse; - readonly "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse; - readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse; - readonly "plugin/list": CodexSchema.V2PluginListResponse; - readonly "plugin/installed": CodexSchema.V2PluginInstalledResponse; - readonly "plugin/read": CodexSchema.V2PluginReadResponse; - readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse; - readonly "plugin/share/save": CodexSchema.V2PluginShareSaveResponse; - readonly "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse; - readonly "plugin/share/list": CodexSchema.V2PluginShareListResponse; - readonly "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse; - readonly "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse; - readonly "app/read": CodexSchema.V2AppsReadResponse; - readonly "app/list": CodexSchema.V2AppsListResponse; - readonly "app/installed": CodexSchema.V2AppsInstalledResponse; - readonly "fs/readFile": CodexSchema.V2FsReadFileResponse; - readonly "fs/writeFile": CodexSchema.V2FsWriteFileResponse; - readonly "fs/createDirectory": CodexSchema.V2FsCreateDirectoryResponse; - readonly "fs/getMetadata": CodexSchema.V2FsGetMetadataResponse; - readonly "fs/readDirectory": CodexSchema.V2FsReadDirectoryResponse; - readonly "fs/remove": CodexSchema.V2FsRemoveResponse; - readonly "fs/copy": CodexSchema.V2FsCopyResponse; - readonly "fs/watch": CodexSchema.V2FsWatchResponse; - readonly "fs/unwatch": CodexSchema.V2FsUnwatchResponse; - readonly "skills/config/write": CodexSchema.V2SkillsConfigWriteResponse; - readonly "plugin/install": CodexSchema.V2PluginInstallResponse; - readonly "plugin/uninstall": CodexSchema.V2PluginUninstallResponse; - readonly "turn/start": CodexSchema.V2TurnStartResponse; - readonly "turn/steer": CodexSchema.V2TurnSteerResponse; - readonly "turn/interrupt": CodexSchema.V2TurnInterruptResponse; - readonly "review/start": CodexSchema.V2ReviewStartResponse; - readonly "model/list": CodexSchema.V2ModelListResponse; - readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse; - readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse; - readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse; - readonly "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse; - readonly "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse; - readonly "config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse; - readonly "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusResponse; - readonly "mcpServer/resource/read": CodexSchema.V2McpResourceReadResponse; - readonly "mcpServer/tool/call": CodexSchema.V2McpServerToolCallResponse; - readonly "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartResponse; - readonly "windowsSandbox/readiness": CodexSchema.V2WindowsSandboxReadinessResponse; - readonly "account/login/start": CodexSchema.V2LoginAccountResponse; - readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse; - readonly "account/logout": CodexSchema.V2LogoutAccountResponse; - readonly "account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse; - readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse; - readonly "account/usage/read": CodexSchema.V2GetAccountTokenUsageResponse; - readonly "account/workspaceMessages/read": CodexSchema.V2GetWorkspaceMessagesResponse; - readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailResponse; - readonly "feedback/upload": CodexSchema.V2FeedbackUploadResponse; - readonly "command/exec": CodexSchema.V2CommandExecResponse; - readonly "command/exec/write": CodexSchema.V2CommandExecWriteResponse; - readonly "command/exec/terminate": CodexSchema.V2CommandExecTerminateResponse; - readonly "command/exec/resize": CodexSchema.V2CommandExecResizeResponse; - readonly "config/read": CodexSchema.V2ConfigReadResponse; - readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse; - readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse; - readonly "externalAgentConfig/import/readHistories": CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse; - readonly "config/value/write": CodexSchema.V2ConfigWriteResponse; - readonly "config/batchWrite": CodexSchema.V2ConfigWriteResponse; - readonly "configRequirements/read": CodexSchema.V2ConfigRequirementsReadResponse; - readonly "account/read": CodexSchema.V2GetAccountResponse; - readonly getConversationSummary: CodexSchema.GetConversationSummaryResponse; - readonly gitDiffToRemote: CodexSchema.GitDiffToRemoteResponse; - readonly getAuthStatus: CodexSchema.GetAuthStatusResponse; - readonly fuzzyFileSearch: CodexSchema.FuzzyFileSearchResponse; + readonly initialize: typeof CodexSchema.V1InitializeResponse.Type; + readonly "thread/start": typeof CodexSchema.V2ThreadStartResponse.Type; + readonly "thread/resume": typeof CodexSchema.V2ThreadResumeResponse.Type; + readonly "thread/fork": typeof CodexSchema.V2ThreadForkResponse.Type; + readonly "thread/archive": typeof CodexSchema.V2ThreadArchiveResponse.Type; + readonly "thread/unsubscribe": typeof CodexSchema.V2ThreadUnsubscribeResponse.Type; + readonly "thread/name/set": typeof CodexSchema.V2ThreadSetNameResponse.Type; + readonly "thread/metadata/update": typeof CodexSchema.V2ThreadMetadataUpdateResponse.Type; + readonly "thread/unarchive": typeof CodexSchema.V2ThreadUnarchiveResponse.Type; + readonly "thread/compact/start": typeof CodexSchema.V2ThreadCompactStartResponse.Type; + readonly "thread/shellCommand": typeof CodexSchema.V2ThreadShellCommandResponse.Type; + readonly "thread/rollback": typeof CodexSchema.V2ThreadRollbackResponse.Type; + readonly "thread/list": typeof CodexSchema.V2ThreadListResponse.Type; + readonly "thread/loaded/list": typeof CodexSchema.V2ThreadLoadedListResponse.Type; + readonly "thread/read": typeof CodexSchema.V2ThreadReadResponse.Type; + readonly "skills/list": typeof CodexSchema.V2SkillsListResponse.Type; + readonly "plugin/list": typeof CodexSchema.V2PluginListResponse.Type; + readonly "plugin/read": typeof CodexSchema.V2PluginReadResponse.Type; + readonly "app/list": typeof CodexSchema.V2AppsListResponse.Type; + readonly "fs/readFile": typeof CodexSchema.V2FsReadFileResponse.Type; + readonly "fs/writeFile": typeof CodexSchema.V2FsWriteFileResponse.Type; + readonly "fs/createDirectory": typeof CodexSchema.V2FsCreateDirectoryResponse.Type; + readonly "fs/getMetadata": typeof CodexSchema.V2FsGetMetadataResponse.Type; + readonly "fs/readDirectory": typeof CodexSchema.V2FsReadDirectoryResponse.Type; + readonly "fs/remove": typeof CodexSchema.V2FsRemoveResponse.Type; + readonly "fs/copy": typeof CodexSchema.V2FsCopyResponse.Type; + readonly "fs/watch": typeof CodexSchema.V2FsWatchResponse.Type; + readonly "fs/unwatch": typeof CodexSchema.V2FsUnwatchResponse.Type; + readonly "skills/config/write": typeof CodexSchema.V2SkillsConfigWriteResponse.Type; + readonly "plugin/install": typeof CodexSchema.V2PluginInstallResponse.Type; + readonly "plugin/uninstall": typeof CodexSchema.V2PluginUninstallResponse.Type; + readonly "turn/start": typeof CodexSchema.V2TurnStartResponse.Type; + readonly "turn/steer": typeof CodexSchema.V2TurnSteerResponse.Type; + readonly "turn/interrupt": typeof CodexSchema.V2TurnInterruptResponse.Type; + readonly "review/start": typeof CodexSchema.V2ReviewStartResponse.Type; + readonly "model/list": typeof CodexSchema.V2ModelListResponse.Type; + readonly "experimentalFeature/list": typeof CodexSchema.V2ExperimentalFeatureListResponse.Type; + readonly "experimentalFeature/enablement/set": typeof CodexSchema.V2ExperimentalFeatureEnablementSetResponse.Type; + readonly "mcpServer/oauth/login": typeof CodexSchema.V2McpServerOauthLoginResponse.Type; + readonly "config/mcpServer/reload": typeof CodexSchema.V2McpServerRefreshResponse.Type; + readonly "mcpServerStatus/list": typeof CodexSchema.V2ListMcpServerStatusResponse.Type; + readonly "mcpServer/resource/read": typeof CodexSchema.V2McpResourceReadResponse.Type; + readonly "mcpServer/tool/call": typeof CodexSchema.V2McpServerToolCallResponse.Type; + readonly "windowsSandbox/setupStart": typeof CodexSchema.V2WindowsSandboxSetupStartResponse.Type; + readonly "account/login/start": typeof CodexSchema.V2LoginAccountResponse.Type; + readonly "account/login/cancel": typeof CodexSchema.V2CancelLoginAccountResponse.Type; + readonly "account/logout": typeof CodexSchema.V2LogoutAccountResponse.Type; + readonly "account/rateLimits/read": typeof CodexSchema.V2GetAccountRateLimitsResponse.Type; + readonly "feedback/upload": typeof CodexSchema.V2FeedbackUploadResponse.Type; + readonly "command/exec": typeof CodexSchema.V2CommandExecResponse.Type; + readonly "command/exec/write": typeof CodexSchema.V2CommandExecWriteResponse.Type; + readonly "command/exec/terminate": typeof CodexSchema.V2CommandExecTerminateResponse.Type; + readonly "command/exec/resize": typeof CodexSchema.V2CommandExecResizeResponse.Type; + readonly "config/read": typeof CodexSchema.V2ConfigReadResponse.Type; + readonly "externalAgentConfig/detect": typeof CodexSchema.V2ExternalAgentConfigDetectResponse.Type; + readonly "externalAgentConfig/import": typeof CodexSchema.V2ExternalAgentConfigImportResponse.Type; + readonly "config/value/write": typeof CodexSchema.V2ConfigWriteResponse.Type; + readonly "config/batchWrite": typeof CodexSchema.V2ConfigWriteResponse.Type; + readonly "configRequirements/read": typeof CodexSchema.V2ConfigRequirementsReadResponse.Type; + readonly "account/read": typeof CodexSchema.V2GetAccountResponse.Type; + readonly getConversationSummary: typeof CodexSchema.GetConversationSummaryResponse.Type; + readonly gitDiffToRemote: typeof CodexSchema.GitDiffToRemoteResponse.Type; + readonly getAuthStatus: typeof CodexSchema.GetAuthStatusResponse.Type; + readonly fuzzyFileSearch: typeof CodexSchema.FuzzyFileSearchResponse.Type; } export interface ClientNotificationParamsByMethod { @@ -390,104 +286,83 @@ export interface ClientNotificationParamsByMethod { } export interface ServerRequestParamsByMethod { - readonly "item/commandExecution/requestApproval": CodexSchema.CommandExecutionRequestApprovalParams; - readonly "item/fileChange/requestApproval": CodexSchema.FileChangeRequestApprovalParams; - readonly "item/tool/requestUserInput": CodexSchema.ToolRequestUserInputParams; - readonly "mcpServer/elicitation/request": CodexSchema.McpServerElicitationRequestParams; - readonly "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalParams; - readonly "item/tool/call": CodexSchema.DynamicToolCallParams; - readonly "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshParams; - readonly "attestation/generate": CodexSchema.AttestationGenerateParams; - readonly applyPatchApproval: CodexSchema.ApplyPatchApprovalParams; - readonly execCommandApproval: CodexSchema.ExecCommandApprovalParams; + readonly "item/commandExecution/requestApproval": typeof CodexSchema.CommandExecutionRequestApprovalParams.Type; + readonly "item/fileChange/requestApproval": typeof CodexSchema.FileChangeRequestApprovalParams.Type; + readonly "item/tool/requestUserInput": typeof CodexSchema.ToolRequestUserInputParams.Type; + readonly "mcpServer/elicitation/request": typeof CodexSchema.McpServerElicitationRequestParams.Type; + readonly "item/permissions/requestApproval": typeof CodexSchema.PermissionsRequestApprovalParams.Type; + readonly "item/tool/call": typeof CodexSchema.DynamicToolCallParams.Type; + readonly "account/chatgptAuthTokens/refresh": typeof CodexSchema.ChatgptAuthTokensRefreshParams.Type; + readonly applyPatchApproval: typeof CodexSchema.ApplyPatchApprovalParams.Type; + readonly execCommandApproval: typeof CodexSchema.ExecCommandApprovalParams.Type; } export interface ServerRequestResponsesByMethod { - readonly "item/commandExecution/requestApproval": CodexSchema.CommandExecutionRequestApprovalResponse; - readonly "item/fileChange/requestApproval": CodexSchema.FileChangeRequestApprovalResponse; - readonly "item/tool/requestUserInput": CodexSchema.ToolRequestUserInputResponse; - readonly "mcpServer/elicitation/request": CodexSchema.McpServerElicitationRequestResponse; - readonly "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalResponse; - readonly "item/tool/call": CodexSchema.DynamicToolCallResponse; - readonly "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshResponse; - readonly "attestation/generate": CodexSchema.AttestationGenerateResponse; - readonly applyPatchApproval: CodexSchema.ApplyPatchApprovalResponse; - readonly execCommandApproval: CodexSchema.ExecCommandApprovalResponse; + readonly "item/commandExecution/requestApproval": typeof CodexSchema.CommandExecutionRequestApprovalResponse.Type; + readonly "item/fileChange/requestApproval": typeof CodexSchema.FileChangeRequestApprovalResponse.Type; + readonly "item/tool/requestUserInput": typeof CodexSchema.ToolRequestUserInputResponse.Type; + readonly "mcpServer/elicitation/request": typeof CodexSchema.McpServerElicitationRequestResponse.Type; + readonly "item/permissions/requestApproval": typeof CodexSchema.PermissionsRequestApprovalResponse.Type; + readonly "item/tool/call": typeof CodexSchema.DynamicToolCallResponse.Type; + readonly "account/chatgptAuthTokens/refresh": typeof CodexSchema.ChatgptAuthTokensRefreshResponse.Type; + readonly applyPatchApproval: typeof CodexSchema.ApplyPatchApprovalResponse.Type; + readonly execCommandApproval: typeof CodexSchema.ExecCommandApprovalResponse.Type; } export interface ServerNotificationParamsByMethod { - readonly error: CodexSchema.V2ErrorNotification; - readonly "thread/started": CodexSchema.V2ThreadStartedNotification; - readonly "thread/status/changed": CodexSchema.V2ThreadStatusChangedNotification; - readonly "thread/archived": CodexSchema.V2ThreadArchivedNotification; - readonly "thread/deleted": CodexSchema.V2ThreadDeletedNotification; - readonly "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification; - readonly "thread/closed": CodexSchema.V2ThreadClosedNotification; - readonly "skills/changed": CodexSchema.V2SkillsChangedNotification; - readonly "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification; - readonly "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification; - readonly "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification; - readonly "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification; - readonly "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification; - readonly "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification; - readonly "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification; - readonly "turn/started": CodexSchema.V2TurnStartedNotification; - readonly "hook/started": CodexSchema.V2HookStartedNotification; - readonly "turn/completed": CodexSchema.V2TurnCompletedNotification; - readonly "hook/completed": CodexSchema.V2HookCompletedNotification; - readonly "turn/diff/updated": CodexSchema.V2TurnDiffUpdatedNotification; - readonly "turn/plan/updated": CodexSchema.V2TurnPlanUpdatedNotification; - readonly "item/started": CodexSchema.V2ItemStartedNotification; - readonly "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification; - readonly "item/autoApprovalReview/completed": CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification; - readonly "item/completed": CodexSchema.V2ItemCompletedNotification; - readonly "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification; - readonly "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification; - readonly "item/agentMessage/delta": CodexSchema.V2AgentMessageDeltaNotification; - readonly "item/plan/delta": CodexSchema.V2PlanDeltaNotification; - readonly "command/exec/outputDelta": CodexSchema.V2CommandExecOutputDeltaNotification; - readonly "process/outputDelta": CodexSchema.V2ProcessOutputDeltaNotification; - readonly "process/exited": CodexSchema.V2ProcessExitedNotification; - readonly "item/commandExecution/outputDelta": CodexSchema.V2CommandExecutionOutputDeltaNotification; - readonly "item/commandExecution/terminalInteraction": CodexSchema.V2TerminalInteractionNotification; - readonly "item/fileChange/outputDelta": CodexSchema.V2FileChangeOutputDeltaNotification; - readonly "item/fileChange/patchUpdated": CodexSchema.V2FileChangePatchUpdatedNotification; - readonly "serverRequest/resolved": CodexSchema.V2ServerRequestResolvedNotification; - readonly "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification; - readonly "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification; - readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification; - readonly "account/updated": CodexSchema.V2AccountUpdatedNotification; - readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification; - readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification; - readonly "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification; - readonly "externalAgentConfig/import/progress": CodexSchema.V2ExternalAgentConfigImportProgressNotification; - readonly "externalAgentConfig/import/completed": CodexSchema.V2ExternalAgentConfigImportCompletedNotification; - readonly "fs/changed": CodexSchema.V2FsChangedNotification; - readonly "item/reasoning/summaryTextDelta": CodexSchema.V2ReasoningSummaryTextDeltaNotification; - readonly "item/reasoning/summaryPartAdded": CodexSchema.V2ReasoningSummaryPartAddedNotification; - readonly "item/reasoning/textDelta": CodexSchema.V2ReasoningTextDeltaNotification; - readonly "thread/compacted": CodexSchema.V2ContextCompactedNotification; - readonly "model/rerouted": CodexSchema.V2ModelReroutedNotification; - readonly "model/verification": CodexSchema.V2ModelVerificationNotification; - readonly "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification; - readonly "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification; - readonly warning: CodexSchema.V2WarningNotification; - readonly guardianWarning: CodexSchema.V2GuardianWarningNotification; - readonly deprecationNotice: CodexSchema.V2DeprecationNoticeNotification; - readonly configWarning: CodexSchema.V2ConfigWarningNotification; - readonly "fuzzyFileSearch/sessionUpdated": CodexSchema.FuzzyFileSearchSessionUpdatedNotification; - readonly "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification; - readonly "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification; - readonly "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification; - readonly "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification; - readonly "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification; - readonly "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification; - readonly "thread/realtime/sdp": CodexSchema.V2ThreadRealtimeSdpNotification; - readonly "thread/realtime/error": CodexSchema.V2ThreadRealtimeErrorNotification; - readonly "thread/realtime/closed": CodexSchema.V2ThreadRealtimeClosedNotification; - readonly "windows/worldWritableWarning": CodexSchema.V2WindowsWorldWritableWarningNotification; - readonly "windowsSandbox/setupCompleted": CodexSchema.V2WindowsSandboxSetupCompletedNotification; - readonly "account/login/completed": CodexSchema.V2AccountLoginCompletedNotification; + readonly error: typeof CodexSchema.V2ErrorNotification.Type; + readonly "thread/started": typeof CodexSchema.V2ThreadStartedNotification.Type; + readonly "thread/status/changed": typeof CodexSchema.V2ThreadStatusChangedNotification.Type; + readonly "thread/archived": typeof CodexSchema.V2ThreadArchivedNotification.Type; + readonly "thread/unarchived": typeof CodexSchema.V2ThreadUnarchivedNotification.Type; + readonly "thread/closed": typeof CodexSchema.V2ThreadClosedNotification.Type; + readonly "skills/changed": typeof CodexSchema.V2SkillsChangedNotification.Type; + readonly "thread/name/updated": typeof CodexSchema.V2ThreadNameUpdatedNotification.Type; + readonly "thread/tokenUsage/updated": typeof CodexSchema.V2ThreadTokenUsageUpdatedNotification.Type; + readonly "turn/started": typeof CodexSchema.V2TurnStartedNotification.Type; + readonly "hook/started": typeof CodexSchema.V2HookStartedNotification.Type; + readonly "turn/completed": typeof CodexSchema.V2TurnCompletedNotification.Type; + readonly "hook/completed": typeof CodexSchema.V2HookCompletedNotification.Type; + readonly "turn/diff/updated": typeof CodexSchema.V2TurnDiffUpdatedNotification.Type; + readonly "turn/plan/updated": typeof CodexSchema.V2TurnPlanUpdatedNotification.Type; + readonly "item/started": typeof CodexSchema.V2ItemStartedNotification.Type; + readonly "item/autoApprovalReview/started": typeof CodexSchema.V2ItemGuardianApprovalReviewStartedNotification.Type; + readonly "item/autoApprovalReview/completed": typeof CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification.Type; + readonly "item/completed": typeof CodexSchema.V2ItemCompletedNotification.Type; + readonly "rawResponseItem/completed": typeof CodexSchema.V2RawResponseItemCompletedNotification.Type; + readonly "item/agentMessage/delta": typeof CodexSchema.V2AgentMessageDeltaNotification.Type; + readonly "item/plan/delta": typeof CodexSchema.V2PlanDeltaNotification.Type; + readonly "command/exec/outputDelta": typeof CodexSchema.V2CommandExecOutputDeltaNotification.Type; + readonly "item/commandExecution/outputDelta": typeof CodexSchema.V2CommandExecutionOutputDeltaNotification.Type; + readonly "item/commandExecution/terminalInteraction": typeof CodexSchema.V2TerminalInteractionNotification.Type; + readonly "item/fileChange/outputDelta": typeof CodexSchema.V2FileChangeOutputDeltaNotification.Type; + readonly "serverRequest/resolved": typeof CodexSchema.V2ServerRequestResolvedNotification.Type; + readonly "item/mcpToolCall/progress": typeof CodexSchema.V2McpToolCallProgressNotification.Type; + readonly "mcpServer/oauthLogin/completed": typeof CodexSchema.V2McpServerOauthLoginCompletedNotification.Type; + readonly "mcpServer/startupStatus/updated": typeof CodexSchema.V2McpServerStatusUpdatedNotification.Type; + readonly "account/updated": typeof CodexSchema.V2AccountUpdatedNotification.Type; + readonly "account/rateLimits/updated": typeof CodexSchema.V2AccountRateLimitsUpdatedNotification.Type; + readonly "app/list/updated": typeof CodexSchema.V2AppListUpdatedNotification.Type; + readonly "fs/changed": typeof CodexSchema.V2FsChangedNotification.Type; + readonly "item/reasoning/summaryTextDelta": typeof CodexSchema.V2ReasoningSummaryTextDeltaNotification.Type; + readonly "item/reasoning/summaryPartAdded": typeof CodexSchema.V2ReasoningSummaryPartAddedNotification.Type; + readonly "item/reasoning/textDelta": typeof CodexSchema.V2ReasoningTextDeltaNotification.Type; + readonly "thread/compacted": typeof CodexSchema.V2ContextCompactedNotification.Type; + readonly "model/rerouted": typeof CodexSchema.V2ModelReroutedNotification.Type; + readonly deprecationNotice: typeof CodexSchema.V2DeprecationNoticeNotification.Type; + readonly configWarning: typeof CodexSchema.V2ConfigWarningNotification.Type; + readonly "fuzzyFileSearch/sessionUpdated": typeof CodexSchema.FuzzyFileSearchSessionUpdatedNotification.Type; + readonly "fuzzyFileSearch/sessionCompleted": typeof CodexSchema.FuzzyFileSearchSessionCompletedNotification.Type; + readonly "thread/realtime/started": typeof CodexSchema.V2ThreadRealtimeStartedNotification.Type; + readonly "thread/realtime/itemAdded": typeof CodexSchema.V2ThreadRealtimeItemAddedNotification.Type; + readonly "thread/realtime/transcriptUpdated": typeof CodexSchema.V2ThreadRealtimeTranscriptUpdatedNotification.Type; + readonly "thread/realtime/outputAudio/delta": typeof CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification.Type; + readonly "thread/realtime/sdp": typeof CodexSchema.V2ThreadRealtimeSdpNotification.Type; + readonly "thread/realtime/error": typeof CodexSchema.V2ThreadRealtimeErrorNotification.Type; + readonly "thread/realtime/closed": typeof CodexSchema.V2ThreadRealtimeClosedNotification.Type; + readonly "windows/worldWritableWarning": typeof CodexSchema.V2WindowsWorldWritableWarningNotification.Type; + readonly "windowsSandbox/setupCompleted": typeof CodexSchema.V2WindowsSandboxSetupCompletedNotification.Type; + readonly "account/login/completed": typeof CodexSchema.V2AccountLoginCompletedNotification.Type; } export const CLIENT_REQUEST_PARAMS = { @@ -496,40 +371,20 @@ export const CLIENT_REQUEST_PARAMS = { "thread/resume": CodexSchema.V2ThreadResumeParams, "thread/fork": CodexSchema.V2ThreadForkParams, "thread/archive": CodexSchema.V2ThreadArchiveParams, - "thread/delete": CodexSchema.V2ThreadDeleteParams, "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeParams, "thread/name/set": CodexSchema.V2ThreadSetNameParams, - "thread/goal/set": CodexSchema.V2ThreadGoalSetParams, - "thread/goal/get": CodexSchema.V2ThreadGoalGetParams, - "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams, "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams, "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams, "thread/compact/start": CodexSchema.V2ThreadCompactStartParams, "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams, - "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams, "thread/rollback": CodexSchema.V2ThreadRollbackParams, "thread/list": CodexSchema.V2ThreadListParams, "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams, "thread/read": CodexSchema.V2ThreadReadParams, - "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams, "skills/list": CodexSchema.V2SkillsListParams, - "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams, - "hooks/list": CodexSchema.V2HooksListParams, - "marketplace/add": CodexSchema.V2MarketplaceAddParams, - "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams, - "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams, "plugin/list": CodexSchema.V2PluginListParams, - "plugin/installed": CodexSchema.V2PluginInstalledParams, "plugin/read": CodexSchema.V2PluginReadParams, - "plugin/skill/read": CodexSchema.V2PluginSkillReadParams, - "plugin/share/save": CodexSchema.V2PluginShareSaveParams, - "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams, - "plugin/share/list": CodexSchema.V2PluginShareListParams, - "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams, - "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams, - "app/read": CodexSchema.V2AppsReadParams, "app/list": CodexSchema.V2AppsListParams, - "app/installed": CodexSchema.V2AppsInstalledParams, "fs/readFile": CodexSchema.V2FsReadFileParams, "fs/writeFile": CodexSchema.V2FsWriteFileParams, "fs/createDirectory": CodexSchema.V2FsCreateDirectoryParams, @@ -547,9 +402,7 @@ export const CLIENT_REQUEST_PARAMS = { "turn/interrupt": CodexSchema.V2TurnInterruptParams, "review/start": CodexSchema.V2ReviewStartParams, "model/list": CodexSchema.V2ModelListParams, - "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams, "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams, - "permissionProfile/list": CodexSchema.V2PermissionProfileListParams, "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams, "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams, "config/mcpServer/reload": undefined, @@ -557,15 +410,10 @@ export const CLIENT_REQUEST_PARAMS = { "mcpServer/resource/read": CodexSchema.V2McpResourceReadParams, "mcpServer/tool/call": CodexSchema.V2McpServerToolCallParams, "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartParams, - "windowsSandbox/readiness": undefined, "account/login/start": CodexSchema.V2LoginAccountParams, "account/login/cancel": CodexSchema.V2CancelLoginAccountParams, "account/logout": undefined, "account/rateLimits/read": undefined, - "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams, - "account/usage/read": undefined, - "account/workspaceMessages/read": undefined, - "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams, "feedback/upload": CodexSchema.V2FeedbackUploadParams, "command/exec": CodexSchema.V2CommandExecParams, "command/exec/write": CodexSchema.V2CommandExecWriteParams, @@ -574,7 +422,6 @@ export const CLIENT_REQUEST_PARAMS = { "config/read": CodexSchema.V2ConfigReadParams, "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams, "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams, - "externalAgentConfig/import/readHistories": undefined, "config/value/write": CodexSchema.V2ConfigValueWriteParams, "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams, "configRequirements/read": undefined, @@ -591,40 +438,20 @@ export const CLIENT_REQUEST_RESPONSES = { "thread/resume": CodexSchema.V2ThreadResumeResponse, "thread/fork": CodexSchema.V2ThreadForkResponse, "thread/archive": CodexSchema.V2ThreadArchiveResponse, - "thread/delete": CodexSchema.V2ThreadDeleteResponse, "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeResponse, "thread/name/set": CodexSchema.V2ThreadSetNameResponse, - "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse, - "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse, - "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse, "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse, "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse, "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse, "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse, - "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse, "thread/rollback": CodexSchema.V2ThreadRollbackResponse, "thread/list": CodexSchema.V2ThreadListResponse, "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse, "thread/read": CodexSchema.V2ThreadReadResponse, - "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse, "skills/list": CodexSchema.V2SkillsListResponse, - "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse, - "hooks/list": CodexSchema.V2HooksListResponse, - "marketplace/add": CodexSchema.V2MarketplaceAddResponse, - "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse, - "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse, "plugin/list": CodexSchema.V2PluginListResponse, - "plugin/installed": CodexSchema.V2PluginInstalledResponse, "plugin/read": CodexSchema.V2PluginReadResponse, - "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse, - "plugin/share/save": CodexSchema.V2PluginShareSaveResponse, - "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse, - "plugin/share/list": CodexSchema.V2PluginShareListResponse, - "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse, - "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse, - "app/read": CodexSchema.V2AppsReadResponse, "app/list": CodexSchema.V2AppsListResponse, - "app/installed": CodexSchema.V2AppsInstalledResponse, "fs/readFile": CodexSchema.V2FsReadFileResponse, "fs/writeFile": CodexSchema.V2FsWriteFileResponse, "fs/createDirectory": CodexSchema.V2FsCreateDirectoryResponse, @@ -642,9 +469,7 @@ export const CLIENT_REQUEST_RESPONSES = { "turn/interrupt": CodexSchema.V2TurnInterruptResponse, "review/start": CodexSchema.V2ReviewStartResponse, "model/list": CodexSchema.V2ModelListResponse, - "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse, "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse, - "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse, "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse, "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse, "config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse, @@ -652,15 +477,10 @@ export const CLIENT_REQUEST_RESPONSES = { "mcpServer/resource/read": CodexSchema.V2McpResourceReadResponse, "mcpServer/tool/call": CodexSchema.V2McpServerToolCallResponse, "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartResponse, - "windowsSandbox/readiness": CodexSchema.V2WindowsSandboxReadinessResponse, "account/login/start": CodexSchema.V2LoginAccountResponse, "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse, "account/logout": CodexSchema.V2LogoutAccountResponse, "account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse, - "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse, - "account/usage/read": CodexSchema.V2GetAccountTokenUsageResponse, - "account/workspaceMessages/read": CodexSchema.V2GetWorkspaceMessagesResponse, - "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailResponse, "feedback/upload": CodexSchema.V2FeedbackUploadResponse, "command/exec": CodexSchema.V2CommandExecResponse, "command/exec/write": CodexSchema.V2CommandExecWriteResponse, @@ -669,8 +489,6 @@ export const CLIENT_REQUEST_RESPONSES = { "config/read": CodexSchema.V2ConfigReadResponse, "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse, "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse, - "externalAgentConfig/import/readHistories": - CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse, "config/value/write": CodexSchema.V2ConfigWriteResponse, "config/batchWrite": CodexSchema.V2ConfigWriteResponse, "configRequirements/read": CodexSchema.V2ConfigRequirementsReadResponse, @@ -693,7 +511,6 @@ export const SERVER_REQUEST_PARAMS = { "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalParams, "item/tool/call": CodexSchema.DynamicToolCallParams, "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshParams, - "attestation/generate": CodexSchema.AttestationGenerateParams, applyPatchApproval: CodexSchema.ApplyPatchApprovalParams, execCommandApproval: CodexSchema.ExecCommandApprovalParams, } as const; @@ -706,7 +523,6 @@ export const SERVER_REQUEST_RESPONSES = { "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalResponse, "item/tool/call": CodexSchema.DynamicToolCallResponse, "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshResponse, - "attestation/generate": CodexSchema.AttestationGenerateResponse, applyPatchApproval: CodexSchema.ApplyPatchApprovalResponse, execCommandApproval: CodexSchema.ExecCommandApprovalResponse, } as const; @@ -716,16 +532,10 @@ export const SERVER_NOTIFICATION_PARAMS = { "thread/started": CodexSchema.V2ThreadStartedNotification, "thread/status/changed": CodexSchema.V2ThreadStatusChangedNotification, "thread/archived": CodexSchema.V2ThreadArchivedNotification, - "thread/deleted": CodexSchema.V2ThreadDeletedNotification, "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification, "thread/closed": CodexSchema.V2ThreadClosedNotification, "skills/changed": CodexSchema.V2SkillsChangedNotification, "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification, - "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification, - "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification, - "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification, - "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification, - "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification, "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification, "turn/started": CodexSchema.V2TurnStartedNotification, "hook/started": CodexSchema.V2HookStartedNotification, @@ -739,16 +549,12 @@ export const SERVER_NOTIFICATION_PARAMS = { CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification, "item/completed": CodexSchema.V2ItemCompletedNotification, "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification, - "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification, "item/agentMessage/delta": CodexSchema.V2AgentMessageDeltaNotification, "item/plan/delta": CodexSchema.V2PlanDeltaNotification, "command/exec/outputDelta": CodexSchema.V2CommandExecOutputDeltaNotification, - "process/outputDelta": CodexSchema.V2ProcessOutputDeltaNotification, - "process/exited": CodexSchema.V2ProcessExitedNotification, "item/commandExecution/outputDelta": CodexSchema.V2CommandExecutionOutputDeltaNotification, "item/commandExecution/terminalInteraction": CodexSchema.V2TerminalInteractionNotification, "item/fileChange/outputDelta": CodexSchema.V2FileChangeOutputDeltaNotification, - "item/fileChange/patchUpdated": CodexSchema.V2FileChangePatchUpdatedNotification, "serverRequest/resolved": CodexSchema.V2ServerRequestResolvedNotification, "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification, "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification, @@ -756,30 +562,19 @@ export const SERVER_NOTIFICATION_PARAMS = { "account/updated": CodexSchema.V2AccountUpdatedNotification, "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification, "app/list/updated": CodexSchema.V2AppListUpdatedNotification, - "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification, - "externalAgentConfig/import/progress": - CodexSchema.V2ExternalAgentConfigImportProgressNotification, - "externalAgentConfig/import/completed": - CodexSchema.V2ExternalAgentConfigImportCompletedNotification, "fs/changed": CodexSchema.V2FsChangedNotification, "item/reasoning/summaryTextDelta": CodexSchema.V2ReasoningSummaryTextDeltaNotification, "item/reasoning/summaryPartAdded": CodexSchema.V2ReasoningSummaryPartAddedNotification, "item/reasoning/textDelta": CodexSchema.V2ReasoningTextDeltaNotification, "thread/compacted": CodexSchema.V2ContextCompactedNotification, "model/rerouted": CodexSchema.V2ModelReroutedNotification, - "model/verification": CodexSchema.V2ModelVerificationNotification, - "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification, - "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification, - warning: CodexSchema.V2WarningNotification, - guardianWarning: CodexSchema.V2GuardianWarningNotification, deprecationNotice: CodexSchema.V2DeprecationNoticeNotification, configWarning: CodexSchema.V2ConfigWarningNotification, "fuzzyFileSearch/sessionUpdated": CodexSchema.FuzzyFileSearchSessionUpdatedNotification, "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification, "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification, "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification, - "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification, - "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification, + "thread/realtime/transcriptUpdated": CodexSchema.V2ThreadRealtimeTranscriptUpdatedNotification, "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification, "thread/realtime/sdp": CodexSchema.V2ThreadRealtimeSdpNotification, "thread/realtime/error": CodexSchema.V2ThreadRealtimeErrorNotification, diff --git a/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts b/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts index 8665ad6f43..baa94c8797 100644 --- a/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts +++ b/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts @@ -1,5 +1,5 @@ // This file is generated by the effect-codex-app-server package. Do not edit manually. -// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461 +// Upstream protocol ref: dbfe855f4fd0f5dcdf079882652a8efe622b0595 import * as CodexSchema from "./schema.gen.ts"; @@ -14,12 +14,8 @@ export const v2 = { AccountUpdatedNotification: CodexSchema.V2AccountUpdatedNotification, AgentMessageDeltaNotification: CodexSchema.V2AgentMessageDeltaNotification, AppListUpdatedNotification: CodexSchema.V2AppListUpdatedNotification, - AppsInstalledParams: CodexSchema.V2AppsInstalledParams, - AppsInstalledResponse: CodexSchema.V2AppsInstalledResponse, AppsListParams: CodexSchema.V2AppsListParams, AppsListResponse: CodexSchema.V2AppsListResponse, - AppsReadParams: CodexSchema.V2AppsReadParams, - AppsReadResponse: CodexSchema.V2AppsReadResponse, CancelLoginAccountParams: CodexSchema.V2CancelLoginAccountParams, CancelLoginAccountResponse: CodexSchema.V2CancelLoginAccountResponse, CommandExecOutputDeltaNotification: CodexSchema.V2CommandExecOutputDeltaNotification, @@ -39,12 +35,8 @@ export const v2 = { ConfigValueWriteParams: CodexSchema.V2ConfigValueWriteParams, ConfigWarningNotification: CodexSchema.V2ConfigWarningNotification, ConfigWriteResponse: CodexSchema.V2ConfigWriteResponse, - ConsumeAccountRateLimitResetCreditParams: CodexSchema.V2ConsumeAccountRateLimitResetCreditParams, - ConsumeAccountRateLimitResetCreditResponse: - CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse, ContextCompactedNotification: CodexSchema.V2ContextCompactedNotification, DeprecationNoticeNotification: CodexSchema.V2DeprecationNoticeNotification, - EnvironmentConnectionNotification: CodexSchema.V2EnvironmentConnectionNotification, ErrorNotification: CodexSchema.V2ErrorNotification, ExperimentalFeatureEnablementSetParams: CodexSchema.V2ExperimentalFeatureEnablementSetParams, ExperimentalFeatureEnablementSetResponse: CodexSchema.V2ExperimentalFeatureEnablementSetResponse, @@ -52,18 +44,11 @@ export const v2 = { ExperimentalFeatureListResponse: CodexSchema.V2ExperimentalFeatureListResponse, ExternalAgentConfigDetectParams: CodexSchema.V2ExternalAgentConfigDetectParams, ExternalAgentConfigDetectResponse: CodexSchema.V2ExternalAgentConfigDetectResponse, - ExternalAgentConfigImportCompletedNotification: - CodexSchema.V2ExternalAgentConfigImportCompletedNotification, - ExternalAgentConfigImportHistoriesReadResponse: - CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse, ExternalAgentConfigImportParams: CodexSchema.V2ExternalAgentConfigImportParams, - ExternalAgentConfigImportProgressNotification: - CodexSchema.V2ExternalAgentConfigImportProgressNotification, ExternalAgentConfigImportResponse: CodexSchema.V2ExternalAgentConfigImportResponse, FeedbackUploadParams: CodexSchema.V2FeedbackUploadParams, FeedbackUploadResponse: CodexSchema.V2FeedbackUploadResponse, FileChangeOutputDeltaNotification: CodexSchema.V2FileChangeOutputDeltaNotification, - FileChangePatchUpdatedNotification: CodexSchema.V2FileChangePatchUpdatedNotification, FsChangedNotification: CodexSchema.V2FsChangedNotification, FsCopyParams: CodexSchema.V2FsCopyParams, FsCopyResponse: CodexSchema.V2FsCopyResponse, @@ -86,12 +71,7 @@ export const v2 = { GetAccountParams: CodexSchema.V2GetAccountParams, GetAccountRateLimitsResponse: CodexSchema.V2GetAccountRateLimitsResponse, GetAccountResponse: CodexSchema.V2GetAccountResponse, - GetAccountTokenUsageResponse: CodexSchema.V2GetAccountTokenUsageResponse, - GetWorkspaceMessagesResponse: CodexSchema.V2GetWorkspaceMessagesResponse, - GuardianWarningNotification: CodexSchema.V2GuardianWarningNotification, HookCompletedNotification: CodexSchema.V2HookCompletedNotification, - HooksListParams: CodexSchema.V2HooksListParams, - HooksListResponse: CodexSchema.V2HooksListResponse, HookStartedNotification: CodexSchema.V2HookStartedNotification, ItemCompletedNotification: CodexSchema.V2ItemCompletedNotification, ItemGuardianApprovalReviewCompletedNotification: @@ -104,12 +84,6 @@ export const v2 = { LoginAccountParams: CodexSchema.V2LoginAccountParams, LoginAccountResponse: CodexSchema.V2LoginAccountResponse, LogoutAccountResponse: CodexSchema.V2LogoutAccountResponse, - MarketplaceAddParams: CodexSchema.V2MarketplaceAddParams, - MarketplaceAddResponse: CodexSchema.V2MarketplaceAddResponse, - MarketplaceRemoveParams: CodexSchema.V2MarketplaceRemoveParams, - MarketplaceRemoveResponse: CodexSchema.V2MarketplaceRemoveResponse, - MarketplaceUpgradeParams: CodexSchema.V2MarketplaceUpgradeParams, - MarketplaceUpgradeResponse: CodexSchema.V2MarketplaceUpgradeResponse, McpResourceReadParams: CodexSchema.V2McpResourceReadParams, McpResourceReadResponse: CodexSchema.V2McpResourceReadResponse, McpServerOauthLoginCompletedNotification: CodexSchema.V2McpServerOauthLoginCompletedNotification, @@ -122,81 +96,37 @@ export const v2 = { McpToolCallProgressNotification: CodexSchema.V2McpToolCallProgressNotification, ModelListParams: CodexSchema.V2ModelListParams, ModelListResponse: CodexSchema.V2ModelListResponse, - ModelProviderCapabilitiesReadParams: CodexSchema.V2ModelProviderCapabilitiesReadParams, - ModelProviderCapabilitiesReadResponse: CodexSchema.V2ModelProviderCapabilitiesReadResponse, ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification, - ModelSafetyBufferingUpdatedNotification: CodexSchema.V2ModelSafetyBufferingUpdatedNotification, - ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification, - PermissionProfileListParams: CodexSchema.V2PermissionProfileListParams, - PermissionProfileListResponse: CodexSchema.V2PermissionProfileListResponse, PlanDeltaNotification: CodexSchema.V2PlanDeltaNotification, - PluginInstalledParams: CodexSchema.V2PluginInstalledParams, - PluginInstalledResponse: CodexSchema.V2PluginInstalledResponse, PluginInstallParams: CodexSchema.V2PluginInstallParams, PluginInstallResponse: CodexSchema.V2PluginInstallResponse, PluginListParams: CodexSchema.V2PluginListParams, PluginListResponse: CodexSchema.V2PluginListResponse, PluginReadParams: CodexSchema.V2PluginReadParams, PluginReadResponse: CodexSchema.V2PluginReadResponse, - PluginShareCheckoutParams: CodexSchema.V2PluginShareCheckoutParams, - PluginShareCheckoutResponse: CodexSchema.V2PluginShareCheckoutResponse, - PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams, - PluginShareDeleteResponse: CodexSchema.V2PluginShareDeleteResponse, - PluginShareListParams: CodexSchema.V2PluginShareListParams, - PluginShareListResponse: CodexSchema.V2PluginShareListResponse, - PluginShareSaveParams: CodexSchema.V2PluginShareSaveParams, - PluginShareSaveResponse: CodexSchema.V2PluginShareSaveResponse, - PluginShareUpdateTargetsParams: CodexSchema.V2PluginShareUpdateTargetsParams, - PluginShareUpdateTargetsResponse: CodexSchema.V2PluginShareUpdateTargetsResponse, - PluginSkillReadParams: CodexSchema.V2PluginSkillReadParams, - PluginSkillReadResponse: CodexSchema.V2PluginSkillReadResponse, PluginUninstallParams: CodexSchema.V2PluginUninstallParams, PluginUninstallResponse: CodexSchema.V2PluginUninstallResponse, - ProcessExitedNotification: CodexSchema.V2ProcessExitedNotification, - ProcessOutputDeltaNotification: CodexSchema.V2ProcessOutputDeltaNotification, - RawResponseCompletedNotification: CodexSchema.V2RawResponseCompletedNotification, RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification, ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification, ReasoningSummaryTextDeltaNotification: CodexSchema.V2ReasoningSummaryTextDeltaNotification, ReasoningTextDeltaNotification: CodexSchema.V2ReasoningTextDeltaNotification, - RemoteControlStatusChangedNotification: CodexSchema.V2RemoteControlStatusChangedNotification, ReviewStartParams: CodexSchema.V2ReviewStartParams, ReviewStartResponse: CodexSchema.V2ReviewStartResponse, - SendAddCreditsNudgeEmailParams: CodexSchema.V2SendAddCreditsNudgeEmailParams, - SendAddCreditsNudgeEmailResponse: CodexSchema.V2SendAddCreditsNudgeEmailResponse, ServerRequestResolvedNotification: CodexSchema.V2ServerRequestResolvedNotification, SkillsChangedNotification: CodexSchema.V2SkillsChangedNotification, SkillsConfigWriteParams: CodexSchema.V2SkillsConfigWriteParams, SkillsConfigWriteResponse: CodexSchema.V2SkillsConfigWriteResponse, - SkillsExtraRootsSetParams: CodexSchema.V2SkillsExtraRootsSetParams, - SkillsExtraRootsSetResponse: CodexSchema.V2SkillsExtraRootsSetResponse, SkillsListParams: CodexSchema.V2SkillsListParams, SkillsListResponse: CodexSchema.V2SkillsListResponse, TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification, - ThreadApproveGuardianDeniedActionParams: CodexSchema.V2ThreadApproveGuardianDeniedActionParams, - ThreadApproveGuardianDeniedActionResponse: - CodexSchema.V2ThreadApproveGuardianDeniedActionResponse, ThreadArchivedNotification: CodexSchema.V2ThreadArchivedNotification, ThreadArchiveParams: CodexSchema.V2ThreadArchiveParams, ThreadArchiveResponse: CodexSchema.V2ThreadArchiveResponse, ThreadClosedNotification: CodexSchema.V2ThreadClosedNotification, ThreadCompactStartParams: CodexSchema.V2ThreadCompactStartParams, ThreadCompactStartResponse: CodexSchema.V2ThreadCompactStartResponse, - ThreadDeletedNotification: CodexSchema.V2ThreadDeletedNotification, - ThreadDeleteParams: CodexSchema.V2ThreadDeleteParams, - ThreadDeleteResponse: CodexSchema.V2ThreadDeleteResponse, ThreadForkParams: CodexSchema.V2ThreadForkParams, ThreadForkResponse: CodexSchema.V2ThreadForkResponse, - ThreadGoalClearedNotification: CodexSchema.V2ThreadGoalClearedNotification, - ThreadGoalClearParams: CodexSchema.V2ThreadGoalClearParams, - ThreadGoalClearResponse: CodexSchema.V2ThreadGoalClearResponse, - ThreadGoalGetParams: CodexSchema.V2ThreadGoalGetParams, - ThreadGoalGetResponse: CodexSchema.V2ThreadGoalGetResponse, - ThreadGoalSetParams: CodexSchema.V2ThreadGoalSetParams, - ThreadGoalSetResponse: CodexSchema.V2ThreadGoalSetResponse, - ThreadGoalUpdatedNotification: CodexSchema.V2ThreadGoalUpdatedNotification, - ThreadInjectItemsParams: CodexSchema.V2ThreadInjectItemsParams, - ThreadInjectItemsResponse: CodexSchema.V2ThreadInjectItemsResponse, ThreadListParams: CodexSchema.V2ThreadListParams, ThreadListResponse: CodexSchema.V2ThreadListResponse, ThreadLoadedListParams: CodexSchema.V2ThreadLoadedListParams, @@ -213,16 +143,14 @@ export const v2 = { CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification, ThreadRealtimeSdpNotification: CodexSchema.V2ThreadRealtimeSdpNotification, ThreadRealtimeStartedNotification: CodexSchema.V2ThreadRealtimeStartedNotification, - ThreadRealtimeTranscriptDeltaNotification: - CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification, - ThreadRealtimeTranscriptDoneNotification: CodexSchema.V2ThreadRealtimeTranscriptDoneNotification, + ThreadRealtimeTranscriptUpdatedNotification: + CodexSchema.V2ThreadRealtimeTranscriptUpdatedNotification, ThreadResumeParams: CodexSchema.V2ThreadResumeParams, ThreadResumeResponse: CodexSchema.V2ThreadResumeResponse, ThreadRollbackParams: CodexSchema.V2ThreadRollbackParams, ThreadRollbackResponse: CodexSchema.V2ThreadRollbackResponse, ThreadSetNameParams: CodexSchema.V2ThreadSetNameParams, ThreadSetNameResponse: CodexSchema.V2ThreadSetNameResponse, - ThreadSettingsUpdatedNotification: CodexSchema.V2ThreadSettingsUpdatedNotification, ThreadShellCommandParams: CodexSchema.V2ThreadShellCommandParams, ThreadShellCommandResponse: CodexSchema.V2ThreadShellCommandResponse, ThreadStartedNotification: CodexSchema.V2ThreadStartedNotification, @@ -239,15 +167,12 @@ export const v2 = { TurnDiffUpdatedNotification: CodexSchema.V2TurnDiffUpdatedNotification, TurnInterruptParams: CodexSchema.V2TurnInterruptParams, TurnInterruptResponse: CodexSchema.V2TurnInterruptResponse, - TurnModerationMetadataNotification: CodexSchema.V2TurnModerationMetadataNotification, TurnPlanUpdatedNotification: CodexSchema.V2TurnPlanUpdatedNotification, TurnStartedNotification: CodexSchema.V2TurnStartedNotification, TurnStartParams: CodexSchema.V2TurnStartParams, TurnStartResponse: CodexSchema.V2TurnStartResponse, TurnSteerParams: CodexSchema.V2TurnSteerParams, TurnSteerResponse: CodexSchema.V2TurnSteerResponse, - WarningNotification: CodexSchema.V2WarningNotification, - WindowsSandboxReadinessResponse: CodexSchema.V2WindowsSandboxReadinessResponse, WindowsSandboxSetupCompletedNotification: CodexSchema.V2WindowsSandboxSetupCompletedNotification, WindowsSandboxSetupStartParams: CodexSchema.V2WindowsSandboxSetupStartParams, WindowsSandboxSetupStartResponse: CodexSchema.V2WindowsSandboxSetupStartResponse, diff --git a/packages/effect-codex-app-server/src/_generated/schema.gen.ts b/packages/effect-codex-app-server/src/_generated/schema.gen.ts index d826df60f1..5f2119a19b 100644 --- a/packages/effect-codex-app-server/src/_generated/schema.gen.ts +++ b/packages/effect-codex-app-server/src/_generated/schema.gen.ts @@ -1,5 +1,5 @@ // This file is generated by the effect-codex-app-server package. Do not edit manually. -// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461 +// Upstream protocol ref: dbfe855f4fd0f5dcdf079882652a8efe622b0595 import * as Schema from "effect/Schema"; @@ -45,64 +45,15 @@ export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); -export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit"; -export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]); - -export type ClientRequest__AdditionalContextKind = "untrusted" | "application"; -export const ClientRequest__AdditionalContextKind = Schema.Literals(["untrusted", "application"]); - -export type ClientRequest__AgentMessageInputContent = - | { readonly text: string; readonly type: "input_text" } - | { readonly encrypted_content: string; readonly type: "encrypted_content" }; -export const ClientRequest__AgentMessageInputContent = Schema.Union( - [ - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("input_text").annotate({ - title: "InputTextAgentMessageInputContentType", - }), - }).annotate({ title: "InputTextAgentMessageInputContent" }), - Schema.Struct({ - encrypted_content: Schema.String, - type: Schema.Literal("encrypted_content").annotate({ - title: "EncryptedContentAgentMessageInputContentType", - }), - }).annotate({ title: "EncryptedContentAgentMessageInputContent" }), - ], - { mode: "oneOf" }, -); - -export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type ClientRequest__ApprovalsReviewer = "user" | "guardian_subagent"; export const ClientRequest__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); -export type ClientRequest__AppsInstalledParams = { - readonly forceRefresh?: boolean; - readonly threadId?: string | null; -}; -export const ClientRequest__AppsInstalledParams = Schema.Struct({ - forceRefresh: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.", - }), - ), - threadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional loaded thread id used to evaluate effective app configuration.", - }), - Schema.Null, - ]), - ), -}).annotate({ description: "Read the committed installed connector runtime snapshot." }); - export type ClientRequest__AppsListParams = { readonly cursor?: string | null; readonly forceRefetch?: boolean; @@ -145,25 +96,9 @@ export const ClientRequest__AppsListParams = Schema.Struct({ ), }).annotate({ description: "EXPERIMENTAL - list available apps/connectors." }); -export type ClientRequest__AppsReadParams = { - readonly appIds: ReadonlyArray; - readonly includeTools?: boolean; -}; -export const ClientRequest__AppsReadParams = Schema.Struct({ - appIds: Schema.Array(Schema.String).annotate({ - description: - "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.", - }), - includeTools: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "When true, include display-only public tool summaries in the returned metadata.", - }), - ), -}).annotate({ description: "EXPERIMENTAL - read metadata for specific apps/connectors." }); - export type ClientRequest__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -177,7 +112,7 @@ export type ClientRequest__AskForApproval = }; export const ClientRequest__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -282,9 +217,6 @@ export const ClientRequest__CommandExecWriteParams = Schema.Struct({ description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.", }); -export type ClientRequest__CommandMigration = { readonly name: string }; -export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }); - export type ClientRequest__ConfigReadParams = { readonly cwd?: string | null; readonly includeLayers?: boolean; @@ -299,52 +231,27 @@ export const ClientRequest__ConfigReadParams = Schema.Struct({ Schema.Null, ]), ), - includeLayers: Schema.optionalKey(Schema.Boolean), + includeLayers: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }); -export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = { - readonly creditId?: string | null; - readonly idempotencyKey: string; -}; -export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({ - creditId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.", - }), - Schema.Null, - ]), - ), - idempotencyKey: Schema.String.annotate({ - description: - "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.", - }), -}); - -export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant"; -export const ClientRequest__ConversationTextRole = Schema.Literals([ - "user", - "developer", - "assistant", -]); - -export type ClientRequest__DynamicToolNamespaceTool = { - readonly deferLoading?: boolean; - readonly description: string; - readonly inputSchema: unknown; - readonly name: string; - readonly type: "function"; -}; -export const ClientRequest__DynamicToolNamespaceTool = Schema.Union( +export type ClientRequest__ContentItem = + | { readonly text: string; readonly type: "input_text" } + | { readonly image_url: string; readonly type: "input_image" } + | { readonly text: string; readonly type: "output_text" }; +export const ClientRequest__ContentItem = Schema.Union( [ Schema.Struct({ - deferLoading: Schema.optionalKey(Schema.Boolean), - description: Schema.String, - inputSchema: Schema.Unknown, - name: Schema.String, - type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }), - }).annotate({ title: "FunctionDynamicToolNamespaceTool" }), + text: Schema.String, + type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }), + }).annotate({ title: "InputTextContentItem" }), + Schema.Struct({ + image_url: Schema.String, + type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), + }).annotate({ title: "InputImageContentItem" }), + Schema.Struct({ + text: Schema.String, + type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), + }).annotate({ title: "OutputTextContentItem" }), ], { mode: "oneOf" }, ); @@ -362,7 +269,6 @@ export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Stru export type ClientRequest__ExperimentalFeatureListParams = { readonly cursor?: string | null; readonly limit?: number | null; - readonly threadId?: string | null; }; export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({ cursor: Schema.optionalKey( @@ -384,22 +290,11 @@ export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({ Schema.Null, ]), ), - threadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.", - }), - Schema.Null, - ]), - ), }); export type ClientRequest__ExternalAgentConfigDetectParams = { readonly cwds?: ReadonlyArray | null; readonly includeHome?: boolean; - readonly migrationSource?: string | null; - readonly source?: string | null; }; export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -412,69 +307,35 @@ export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({ ), includeHome: Schema.optionalKey( Schema.Boolean.annotate({ - description: "If true, include detection under the user's home directory.", + description: "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", }), ), - migrationSource: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional migration-source selector. Missing or unrecognized values use the default source.", - }), - Schema.Null, - ]), - ), - source: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.", - }), - Schema.Null, - ]), - ), }); export type ClientRequest__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; + | "MCP_SERVER_CONFIG"; export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([ "AGENTS_MD", "CONFIG", "SKILLS", - "PLUGINS", "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", ]); export type ClientRequest__FeedbackUploadParams = { readonly classification: string; readonly extraLogFiles?: ReadonlyArray | null; - readonly includeLogs?: boolean; + readonly includeLogs: boolean; readonly reason?: string | null; - readonly tags?: { readonly [x: string]: string } | null; readonly threadId?: string | null; }; export const ClientRequest__FeedbackUploadParams = Schema.Struct({ classification: Schema.String, extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), - includeLogs: Schema.optionalKey(Schema.Boolean), + includeLogs: Schema.Boolean, reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - tags: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); @@ -617,30 +478,30 @@ export const ClientRequest__GetAccountParams = Schema.Struct({ Schema.Boolean.annotate({ description: "When `true`, requests a proactive token refresh before returning.\n\nIn 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`.", + default: false, }), ), }); -export type ClientRequest__HookMigration = { readonly name: string }; -export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String }); - -export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray }; -export const ClientRequest__HooksListParams = Schema.Struct({ - cwds: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: "When empty, defaults to the current session working directory.", - }), - ), -}); +export type ClientRequest__GhostCommit = { + readonly id: string; + readonly parent?: string | null; + readonly preexisting_untracked_dirs: ReadonlyArray; + readonly preexisting_untracked_files: ReadonlyArray; +}; +export const ClientRequest__GhostCommit = Schema.Struct({ + id: Schema.String, + parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + preexisting_untracked_dirs: Schema.Array(Schema.String), + preexisting_untracked_files: Schema.Array(Schema.String), +}).annotate({ description: "Details of a ghost commit created from a repository state." }); export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original"; export const ClientRequest__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]); export type ClientRequest__InitializeCapabilities = { readonly experimentalApi?: boolean; - readonly mcpServerOpenaiFormElicitation?: boolean; readonly optOutNotificationMethods?: ReadonlyArray | null; - readonly requestAttestation?: boolean; }; export const ClientRequest__InitializeCapabilities = Schema.Struct({ experimentalApi: Schema.optionalKey( @@ -649,11 +510,6 @@ export const ClientRequest__InitializeCapabilities = Schema.Struct({ default: false, }), ), - mcpServerOpenaiFormElicitation: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Allow downstream MCP servers to request OpenAI extended form elicitations.", - }), - ), optOutNotificationMethods: Schema.optionalKey( Schema.Union([ Schema.Array(Schema.String).annotate({ @@ -663,27 +519,8 @@ export const ClientRequest__InitializeCapabilities = Schema.Struct({ Schema.Null, ]), ), - requestAttestation: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.", - default: false, - }), - ), }).annotate({ description: "Client-declared capabilities negotiated during initialize." }); -export type ClientRequest__InternalChatMessageMetadataPassthrough = { - readonly turn_id?: string | null; -}; -export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({ - turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ - description: - "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.", -}); - -export type ClientRequest__LegacyAppPathString = string; -export const ClientRequest__LegacyAppPathString = Schema.String; - export type ClientRequest__LocalShellAction = { readonly command: ReadonlyArray; readonly env?: { readonly [x: string]: string } | null; @@ -722,54 +559,78 @@ export const ClientRequest__LocalShellStatus = Schema.Literals([ "incomplete", ]); -export type ClientRequest__LoginAppBrand = "codex" | "chatgpt"; -export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]); - -export type ClientRequest__MarketplaceAddParams = { - readonly refName?: string | null; - readonly source: string; - readonly sparsePaths?: ReadonlyArray | null; -}; -export const ClientRequest__MarketplaceAddParams = Schema.Struct({ - refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - source: Schema.String, - sparsePaths: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), -}); - -export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string }; -export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({ - marketplaceName: Schema.String, -}); - -export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null }; -export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({ - marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); +export type ClientRequest__LoginAccountParams = + | { readonly apiKey: string; readonly type: "apiKey" } + | { readonly type: "chatgpt" } + | { readonly type: "chatgptDeviceCode" } + | { + readonly accessToken: string; + readonly chatgptAccountId: string; + readonly chatgptPlanType?: string | null; + readonly type: "chatgptAuthTokens"; + }; +export const ClientRequest__LoginAccountParams = Schema.Union( + [ + Schema.Struct({ + apiKey: Schema.String, + type: Schema.Literal("apiKey").annotate({ title: "ApiKeyLoginAccountParamsType" }), + }).annotate({ title: "ApiKeyLoginAccountParams" }), + Schema.Struct({ + type: Schema.Literal("chatgpt").annotate({ title: "ChatgptLoginAccountParamsType" }), + }).annotate({ title: "ChatgptLoginAccountParams" }), + Schema.Struct({ + type: Schema.Literal("chatgptDeviceCode").annotate({ + title: "ChatgptDeviceCodeLoginAccountParamsType", + }), + }).annotate({ title: "ChatgptDeviceCodeLoginAccountParams" }), + Schema.Struct({ + accessToken: Schema.String.annotate({ + description: + "Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.", + }), + chatgptAccountId: Schema.String.annotate({ + description: "Workspace/account identifier supplied by the client.", + }), + chatgptPlanType: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.", + }), + Schema.Null, + ]), + ), + type: Schema.Literal("chatgptAuthTokens").annotate({ + title: "ChatgptAuthTokensLoginAccountParamsType", + }), + }).annotate({ + title: "ChatgptAuthTokensLoginAccountParams", + description: + "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.", + }), + ], + { mode: "oneOf" }, +); export type ClientRequest__McpResourceReadParams = { readonly server: string; - readonly threadId?: string | null; + readonly threadId: string; readonly uri: string; }; export const ClientRequest__McpResourceReadParams = Schema.Struct({ server: Schema.String, - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + threadId: Schema.String, uri: Schema.String, }); -export type ClientRequest__McpServerMigration = { readonly name: string }; -export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String }); - export type ClientRequest__McpServerOauthLoginParams = { readonly name: string; readonly scopes?: ReadonlyArray | null; - readonly threadId?: string | null; readonly timeoutSecs?: number | null; }; export const ClientRequest__McpServerOauthLoginParams = Schema.Struct({ name: Schema.String, scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), timeoutSecs: Schema.optionalKey( Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), ), @@ -844,126 +705,41 @@ export const ClientRequest__ModelListParams = Schema.Struct({ ), }); -export type ClientRequest__ModelProviderCapabilitiesReadParams = {}; -export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Struct({}); - -export type ClientRequest__PermissionProfileListParams = { - readonly cursor?: string | null; - readonly cwd?: string | null; - readonly limit?: number | null; -}; -export const ClientRequest__PermissionProfileListParams = Schema.Struct({ - cursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Opaque pagination cursor returned by a previous call.", - }), - Schema.Null, - ]), - ), - cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional working directory to resolve project config layers.", - }), - Schema.Null, - ]), - ), - limit: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Optional page size; defaults to the full result set.", - format: "uint32", - }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), -}); - export type ClientRequest__Personality = "none" | "friendly" | "pragmatic"; export const ClientRequest__Personality = Schema.Literals(["none", "friendly", "pragmatic"]); -export type ClientRequest__PluginListMarketplaceKind = - | "local" - | "vertical" - | "workspace-directory" - | "shared-with-me" - | "created-by-me-remote"; -export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([ - "local", - "vertical", - "workspace-directory", - "shared-with-me", - "created-by-me-remote", -]); - -export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string }; -export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({ - remotePluginId: Schema.String, -}); - -export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string }; -export const ClientRequest__PluginShareDeleteParams = Schema.Struct({ - remotePluginId: Schema.String, -}); - -export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE"; -export const ClientRequest__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type ClientRequest__PluginShareListParams = {}; -export const ClientRequest__PluginShareListParams = Schema.Struct({}); - -export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace"; -export const ClientRequest__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - -export type ClientRequest__PluginShareTargetRole = "reader" | "editor"; -export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]); - -export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED"; -export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([ - "UNLISTED", - "PRIVATE", - "LISTED", -]); - -export type ClientRequest__PluginSkillReadParams = { - readonly remoteMarketplaceName: string; - readonly remotePluginId: string; - readonly skillName: string; +export type ClientRequest__PluginUninstallParams = { + readonly forceRemoteSync?: boolean; + readonly pluginId: string; }; -export const ClientRequest__PluginSkillReadParams = Schema.Struct({ - remoteMarketplaceName: Schema.String, - remotePluginId: Schema.String, - skillName: Schema.String, +export const ClientRequest__PluginUninstallParams = Schema.Struct({ + forceRemoteSync: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "When true, apply the remote plugin change before the local uninstall flow.", + }), + ), + pluginId: Schema.String, }); -export type ClientRequest__PluginUninstallParams = { readonly pluginId: string }; -export const ClientRequest__PluginUninstallParams = Schema.Struct({ pluginId: Schema.String }); - -export type ClientRequest__PluginsMigration = { - readonly marketplaceName: string; - readonly pluginNames: ReadonlyArray; -}; -export const ClientRequest__PluginsMigration = Schema.Struct({ - marketplaceName: Schema.String, - pluginNames: Schema.Array(Schema.String), +export type ClientRequest__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const ClientRequest__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", }); -export type ClientRequest__ReasoningEffort = string; -export const ClientRequest__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - export type ClientRequest__ReasoningItemContent = | { readonly text: string; readonly type: "reasoning_text" } | { readonly text: string; readonly type: "text" }; @@ -1115,43 +891,18 @@ export const ClientRequest__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type ClientRequest__SessionMigration = { +export type ClientRequest__ServiceTier = "fast" | "flex"; +export const ClientRequest__ServiceTier = Schema.Literals(["fast", "flex"]); + +export type ClientRequest__SkillsListExtraRootsForCwd = { readonly cwd: string; - readonly path: string; - readonly title?: string | null; + readonly extraUserRoots: ReadonlyArray; }; -export const ClientRequest__SessionMigration = Schema.Struct({ +export const ClientRequest__SkillsListExtraRootsForCwd = Schema.Struct({ cwd: Schema.String, - path: Schema.String, - title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + extraUserRoots: Schema.Array(Schema.String), }); -export type ClientRequest__SkillMigration = { readonly name: string }; -export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String }); - -export type ClientRequest__SkillsListParams = { - readonly cwds?: ReadonlyArray; - readonly forceReload?: boolean; -}; -export const ClientRequest__SkillsListParams = Schema.Struct({ - cwds: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: "When empty, defaults to the current session working directory.", - }), - ), - forceReload: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "When true, bypass the skills cache and re-scan skills from disk.", - }), - ), -}); - -export type ClientRequest__SortDirection = "asc" | "desc"; -export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]); - -export type ClientRequest__SubagentMigration = { readonly name: string }; -export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String }); - export type ClientRequest__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -1177,65 +928,12 @@ export const ClientRequest__TextElement = Schema.Struct({ ), }); -export type ClientRequest__ThreadApproveGuardianDeniedActionParams = { - readonly event: unknown; - readonly threadId: string; -}; -export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({ - event: Schema.Unknown.annotate({ - description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.", - }), - threadId: Schema.String, -}); - export type ClientRequest__ThreadArchiveParams = { readonly threadId: string }; export const ClientRequest__ThreadArchiveParams = Schema.Struct({ threadId: Schema.String }); export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string }; export const ClientRequest__ThreadCompactStartParams = Schema.Struct({ threadId: Schema.String }); -export type ClientRequest__ThreadDeleteParams = { readonly threadId: string }; -export const ClientRequest__ThreadDeleteParams = Schema.Struct({ threadId: Schema.String }); - -export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string }; -export const ClientRequest__ThreadGoalClearParams = Schema.Struct({ threadId: Schema.String }); - -export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string }; -export const ClientRequest__ThreadGoalGetParams = Schema.Struct({ threadId: Schema.String }); - -export type ClientRequest__ThreadGoalStatus = - | "active" - | "paused" - | "blocked" - | "usageLimited" - | "budgetLimited" - | "complete"; -export const ClientRequest__ThreadGoalStatus = Schema.Literals([ - "active", - "paused", - "blocked", - "usageLimited", - "budgetLimited", - "complete", -]); - -export type ClientRequest__ThreadInjectItemsParams = { - readonly items: ReadonlyArray; - readonly threadId: string; -}; -export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({ - items: Schema.Array(Schema.Unknown).annotate({ - description: "Raw Responses API items to append to the thread's model-visible history.", - }), - threadId: Schema.String, -}); - -export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray; -export const ClientRequest__ThreadListCwdFilter = Schema.Union([ - Schema.String, - Schema.Array(Schema.String), -]); - export type ClientRequest__ThreadLoadedListParams = { readonly cursor?: string | null; readonly limit?: number | null; @@ -1305,6 +1003,7 @@ export const ClientRequest__ThreadReadParams = Schema.Struct({ includeTurns: Schema.optionalKey( Schema.Boolean.annotate({ description: "When true, include turns and their items from rollout history.", + default: false, }), ), threadId: Schema.String, @@ -1323,7 +1022,7 @@ export const ClientRequest__ThreadRollbackParams = Schema.Struct({ .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), threadId: Schema.String, -}).annotate({ description: "DEPRECATED: `thread/rollback` will be removed soon." }); +}); export type ClientRequest__ThreadSetNameParams = { readonly name: string; @@ -1346,15 +1045,8 @@ export const ClientRequest__ThreadShellCommandParams = Schema.Struct({ threadId: Schema.String, }); -export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at"; -export const ClientRequest__ThreadSortKey = Schema.Literals([ - "created_at", - "updated_at", - "recency_at", -]); - -export type ClientRequest__ThreadSource = string; -export const ClientRequest__ThreadSource = Schema.String; +export type ClientRequest__ThreadSortKey = "created_at" | "updated_at"; +export const ClientRequest__ThreadSortKey = Schema.Literals(["created_at", "updated_at"]); export type ClientRequest__ThreadSourceKind = | "cli" @@ -1398,9 +1090,6 @@ export const ClientRequest__TurnInterruptParams = Schema.Struct({ turnId: Schema.String, }); -export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full"; -export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]); - export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated"; export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals(["elevated", "unelevated"]); @@ -1417,15 +1106,47 @@ export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }); -export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny"; -export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([ - "read", - "write", - "deny", -]); - -export type CommandExecutionRequestApprovalParams__LegacyAppPathString = string; -export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String; +export type CommandExecutionRequestApprovalParams__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const CommandExecutionRequestApprovalParams__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); export type CommandExecutionRequestApprovalParams__NetworkApprovalProtocol = | "http" @@ -1453,8 +1174,7 @@ export const CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = export type DynamicToolCallResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -1469,12 +1189,6 @@ export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema. title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -1690,15 +1404,11 @@ export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Sc enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }); -export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny"; -export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Literals([ - "read", - "write", - "deny", -]); - -export type PermissionsRequestApprovalParams__LegacyAppPathString = string; -export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String; +export type PermissionsRequestApprovalResponse__AbsolutePathBuf = string; +export const PermissionsRequestApprovalResponse__AbsolutePathBuf = Schema.String.annotate({ + description: + "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +}); export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = { readonly enabled?: boolean | null; @@ -1707,16 +1417,6 @@ export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }); -export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny"; -export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([ - "read", - "write", - "deny", -]); - -export type PermissionsRequestApprovalResponse__LegacyAppPathString = string; -export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String; - export type ServerNotification__AbsolutePathBuf = string; export const ServerNotification__AbsolutePathBuf = Schema.String.annotate({ description: @@ -1734,33 +1434,6 @@ export const ServerNotification__AccountLoginCompletedNotification = Schema.Stru success: Schema.Boolean, }); -export type ServerNotification__ActivePermissionProfile = { - readonly extends?: string | null; - readonly id: string; -}; -export const ServerNotification__ActivePermissionProfile = Schema.Struct({ - extends: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Parent profile identifier from the selected permissions profile's `extends` setting, when present.", - }), - Schema.Null, - ]), - ), - id: Schema.String.annotate({ - description: - "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", - }), -}); - -export type ServerNotification__AdditionalNetworkPermissions = { - readonly enabled?: boolean | null; -}; -export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({ - enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), -}); - export type ServerNotification__AgentMessageDeltaNotification = { readonly delta: string; readonly itemId: string; @@ -1808,66 +1481,16 @@ export const ServerNotification__AppScreenshot = Schema.Struct({ userPrompt: Schema.String, }); -export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; -export const ServerNotification__ApprovalsReviewer = Schema.Literals([ - "user", - "auto_review", - "guardian_subagent", -]).annotate({ - description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", -}); - -export type ServerNotification__AskForApproval = - | "untrusted" - | "on-request" - | "never" - | { - readonly granular: { - readonly mcp_elicitations: boolean; - readonly request_permissions?: boolean; - readonly rules: boolean; - readonly sandbox_approval: boolean; - readonly skill_approval?: boolean; - }; - }; -export const ServerNotification__AskForApproval = Schema.Union( - [ - Schema.Literals(["untrusted", "on-request", "never"]), - Schema.Struct({ - granular: Schema.Struct({ - mcp_elicitations: Schema.Boolean, - request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - rules: Schema.Boolean, - sandbox_approval: Schema.Boolean, - skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - }), - }).annotate({ title: "GranularAskForApproval" }), - ], - { mode: "oneOf" }, -); - -export type ServerNotification__AuthMode = - | "apikey" - | "chatgpt" - | "chatgptAuthTokens" - | "headers" - | "agentIdentity" - | "personalAccessToken" - | "bedrockApiKey"; +export type ServerNotification__AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; export const ServerNotification__AuthMode = Schema.Literals([ "apikey", "chatgpt", "chatgptAuthTokens", - "headers", - "agentIdentity", - "personalAccessToken", - "bedrockApiKey", ]).annotate({ description: "Authentication mode for OpenAI-backed providers." }); export type ServerNotification__AutoReviewDecisionSource = "agent"; export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({ - description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.", + description: "[UNSTABLE] Source that produced a terminal guardian approval review decision.", }); export type ServerNotification__CollabAgentStatus = @@ -1888,6 +1511,48 @@ export const ServerNotification__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type ServerNotification__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const ServerNotification__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type ServerNotification__CommandExecOutputDeltaNotification = { readonly capReached: boolean; readonly deltaBase64: string; @@ -1975,8 +1640,7 @@ export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({ export type ServerNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -1991,12 +1655,6 @@ export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -2008,39 +1666,6 @@ export const ServerNotification__DynamicToolCallStatus = Schema.Literals([ "failed", ]); -export type ServerNotification__EnvironmentConnectionNotification = { - readonly environmentId: string; - readonly threadId: string; -}; -export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({ - environmentId: Schema.String, - threadId: Schema.String, -}); - -export type ServerNotification__ExternalAgentConfigMigrationItemType = - | "AGENTS_MD" - | "CONFIG" - | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; -export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([ - "AGENTS_MD", - "CONFIG", - "SKILLS", - "PLUGINS", - "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", -]); - export type ServerNotification__FileChangeOutputDeltaNotification = { readonly delta: string; readonly itemId: string; @@ -2052,14 +1677,8 @@ export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Stru itemId: Schema.String, threadId: Schema.String, turnId: Schema.String, -}).annotate({ - description: - "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.", }); -export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny"; -export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]); - export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory"; export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals(["file", "directory"]); @@ -2093,7 +1712,7 @@ export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals( "denied", "timedOut", "aborted", -]).annotate({ description: "[UNSTABLE] Lifecycle state for an approval auto-review." }); +]).annotate({ description: "[UNSTABLE] Lifecycle state for a guardian approval review." }); export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec"; export const ServerNotification__GuardianCommandSource = Schema.Literals(["shell", "unifiedExec"]); @@ -2104,7 +1723,7 @@ export const ServerNotification__GuardianRiskLevel = Schema.Literals([ "medium", "high", "critical", -]).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." }); +]).annotate({ description: "[UNSTABLE] Risk level assigned by guardian approval review." }); export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high"; export const ServerNotification__GuardianUserAuthorization = Schema.Literals([ @@ -2112,42 +1731,21 @@ export const ServerNotification__GuardianUserAuthorization = Schema.Literals([ "low", "medium", "high", -]).annotate({ description: "[UNSTABLE] Authorization level assigned by approval auto-review." }); - -export type ServerNotification__GuardianWarningNotification = { - readonly message: string; - readonly threadId: string; -}; -export const ServerNotification__GuardianWarningNotification = Schema.Struct({ - message: Schema.String.annotate({ - description: "Concise guardian warning message for the user.", - }), - threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }), +]).annotate({ + description: "[UNSTABLE] Authorization level assigned by guardian approval review.", }); export type ServerNotification__HookEventName = | "preToolUse" - | "permissionRequest" | "postToolUse" - | "preCompact" - | "postCompact" | "sessionStart" - | "sessionEnd" | "userPromptSubmit" - | "subagentStart" - | "subagentStop" | "stop"; export const ServerNotification__HookEventName = Schema.Literals([ "preToolUse", - "permissionRequest", "postToolUse", - "preCompact", - "postCompact", "sessionStart", - "sessionEnd", "userPromptSubmit", - "subagentStart", - "subagentStop", "stop", ]); @@ -2197,30 +1795,17 @@ export const ServerNotification__HookRunStatus = Schema.Literals([ export type ServerNotification__HookScope = "thread" | "turn"; export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]); -export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original"; -export const ServerNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]); - -export type ServerNotification__LegacyAppPathString = string; -export const ServerNotification__LegacyAppPathString = Schema.String; - export type ServerNotification__McpServerOauthLoginCompletedNotification = { readonly error?: string | null; readonly name: string; readonly success: boolean; - readonly threadId?: string | null; }; export const ServerNotification__McpServerOauthLoginCompletedNotification = Schema.Struct({ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), name: Schema.String, success: Schema.Boolean, - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired"; -export const ServerNotification__McpServerStartupFailureReason = Schema.Literal( - "reauthenticationRequired", -); - export type ServerNotification__McpServerStartupState = | "starting" | "ready" @@ -2233,21 +1818,6 @@ export const ServerNotification__McpServerStartupState = Schema.Literals([ "cancelled", ]); -export type ServerNotification__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const ServerNotification__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type ServerNotification__McpToolCallError = { readonly message: string }; export const ServerNotification__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -2308,36 +1878,9 @@ export const ServerNotification__MessagePhase = Schema.Literals([ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.', }); -export type ServerNotification__ModeKind = "plan" | "default"; -export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({ - description: "Initial collaboration mode to use when the TUI starts.", -}); - export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity"; export const ServerNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity"); -export type ServerNotification__ModelSafetyBufferingUpdatedNotification = { - readonly fasterModel?: string | null; - readonly model: string; - readonly reasons: ReadonlyArray; - readonly showBufferingUi: boolean; - readonly threadId: string; - readonly turnId: string; - readonly useCases: ReadonlyArray; -}; -export const ServerNotification__ModelSafetyBufferingUpdatedNotification = Schema.Struct({ - fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - model: Schema.String, - reasons: Schema.Array(Schema.String), - showBufferingUi: Schema.Boolean, - threadId: Schema.String, - turnId: Schema.String, - useCases: Schema.Array(Schema.String), -}); - -export type ServerNotification__ModelVerification = "trustedAccessForCyber"; -export const ServerNotification__ModelVerification = Schema.Literal("trustedAccessForCyber"); - export type ServerNotification__NetworkApprovalProtocol = | "http" | "https" @@ -2385,9 +1928,6 @@ export const ServerNotification__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type ServerNotification__Personality = "none" | "friendly" | "pragmatic"; -export const ServerNotification__Personality = Schema.Literals(["none", "friendly", "pragmatic"]); - export type ServerNotification__PlanDeltaNotification = { readonly delta: string; readonly itemId: string; @@ -2409,7 +1949,6 @@ export type ServerNotification__PlanType = | "go" | "plus" | "pro" - | "prolite" | "team" | "self_serve_business_usage_based" | "business" @@ -2422,7 +1961,6 @@ export const ServerNotification__PlanType = Schema.Literals([ "go", "plus", "pro", - "prolite", "team", "self_serve_business_usage_based", "business", @@ -2432,75 +1970,6 @@ export const ServerNotification__PlanType = Schema.Literals([ "unknown", ]); -export type ServerNotification__ProcessExitedNotification = { - readonly exitCode: number; - readonly processHandle: string; - readonly stderr: string; - readonly stderrCapReached: boolean; - readonly stdout: string; - readonly stdoutCapReached: boolean; -}; -export const ServerNotification__ProcessExitedNotification = Schema.Struct({ - exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check( - Schema.isInt(), - ), - processHandle: Schema.String.annotate({ - description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", - }), - stderr: Schema.String.annotate({ - description: - "Buffered stderr capture.\n\nEmpty when stderr was streamed via `process/outputDelta`.", - }), - stderrCapReached: Schema.Boolean.annotate({ - description: - "Whether stderr reached `outputBytesCap`.\n\nIn streaming mode, stderr is empty and cap state is also reported on the final stderr `process/outputDelta` notification.", - }), - stdout: Schema.String.annotate({ - description: - "Buffered stdout capture.\n\nEmpty when stdout was streamed via `process/outputDelta`.", - }), - stdoutCapReached: Schema.Boolean.annotate({ - description: - "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.", - }), -}).annotate({ description: "Final process exit notification for `process/spawn`." }); - -export type ServerNotification__ProcessOutputDeltaNotification = { - readonly capReached: boolean; - readonly deltaBase64: string; - readonly processHandle: string; - readonly stream: "stdout" | "stderr"; -}; -export const ServerNotification__ProcessOutputDeltaNotification = Schema.Struct({ - capReached: Schema.Boolean.annotate({ - description: - "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.", - }), - deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }), - processHandle: Schema.String.annotate({ - description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", - }), - stream: Schema.Literals(["stdout", "stderr"]).annotate({ - description: "Stream label for `process/outputDelta` notifications.", - }), -}).annotate({ - description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.", -}); - -export type ServerNotification__RateLimitReachedType = - | "rate_limit_reached" - | "workspace_owner_credits_depleted" - | "workspace_member_credits_depleted" - | "workspace_owner_usage_limit_reached" - | "workspace_member_usage_limit_reached"; -export const ServerNotification__RateLimitReachedType = Schema.Literals([ - "rate_limit_reached", - "workspace_owner_credits_depleted", - "workspace_member_credits_depleted", - "workspace_owner_usage_limit_reached", - "workspace_member_usage_limit_reached", -]); - export type ServerNotification__RateLimitWindow = { readonly resetsAt?: number | null; readonly usedPercent: number; @@ -2516,24 +1985,26 @@ export const ServerNotification__RateLimitWindow = Schema.Struct({ ), }); -export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3"; -export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]); +export type ServerNotification__RealtimeConversationVersion = "v1" | "v2"; +export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2"]); -export type ServerNotification__ReasoningEffort = string; -export const ServerNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none"; -export const ServerNotification__ReasoningSummary = Schema.Union( - [ - Schema.Literals(["auto", "concise", "detailed"]), - Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }), - ], - { mode: "oneOf" }, -).annotate({ +export type ServerNotification__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const ServerNotification__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ description: - "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries", + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", }); export type ServerNotification__ReasoningSummaryPartAddedNotification = { @@ -2579,18 +2050,6 @@ export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct( turnId: Schema.String, }); -export type ServerNotification__RemoteControlConnectionStatus = - | "disabled" - | "connecting" - | "connected" - | "errored"; -export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([ - "disabled", - "connecting", - "connected", - "errored", -]); - export type ServerNotification__RequestId = string | number; export const ServerNotification__RequestId = Schema.Union([ Schema.String, @@ -2603,26 +2062,6 @@ export const ServerNotification__SkillsChangedNotification = Schema.Struct({}).a "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.", }); -export type ServerNotification__SpendControlLimitSnapshot = { - readonly limit: string; - readonly remainingPercent: number; - readonly resetsAt: number; - readonly used: string; -}; -export const ServerNotification__SpendControlLimitSnapshot = Schema.Struct({ - limit: Schema.String, - remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()), - resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - used: Schema.String, -}); - -export type ServerNotification__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const ServerNotification__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); - export type ServerNotification__TerminalInteractionNotification = { readonly itemId: string; readonly processId: string; @@ -2692,32 +2131,6 @@ export const ServerNotification__ThreadClosedNotification = Schema.Struct({ threadId: Schema.String, }); -export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string }; -export const ServerNotification__ThreadDeletedNotification = Schema.Struct({ - threadId: Schema.String, -}); - -export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string }; -export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({ - threadId: Schema.String, -}); - -export type ServerNotification__ThreadGoalStatus = - | "active" - | "paused" - | "blocked" - | "usageLimited" - | "budgetLimited" - | "complete"; -export const ServerNotification__ThreadGoalStatus = Schema.Literals([ - "active", - "paused", - "blocked", - "usageLimited", - "budgetLimited", - "complete", -]); - export type ServerNotification__ThreadId = string; export const ServerNotification__ThreadId = Schema.String; @@ -2796,44 +2209,26 @@ export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({ description: "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.", }); -export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = { - readonly delta: string; +export type ServerNotification__ThreadRealtimeTranscriptUpdatedNotification = { readonly role: string; + readonly text: string; readonly threadId: string; }; -export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({ - delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }), +export const ServerNotification__ThreadRealtimeTranscriptUpdatedNotification = Schema.Struct({ role: Schema.String, + text: Schema.String, threadId: Schema.String, }).annotate({ description: "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.", }); -export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = { - readonly role: string; - readonly text: string; - readonly threadId: string; -}; -export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({ - role: Schema.String, - text: Schema.String.annotate({ description: "Final complete text for the transcript part." }), - threadId: Schema.String, -}).annotate({ - description: - "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.", -}); - -export type ServerNotification__ThreadSource = string; -export const ServerNotification__ThreadSource = Schema.String; - export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string }; export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({ threadId: Schema.String, }); export type ServerNotification__TokenUsageBreakdown = { - readonly cacheWriteInputTokens?: number; readonly cachedInputTokens: number; readonly inputTokens: number; readonly outputTokens: number; @@ -2841,9 +2236,6 @@ export type ServerNotification__TokenUsageBreakdown = { readonly totalTokens: number; }; export const ServerNotification__TokenUsageBreakdown = Schema.Struct({ - cacheWriteInputTokens: Schema.optionalKey( - Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()), - ), cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), @@ -2865,17 +2257,6 @@ export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({ "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.", }); -export type ServerNotification__TurnModerationMetadataNotification = { - readonly metadata: unknown; - readonly threadId: string; - readonly turnId: string; -}; -export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({ - metadata: Schema.Unknown, - threadId: Schema.String, - turnId: Schema.String, -}); - export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed"; export const ServerNotification__TurnPlanStepStatus = Schema.Literals([ "pending", @@ -2891,22 +2272,6 @@ export const ServerNotification__TurnStatus = Schema.Literals([ "inProgress", ]); -export type ServerNotification__WarningNotification = { - readonly message: string; - readonly threadId?: string | null; -}; -export const ServerNotification__WarningNotification = Schema.Struct({ - message: Schema.String.annotate({ description: "Concise warning message for the user." }), - threadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional thread target when the warning applies to a specific thread.", - }), - Schema.Null, - ]), - ), -}); - export type ServerNotification__WebSearchAction = | { readonly queries?: ReadonlyArray | null; @@ -2969,16 +2334,54 @@ export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), }); -export type ServerRequest__AttestationGenerateParams = {}; -export const ServerRequest__AttestationGenerateParams = Schema.Struct({}); - export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized"; export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Literal("unauthorized"); +export type ServerRequest__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const ServerRequest__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type ServerRequest__DynamicToolCallParams = { readonly arguments: unknown; readonly callId: string; - readonly namespace?: string | null; readonly threadId: string; readonly tool: string; readonly turnId: string; @@ -2986,7 +2389,6 @@ export type ServerRequest__DynamicToolCallParams = { export const ServerRequest__DynamicToolCallParams = Schema.Struct({ arguments: Schema.Unknown, callId: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, tool: Schema.String, turnId: Schema.String, @@ -3019,7 +2421,6 @@ export type ServerRequest__FileChangeRequestApprovalParams = { readonly grantRoot?: string | null; readonly itemId: string; readonly reason?: string | null; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; @@ -3042,20 +2443,10 @@ export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({ Schema.Null, ]), ), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this approval request started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }); -export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny"; -export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]); - -export type ServerRequest__LegacyAppPathString = string; -export const ServerRequest__LegacyAppPathString = Schema.String; - export type ServerRequest__McpElicitationArrayType = "array"; export const ServerRequest__McpElicitationArrayType = Schema.Literal("array"); @@ -3192,9 +2583,7 @@ export const V1InitializeParams__ClientInfo = Schema.Struct({ export type V1InitializeParams__InitializeCapabilities = { readonly experimentalApi?: boolean; - readonly mcpServerOpenaiFormElicitation?: boolean; readonly optOutNotificationMethods?: ReadonlyArray | null; - readonly requestAttestation?: boolean; }; export const V1InitializeParams__InitializeCapabilities = Schema.Struct({ experimentalApi: Schema.optionalKey( @@ -3203,11 +2592,6 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({ default: false, }), ), - mcpServerOpenaiFormElicitation: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Allow downstream MCP servers to request OpenAI extended form elicitations.", - }), - ), optOutNotificationMethods: Schema.optionalKey( Schema.Union([ Schema.Array(Schema.String).annotate({ @@ -3217,12 +2601,6 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({ Schema.Null, ]), ), - requestAttestation: Schema.optionalKey( - Schema.Boolean.annotate({ - description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.", - default: false, - }), - ), }).annotate({ description: "Client-declared capabilities negotiated during initialize." }); export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = { @@ -3241,7 +2619,6 @@ export type V2AccountRateLimitsUpdatedNotification__PlanType = | "go" | "plus" | "pro" - | "prolite" | "team" | "self_serve_business_usage_based" | "business" @@ -3254,7 +2631,6 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals( "go", "plus", "pro", - "prolite", "team", "self_serve_business_usage_based", "business", @@ -3264,20 +2640,6 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals( "unknown", ]); -export type V2AccountRateLimitsUpdatedNotification__RateLimitReachedType = - | "rate_limit_reached" - | "workspace_owner_credits_depleted" - | "workspace_member_credits_depleted" - | "workspace_owner_usage_limit_reached" - | "workspace_member_usage_limit_reached"; -export const V2AccountRateLimitsUpdatedNotification__RateLimitReachedType = Schema.Literals([ - "rate_limit_reached", - "workspace_owner_credits_depleted", - "workspace_member_credits_depleted", - "workspace_owner_usage_limit_reached", - "workspace_member_usage_limit_reached", -]); - export type V2AccountRateLimitsUpdatedNotification__RateLimitWindow = { readonly resetsAt?: number | null; readonly usedPercent: number; @@ -3293,35 +2655,11 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.St ), }); -export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = { - readonly limit: string; - readonly remainingPercent: number; - readonly resetsAt: number; - readonly used: string; -}; -export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({ - limit: Schema.String, - remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()), - resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - used: Schema.String, -}); - -export type V2AccountUpdatedNotification__AuthMode = - | "apikey" - | "chatgpt" - | "chatgptAuthTokens" - | "headers" - | "agentIdentity" - | "personalAccessToken" - | "bedrockApiKey"; +export type V2AccountUpdatedNotification__AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; export const V2AccountUpdatedNotification__AuthMode = Schema.Literals([ "apikey", "chatgpt", "chatgptAuthTokens", - "headers", - "agentIdentity", - "personalAccessToken", - "bedrockApiKey", ]).annotate({ description: "Authentication mode for OpenAI-backed providers." }); export type V2AccountUpdatedNotification__PlanType = @@ -3329,7 +2667,6 @@ export type V2AccountUpdatedNotification__PlanType = | "go" | "plus" | "pro" - | "prolite" | "team" | "self_serve_business_usage_based" | "business" @@ -3342,7 +2679,6 @@ export const V2AccountUpdatedNotification__PlanType = Schema.Literals([ "go", "plus", "pro", - "prolite", "team", "self_serve_business_usage_based", "business", @@ -3383,33 +2719,6 @@ export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({ userPrompt: Schema.String, }); -export type V2AppsInstalledResponse__InstalledApp = { - readonly callable: boolean; - readonly enabled: boolean; - readonly id: string; - readonly runtimeName?: string | null; -}; -export const V2AppsInstalledResponse__InstalledApp = Schema.Struct({ - callable: Schema.Boolean.annotate({ - description: - "Whether the connector is enabled and has a non-synthetic, model-visible tool allowed by effective MCP and app/tool policy in the committed runtime snapshot.", - }), - enabled: Schema.Boolean.annotate({ - description: - "Effective enabled state after applying global, workspace, local, and managed configuration at read time.", - }), - id: Schema.String, - runtimeName: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Best-effort name carried by the runtime tool catalog. Canonical app metadata remains owned by `app/read`.", - }), - Schema.Null, - ]), - ), -}).annotate({ description: "Installed connector runtime state." }); - export type V2AppsListResponse__AppBranding = { readonly category?: string | null; readonly developer?: string | null; @@ -3441,17 +2750,6 @@ export const V2AppsListResponse__AppScreenshot = Schema.Struct({ userPrompt: Schema.String, }); -export type V2AppsReadResponse__AppToolSummary = { - readonly description: string; - readonly name: string; - readonly title?: string | null; -}; -export const V2AppsReadResponse__AppToolSummary = Schema.Struct({ - description: Schema.String, - name: Schema.String, - title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." }); - export type V2CancelLoginAccountResponse__CancelLoginAccountStatus = "canceled" | "notFound"; export const V2CancelLoginAccountResponse__CancelLoginAccountStatus = Schema.Literals([ "canceled", @@ -3501,29 +2799,35 @@ export const V2ConfigReadResponse__AnalyticsConfig = Schema.StructWithRest( [Schema.Record(Schema.String, Schema.Unknown)], ); -export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "writes" | "approve"; -export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([ - "auto", - "prompt", - "writes", - "approve", -]); +export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "approve"; +export const V2ConfigReadResponse__AppToolApproval = Schema.Literals(["auto", "prompt", "approve"]); export type V2ConfigReadResponse__AppToolsConfig = {}; export const V2ConfigReadResponse__AppToolsConfig = Schema.Struct({}); -export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", +}); + +export type V2ConfigReadResponse__AppsDefaultConfig = { + readonly destructive_enabled?: boolean; + readonly enabled?: boolean; + readonly open_world_enabled?: boolean; +}; +export const V2ConfigReadResponse__AppsDefaultConfig = Schema.Struct({ + destructive_enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + open_world_enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), }); export type V2ConfigReadResponse__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -3537,7 +2841,7 @@ export type V2ConfigReadResponse__AskForApproval = }; export const V2ConfigReadResponse__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -3551,30 +2855,27 @@ export const V2ConfigReadResponse__AskForApproval = Schema.Union( { mode: "oneOf" }, ); -export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix"; -export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Literals([ - "total", - "body_after_prefix", -]).annotate({ - description: - "Selects which part of the active context is charged against `model_auto_compact_token_limit`.", -}); - -export type V2ConfigReadResponse__ForcedChatgptWorkspaceIds = string | ReadonlyArray; -export const V2ConfigReadResponse__ForcedChatgptWorkspaceIds = Schema.Union([ - Schema.String, - Schema.Array(Schema.String), -]).annotate({ - description: "Backward-compatible API shape for ChatGPT workspace login restrictions.", -}); - export type V2ConfigReadResponse__ForcedLoginMethod = "chatgpt" | "api"; export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]); -export type V2ConfigReadResponse__ReasoningEffort = string; -export const V2ConfigReadResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); +export type V2ConfigReadResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ConfigReadResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ConfigReadResponse__ReasoningSummary = "auto" | "concise" | "detailed" | "none"; export const V2ConfigReadResponse__ReasoningSummary = Schema.Union( @@ -3611,6 +2912,9 @@ export const V2ConfigReadResponse__SandboxWorkspaceWrite = Schema.Struct({ writable_roots: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), }); +export type V2ConfigReadResponse__ServiceTier = "fast" | "flex"; +export const V2ConfigReadResponse__ServiceTier = Schema.Literals(["fast", "flex"]); + export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high"; export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({ description: @@ -3637,16 +2941,12 @@ export const V2ConfigReadResponse__WebSearchLocation = Schema.Struct({ timezone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2ConfigReadResponse__WebSearchMode = "disabled" | "cached" | "indexed" | "live"; -export const V2ConfigReadResponse__WebSearchMode = Schema.Literals([ - "disabled", - "cached", - "indexed", - "live", -]); +export type V2ConfigReadResponse__WebSearchMode = "disabled" | "cached" | "live"; +export const V2ConfigReadResponse__WebSearchMode = Schema.Literals(["disabled", "cached", "live"]); export type V2ConfigRequirementsReadResponse__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -3660,7 +2960,7 @@ export type V2ConfigRequirementsReadResponse__AskForApproval = }; export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -3674,68 +2974,18 @@ export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union( { mode: "oneOf" }, ); -export type V2ConfigRequirementsReadResponse__ComputerUseRequirements = { - readonly allowLockedComputerUse?: boolean | null; -}; -export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema.Struct({ - allowLockedComputerUse: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), -}); - -export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler = - | { - readonly async: boolean; - readonly command: string; - readonly commandWindows?: string | null; - readonly statusMessage?: string | null; - readonly timeoutSec?: number | null; - readonly type: "command"; - } - | { readonly type: "prompt" } - | { readonly type: "agent" }; -export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union( - [ - Schema.Struct({ - async: Schema.Boolean, - command: Schema.String, - commandWindows: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - timeoutSec: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), - type: Schema.Literal("command").annotate({ title: "CommandConfiguredHookHandlerType" }), - }).annotate({ title: "CommandConfiguredHookHandler" }), - Schema.Struct({ - type: Schema.Literal("prompt").annotate({ title: "PromptConfiguredHookHandlerType" }), - }).annotate({ title: "PromptConfiguredHookHandler" }), - Schema.Struct({ - type: Schema.Literal("agent").annotate({ title: "AgentConfiguredHookHandlerType" }), - }).annotate({ title: "AgentConfiguredHookHandler" }), - ], - { mode: "oneOf" }, -); - export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny"; export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([ "allow", "deny", ]); -export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "deny"; +export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "none"; export const V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = Schema.Literals([ "allow", - "deny", + "none", ]); -export type V2ConfigRequirementsReadResponse__ReasoningEffort = string; -export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us"; export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us"); @@ -3749,24 +2999,13 @@ export const V2ConfigRequirementsReadResponse__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ConfigRequirementsReadResponse__WebSearchMode = - | "disabled" - | "cached" - | "indexed" - | "live"; +export type V2ConfigRequirementsReadResponse__WebSearchMode = "disabled" | "cached" | "live"; export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([ "disabled", "cached", - "indexed", "live", ]); -export type V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = "elevated" | "unelevated"; -export const V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = Schema.Literals([ - "elevated", - "unelevated", -]); - export type V2ConfigValueWriteParams__MergeStrategy = "replace" | "upsert"; export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]); @@ -3795,11 +3034,6 @@ export const V2ConfigWriteResponse__AbsolutePathBuf = Schema.String.annotate({ export type V2ConfigWriteResponse__WriteStatus = "ok" | "okOverridden"; export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]); -export type V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome = - "reset" | "nothingToReset" | "noCredit" | "alreadyRedeemed"; -export const V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome = - Schema.Literals(["reset", "nothingToReset", "noCredit", "alreadyRedeemed"]); - export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact"; export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]); @@ -3854,245 +3088,21 @@ export const V2ExperimentalFeatureListResponse__ExperimentalFeature = Schema.Str }), }); -export type V2ExternalAgentConfigDetectResponse__CommandMigration = { readonly name: string }; -export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Struct({ - name: Schema.String, -}); - export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; + | "MCP_SERVER_CONFIG"; export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = - Schema.Literals([ - "AGENTS_MD", - "CONFIG", - "SKILLS", - "PLUGINS", - "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", - ]); - -export type V2ExternalAgentConfigDetectResponse__HookMigration = { readonly name: string }; -export const V2ExternalAgentConfigDetectResponse__HookMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigDetectResponse__McpServerMigration = { readonly name: string }; -export const V2ExternalAgentConfigDetectResponse__McpServerMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigDetectResponse__PluginsMigration = { - readonly marketplaceName: string; - readonly pluginNames: ReadonlyArray; -}; -export const V2ExternalAgentConfigDetectResponse__PluginsMigration = Schema.Struct({ - marketplaceName: Schema.String, - pluginNames: Schema.Array(Schema.String), -}); - -export type V2ExternalAgentConfigDetectResponse__SessionMigration = { - readonly cwd: string; - readonly path: string; - readonly title?: string | null; -}; -export const V2ExternalAgentConfigDetectResponse__SessionMigration = Schema.Struct({ - cwd: Schema.String, - path: Schema.String, - title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2ExternalAgentConfigDetectResponse__SkillMigration = { readonly name: string }; -export const V2ExternalAgentConfigDetectResponse__SkillMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigDetectResponse__SubagentMigration = { readonly name: string }; -export const V2ExternalAgentConfigDetectResponse__SubagentMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType = - | "AGENTS_MD" - | "CONFIG" - | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; -export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType = - Schema.Literals([ - "AGENTS_MD", - "CONFIG", - "SKILLS", - "PLUGINS", - "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", - ]); - -export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType = - | "AGENTS_MD" - | "CONFIG" - | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; -export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType = - Schema.Literals([ - "AGENTS_MD", - "CONFIG", - "SKILLS", - "PLUGINS", - "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", - ]); - -export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource = - "remoteMcpServersConfig"; -export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource = - Schema.Literal("remoteMcpServersConfig"); - -export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string }; -export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({ - name: Schema.String, -}); + Schema.Literals(["AGENTS_MD", "CONFIG", "SKILLS", "MCP_SERVER_CONFIG"]); export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; + | "MCP_SERVER_CONFIG"; export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType = - Schema.Literals([ - "AGENTS_MD", - "CONFIG", - "SKILLS", - "PLUGINS", - "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", - ]); - -export type V2ExternalAgentConfigImportParams__HookMigration = { readonly name: string }; -export const V2ExternalAgentConfigImportParams__HookMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigImportParams__McpServerMigration = { readonly name: string }; -export const V2ExternalAgentConfigImportParams__McpServerMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigImportParams__PluginsMigration = { - readonly marketplaceName: string; - readonly pluginNames: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportParams__PluginsMigration = Schema.Struct({ - marketplaceName: Schema.String, - pluginNames: Schema.Array(Schema.String), -}); - -export type V2ExternalAgentConfigImportParams__SessionMigration = { - readonly cwd: string; - readonly path: string; - readonly title?: string | null; -}; -export const V2ExternalAgentConfigImportParams__SessionMigration = Schema.Struct({ - cwd: Schema.String, - path: Schema.String, - title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2ExternalAgentConfigImportParams__SkillMigration = { readonly name: string }; -export const V2ExternalAgentConfigImportParams__SkillMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigImportParams__SubagentMigration = { readonly name: string }; -export const V2ExternalAgentConfigImportParams__SubagentMigration = Schema.Struct({ - name: Schema.String, -}); - -export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType = - | "AGENTS_MD" - | "CONFIG" - | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "MEMORY" - | "SESSIONS"; -export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType = - Schema.Literals([ - "AGENTS_MD", - "CONFIG", - "SKILLS", - "PLUGINS", - "MCP_SERVER_CONFIG", - "SUBAGENTS", - "HOOKS", - "COMMANDS", - "MEMORY", - "SESSIONS", - ]); - -export type V2FileChangePatchUpdatedNotification__PatchChangeKind = - | { readonly type: "add" } - | { readonly type: "delete" } - | { readonly move_path?: string | null; readonly type: "update" }; -export const V2FileChangePatchUpdatedNotification__PatchChangeKind = Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }), - }).annotate({ title: "AddPatchChangeKind" }), - Schema.Struct({ - type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }), - }).annotate({ title: "DeletePatchChangeKind" }), - Schema.Struct({ - move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }), - }).annotate({ title: "UpdatePatchChangeKind" }), - ], - { mode: "oneOf" }, -); + Schema.Literals(["AGENTS_MD", "CONFIG", "SKILLS", "MCP_SERVER_CONFIG"]); export type V2FsChangedNotification__AbsolutePathBuf = string; export const V2FsChangedNotification__AbsolutePathBuf = Schema.String.annotate({ @@ -4133,7 +3143,6 @@ export type V2GetAccountRateLimitsResponse__PlanType = | "go" | "plus" | "pro" - | "prolite" | "team" | "self_serve_business_usage_based" | "business" @@ -4146,7 +3155,6 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([ "go", "plus", "pro", - "prolite", "team", "self_serve_business_usage_based", "business", @@ -4156,38 +3164,6 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([ "unknown", ]); -export type V2GetAccountRateLimitsResponse__RateLimitReachedType = - | "rate_limit_reached" - | "workspace_owner_credits_depleted" - | "workspace_member_credits_depleted" - | "workspace_owner_usage_limit_reached" - | "workspace_member_usage_limit_reached"; -export const V2GetAccountRateLimitsResponse__RateLimitReachedType = Schema.Literals([ - "rate_limit_reached", - "workspace_owner_credits_depleted", - "workspace_member_credits_depleted", - "workspace_owner_usage_limit_reached", - "workspace_member_usage_limit_reached", -]); - -export type V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus = - | "available" - | "redeeming" - | "redeemed" - | "unknown"; -export const V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus = Schema.Literals([ - "available", - "redeeming", - "redeemed", - "unknown", -]); - -export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown"; -export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([ - "codexRateLimits", - "unknown", -]); - export type V2GetAccountRateLimitsResponse__RateLimitWindow = { readonly resetsAt?: number | null; readonly usedPercent: number; @@ -4203,25 +3179,11 @@ export const V2GetAccountRateLimitsResponse__RateLimitWindow = Schema.Struct({ ), }); -export type V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = { - readonly limit: string; - readonly remainingPercent: number; - readonly resetsAt: number; - readonly used: string; -}; -export const V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = Schema.Struct({ - limit: Schema.String, - remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()), - resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - used: Schema.String, -}); - export type V2GetAccountResponse__PlanType = | "free" | "go" | "plus" | "pro" - | "prolite" | "team" | "self_serve_business_usage_based" | "business" @@ -4234,7 +3196,6 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([ "go", "plus", "pro", - "prolite", "team", "self_serve_business_usage_based", "business", @@ -4244,79 +3205,17 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([ "unknown", ]); -export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = { - readonly startDate: string; - readonly tokens: number; -}; -export const V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = Schema.Struct({ - startDate: Schema.String, - tokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), -}); - -export type V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = { - readonly currentStreakDays?: number | null; - readonly lifetimeTokens?: number | null; - readonly longestRunningTurnSec?: number | null; - readonly longestStreakDays?: number | null; - readonly peakDailyTokens?: number | null; -}; -export const V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = Schema.Struct({ - currentStreakDays: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - lifetimeTokens: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - longestRunningTurnSec: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - longestStreakDays: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - peakDailyTokens: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), -}); - -export type V2GetWorkspaceMessagesResponse__WorkspaceMessageType = - | "headline" - | "announcement" - | "unknown"; -export const V2GetWorkspaceMessagesResponse__WorkspaceMessageType = Schema.Literals([ - "headline", - "announcement", - "unknown", -]); - -export type V2HookCompletedNotification__AbsolutePathBuf = string; -export const V2HookCompletedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2HookCompletedNotification__HookEventName = | "preToolUse" - | "permissionRequest" | "postToolUse" - | "preCompact" - | "postCompact" | "sessionStart" - | "sessionEnd" | "userPromptSubmit" - | "subagentStart" - | "subagentStop" | "stop"; export const V2HookCompletedNotification__HookEventName = Schema.Literals([ "preToolUse", - "permissionRequest", "postToolUse", - "preCompact", - "postCompact", "sessionStart", - "sessionEnd", "userPromptSubmit", - "subagentStart", - "subagentStop", "stop", ]); @@ -4361,113 +3260,17 @@ export const V2HookCompletedNotification__HookRunStatus = Schema.Literals([ export type V2HookCompletedNotification__HookScope = "thread" | "turn"; export const V2HookCompletedNotification__HookScope = Schema.Literals(["thread", "turn"]); -export type V2HooksListResponse__AbsolutePathBuf = string; -export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2HooksListResponse__HookErrorInfo = { - readonly message: string; - readonly path: string; -}; -export const V2HooksListResponse__HookErrorInfo = Schema.Struct({ - message: Schema.String, - path: Schema.String, -}); - -export type V2HooksListResponse__HookEventName = - | "preToolUse" - | "permissionRequest" - | "postToolUse" - | "preCompact" - | "postCompact" - | "sessionStart" - | "sessionEnd" - | "userPromptSubmit" - | "subagentStart" - | "subagentStop" - | "stop"; -export const V2HooksListResponse__HookEventName = Schema.Literals([ - "preToolUse", - "permissionRequest", - "postToolUse", - "preCompact", - "postCompact", - "sessionStart", - "sessionEnd", - "userPromptSubmit", - "subagentStart", - "subagentStop", - "stop", -]); - -export type V2HooksListResponse__HookHandlerType = "command" | "prompt" | "agent"; -export const V2HooksListResponse__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]); - -export type V2HooksListResponse__HookSource = - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; -export const V2HooksListResponse__HookSource = Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", -]); - -export type V2HooksListResponse__HookTrustStatus = "managed" | "untrusted" | "trusted" | "modified"; -export const V2HooksListResponse__HookTrustStatus = Schema.Literals([ - "managed", - "untrusted", - "trusted", - "modified", -]); - -export type V2HookStartedNotification__AbsolutePathBuf = string; -export const V2HookStartedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2HookStartedNotification__HookEventName = | "preToolUse" - | "permissionRequest" | "postToolUse" - | "preCompact" - | "postCompact" | "sessionStart" - | "sessionEnd" | "userPromptSubmit" - | "subagentStart" - | "subagentStop" | "stop"; export const V2HookStartedNotification__HookEventName = Schema.Literals([ "preToolUse", - "permissionRequest", "postToolUse", - "preCompact", - "postCompact", "sessionStart", - "sessionEnd", "userPromptSubmit", - "subagentStart", - "subagentStop", "stop", ]); @@ -4512,12 +3315,6 @@ export const V2HookStartedNotification__HookRunStatus = Schema.Literals([ export type V2HookStartedNotification__HookScope = "thread" | "turn"; export const V2HookStartedNotification__HookScope = Schema.Literals(["thread", "turn"]); -export type V2ItemCompletedNotification__AbsolutePathBuf = string; -export const V2ItemCompletedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ItemCompletedNotification__CollabAgentStatus = | "pendingInit" | "running" @@ -4536,6 +3333,48 @@ export const V2ItemCompletedNotification__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ItemCompletedNotification__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ItemCompletedNotification__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ItemCompletedNotification__CommandExecutionStatus = | "inProgress" | "completed" @@ -4550,8 +3389,7 @@ export const V2ItemCompletedNotification__CommandExecutionStatus = Schema.Litera export type V2ItemCompletedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -4566,12 +3404,6 @@ export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Sch title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -4595,32 +3427,6 @@ export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ItemCompletedNotification__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ItemCompletedNotification__LegacyAppPathString = string; -export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String; - -export type V2ItemCompletedNotification__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ItemCompletedNotification__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ItemCompletedNotification__McpToolCallError = { readonly message: string }; export const V2ItemCompletedNotification__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -4702,20 +3508,24 @@ export const V2ItemCompletedNotification__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ItemCompletedNotification__ReasoningEffort = string; -export const V2ItemCompletedNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ItemCompletedNotification__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2ItemCompletedNotification__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ItemCompletedNotification__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ItemCompletedNotification__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ItemCompletedNotification__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -4774,32 +3584,12 @@ export const V2ItemCompletedNotification__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf = string; -export const V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf = - Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }); - -export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions = { - readonly enabled?: boolean | null; -}; -export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions = - Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }); - export type V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource = "agent"; export const V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({ - description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.", + description: "[UNSTABLE] Source that produced a terminal guardian approval review decision.", }); -export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode = - | "read" - | "write" - | "deny"; -export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode = - Schema.Literals(["read", "write", "deny"]); - export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus = | "inProgress" | "approved" @@ -4808,7 +3598,7 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalR | "aborted"; export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus = Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({ - description: "[UNSTABLE] Lifecycle state for an approval auto-review.", + description: "[UNSTABLE] Lifecycle state for a guardian approval review.", }); export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource = @@ -4824,7 +3614,7 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel | "critical"; export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel = Schema.Literals( ["low", "medium", "high", "critical"], -).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." }); +).annotate({ description: "[UNSTABLE] Risk level assigned by guardian approval review." }); export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization = | "unknown" @@ -4833,12 +3623,9 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAutho | "high"; export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization = Schema.Literals(["unknown", "low", "medium", "high"]).annotate({ - description: "[UNSTABLE] Authorization level assigned by approval auto-review.", + description: "[UNSTABLE] Authorization level assigned by guardian approval review.", }); -export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string; -export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = Schema.String; - export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol = | "http" | "https" @@ -4847,26 +3634,6 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalPr export const V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol = Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]); -export type V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf = string; -export const V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf = - Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }); - -export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = { - readonly enabled?: boolean | null; -}; -export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = - Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }); - -export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode = - | "read" - | "write" - | "deny"; -export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode = - Schema.Literals(["read", "write", "deny"]); - export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus = | "inProgress" | "approved" @@ -4875,7 +3642,7 @@ export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRev | "aborted"; export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus = Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({ - description: "[UNSTABLE] Lifecycle state for an approval auto-review.", + description: "[UNSTABLE] Lifecycle state for a guardian approval review.", }); export type V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource = @@ -4894,7 +3661,7 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel "medium", "high", "critical", -]).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." }); +]).annotate({ description: "[UNSTABLE] Risk level assigned by guardian approval review." }); export type V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization = | "unknown" @@ -4903,12 +3670,9 @@ export type V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthori | "high"; export const V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization = Schema.Literals(["unknown", "low", "medium", "high"]).annotate({ - description: "[UNSTABLE] Authorization level assigned by approval auto-review.", + description: "[UNSTABLE] Authorization level assigned by guardian approval review.", }); -export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string; -export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = Schema.String; - export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol = | "http" | "https" @@ -4917,12 +3681,6 @@ export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProt export const V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol = Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]); -export type V2ItemStartedNotification__AbsolutePathBuf = string; -export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ItemStartedNotification__CollabAgentStatus = | "pendingInit" | "running" @@ -4941,6 +3699,48 @@ export const V2ItemStartedNotification__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ItemStartedNotification__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ItemStartedNotification__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ItemStartedNotification__CommandExecutionStatus = | "inProgress" | "completed" @@ -4955,8 +3755,7 @@ export const V2ItemStartedNotification__CommandExecutionStatus = Schema.Literals export type V2ItemStartedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -4971,12 +3770,6 @@ export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schem title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -5000,32 +3793,6 @@ export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ItemStartedNotification__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ItemStartedNotification__LegacyAppPathString = string; -export const V2ItemStartedNotification__LegacyAppPathString = Schema.String; - -export type V2ItemStartedNotification__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ItemStartedNotification__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ItemStartedNotification__McpToolCallError = { readonly message: string }; export const V2ItemStartedNotification__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -5107,20 +3874,24 @@ export const V2ItemStartedNotification__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ItemStartedNotification__ReasoningEffort = string; -export const V2ItemStartedNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ItemStartedNotification__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2ItemStartedNotification__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ItemStartedNotification__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ItemStartedNotification__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ItemStartedNotification__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -5197,23 +3968,6 @@ export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals([ "oAuth", ]); -export type V2ListMcpServerStatusResponse__McpServerInfo = { - readonly description?: string | null; - readonly icons?: ReadonlyArray | null; - readonly name: string; - readonly title?: string | null; - readonly version: string; - readonly websiteUrl?: string | null; -}; -export const V2ListMcpServerStatusResponse__McpServerInfo = Schema.Struct({ - description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])), - name: Schema.String, - title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - version: Schema.String, - websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ description: "Presentation metadata advertised by an initialized MCP server." }); - export type V2ListMcpServerStatusResponse__Resource = { readonly _meta?: unknown; readonly annotations?: unknown; @@ -5277,36 +4031,6 @@ export const V2ListMcpServerStatusResponse__Tool = Schema.Struct({ title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ description: "Definition for a tool the client can call." }); -export type V2LoginAccountParams__LoginAppBrand = "codex" | "chatgpt"; -export const V2LoginAccountParams__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]); - -export type V2MarketplaceAddResponse__AbsolutePathBuf = string; -export const V2MarketplaceAddResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2MarketplaceRemoveResponse__AbsolutePathBuf = string; -export const V2MarketplaceRemoveResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2MarketplaceUpgradeResponse__AbsolutePathBuf = string; -export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = { - readonly marketplaceName: string; - readonly message: string; -}; -export const V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = Schema.Struct({ - marketplaceName: Schema.String, - message: Schema.String, -}); - export type V2McpResourceReadResponse__ResourceContent = | { readonly _meta?: unknown; @@ -5335,12 +4059,6 @@ export const V2McpResourceReadResponse__ResourceContent = Schema.Union([ }), ]).annotate({ description: "Contents returned when reading a resource from an MCP server." }); -export type V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = - "reauthenticationRequired"; -export const V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = Schema.Literal( - "reauthenticationRequired", -); - export type V2McpServerStatusUpdatedNotification__McpServerStartupState = | "starting" | "ready" @@ -5353,27 +4071,14 @@ export const V2McpServerStatusUpdatedNotification__McpServerStartupState = Schem "cancelled", ]); -export type V2ModelListResponse__InputModality = "text" | "image" | "audio"; -export const V2ModelListResponse__InputModality = Schema.Literals([ - "text", - "image", - "audio", -]).annotate({ description: "Canonical user-input modality tags advertised by a model." }); +export type V2ModelListResponse__InputModality = "text" | "image"; +export const V2ModelListResponse__InputModality = Schema.Literals(["text", "image"]).annotate({ + description: "Canonical user-input modality tags advertised by a model.", +}); export type V2ModelListResponse__ModelAvailabilityNux = { readonly message: string }; export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({ message: Schema.String }); -export type V2ModelListResponse__ModelServiceTier = { - readonly description: string; - readonly id: string; - readonly name: string; -}; -export const V2ModelListResponse__ModelServiceTier = Schema.Struct({ - description: Schema.String, - id: Schema.String, - name: Schema.String, -}); - export type V2ModelListResponse__ModelUpgradeInfo = { readonly migrationMarkdown?: string | null; readonly model: string; @@ -5387,106 +4092,29 @@ export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({ upgradeCopy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2ModelListResponse__ReasoningEffort = string; -export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); +export type V2ModelListResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ModelListResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ModelReroutedNotification__ModelRerouteReason = "highRiskCyberActivity"; export const V2ModelReroutedNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity"); -export type V2ModelVerificationNotification__ModelVerification = "trustedAccessForCyber"; -export const V2ModelVerificationNotification__ModelVerification = - Schema.Literal("trustedAccessForCyber"); - -export type V2PermissionProfileListResponse__PermissionProfileSummary = { - readonly allowed: boolean; - readonly description?: string | null; - readonly id: string; -}; -export const V2PermissionProfileListResponse__PermissionProfileSummary = Schema.Struct({ - allowed: Schema.Boolean.annotate({ - description: "Whether the effective requirements allow selecting this profile.", - }), - description: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional user-facing description for display in clients.", - }), - Schema.Null, - ]), - ), - id: Schema.String.annotate({ description: "Available permission profile identifier." }), -}); - -export type V2PluginInstalledParams__AbsolutePathBuf = string; -export const V2PluginInstalledParams__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2PluginInstalledResponse__AbsolutePathBuf = string; -export const V2PluginInstalledResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2PluginInstalledResponse__MarketplaceInterface = { - readonly displayName?: string | null; -}; -export const V2PluginInstalledResponse__MarketplaceInterface = Schema.Struct({ - displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2PluginInstalledResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; -export const V2PluginInstalledResponse__PluginAuthPolicy = Schema.Literals([ - "ON_INSTALL", - "ON_USE", -]); - -export type V2PluginInstalledResponse__PluginInstallPolicy = - | "NOT_AVAILABLE" - | "AVAILABLE" - | "INSTALLED_BY_DEFAULT"; -export const V2PluginInstalledResponse__PluginInstallPolicy = Schema.Literals([ - "NOT_AVAILABLE", - "AVAILABLE", - "INSTALLED_BY_DEFAULT", -]); - -export type V2PluginInstalledResponse__PluginInstallPolicySource = - | "WORKSPACE_SETTING" - | "IMPLICIT_CANONICAL_APP"; -export const V2PluginInstalledResponse__PluginInstallPolicySource = Schema.Literals([ - "WORKSPACE_SETTING", - "IMPLICIT_CANONICAL_APP", -]); - -export type V2PluginInstalledResponse__PluginShareDiscoverability = - | "LISTED" - | "UNLISTED" - | "PRIVATE"; -export const V2PluginInstalledResponse__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type V2PluginInstalledResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner"; -export const V2PluginInstalledResponse__PluginSharePrincipalRole = Schema.Literals([ - "reader", - "editor", - "owner", -]); - -export type V2PluginInstalledResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; -export const V2PluginInstalledResponse__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - export type V2PluginInstallParams__AbsolutePathBuf = string; export const V2PluginInstallParams__AbsolutePathBuf = Schema.String.annotate({ description: @@ -5494,18 +4122,18 @@ export const V2PluginInstallParams__AbsolutePathBuf = Schema.String.annotate({ }); export type V2PluginInstallResponse__AppSummary = { - readonly category?: string | null; readonly description?: string | null; readonly id: string; readonly installUrl?: string | null; readonly name: string; + readonly needsAuth: boolean; }; export const V2PluginInstallResponse__AppSummary = Schema.Struct({ - category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), id: Schema.String, installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), name: Schema.String, + needsAuth: Schema.Boolean, }).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." }); export type V2PluginInstallResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; @@ -5517,20 +4145,6 @@ export const V2PluginListParams__AbsolutePathBuf = Schema.String.annotate({ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); -export type V2PluginListParams__PluginListMarketplaceKind = - | "local" - | "vertical" - | "workspace-directory" - | "shared-with-me" - | "created-by-me-remote"; -export const V2PluginListParams__PluginListMarketplaceKind = Schema.Literals([ - "local", - "vertical", - "workspace-directory", - "shared-with-me", - "created-by-me-remote", -]); - export type V2PluginListResponse__AbsolutePathBuf = string; export const V2PluginListResponse__AbsolutePathBuf = Schema.String.annotate({ description: @@ -5555,35 +4169,6 @@ export const V2PluginListResponse__PluginInstallPolicy = Schema.Literals([ "INSTALLED_BY_DEFAULT", ]); -export type V2PluginListResponse__PluginInstallPolicySource = - | "WORKSPACE_SETTING" - | "IMPLICIT_CANONICAL_APP"; -export const V2PluginListResponse__PluginInstallPolicySource = Schema.Literals([ - "WORKSPACE_SETTING", - "IMPLICIT_CANONICAL_APP", -]); - -export type V2PluginListResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE"; -export const V2PluginListResponse__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type V2PluginListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner"; -export const V2PluginListResponse__PluginSharePrincipalRole = Schema.Literals([ - "reader", - "editor", - "owner", -]); - -export type V2PluginListResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; -export const V2PluginListResponse__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - export type V2PluginReadParams__AbsolutePathBuf = string; export const V2PluginReadParams__AbsolutePathBuf = Schema.String.annotate({ description: @@ -5597,54 +4182,20 @@ export const V2PluginReadResponse__AbsolutePathBuf = Schema.String.annotate({ }); export type V2PluginReadResponse__AppSummary = { - readonly category?: string | null; readonly description?: string | null; readonly id: string; readonly installUrl?: string | null; readonly name: string; + readonly needsAuth: boolean; }; export const V2PluginReadResponse__AppSummary = Schema.Struct({ - category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), id: Schema.String, installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), name: Schema.String, + needsAuth: Schema.Boolean, }).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." }); -export type V2PluginReadResponse__AppTemplateUnavailableReason = - | "NOT_CONFIGURED_FOR_WORKSPACE" - | "NO_ACTIVE_WORKSPACE"; -export const V2PluginReadResponse__AppTemplateUnavailableReason = Schema.Literals([ - "NOT_CONFIGURED_FOR_WORKSPACE", - "NO_ACTIVE_WORKSPACE", -]); - -export type V2PluginReadResponse__HookEventName = - | "preToolUse" - | "permissionRequest" - | "postToolUse" - | "preCompact" - | "postCompact" - | "sessionStart" - | "sessionEnd" - | "userPromptSubmit" - | "subagentStart" - | "subagentStop" - | "stop"; -export const V2PluginReadResponse__HookEventName = Schema.Literals([ - "preToolUse", - "permissionRequest", - "postToolUse", - "preCompact", - "postCompact", - "sessionStart", - "sessionEnd", - "userPromptSubmit", - "subagentStart", - "subagentStop", - "stop", -]); - export type V2PluginReadResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]); @@ -5658,232 +4209,58 @@ export const V2PluginReadResponse__PluginInstallPolicy = Schema.Literals([ "INSTALLED_BY_DEFAULT", ]); -export type V2PluginReadResponse__PluginInstallPolicySource = - | "WORKSPACE_SETTING" - | "IMPLICIT_CANONICAL_APP"; -export const V2PluginReadResponse__PluginInstallPolicySource = Schema.Literals([ - "WORKSPACE_SETTING", - "IMPLICIT_CANONICAL_APP", -]); - -export type V2PluginReadResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE"; -export const V2PluginReadResponse__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type V2PluginReadResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner"; -export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([ - "reader", - "editor", - "owner", -]); - -export type V2PluginReadResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; -export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - -export type V2PluginReadResponse__ScheduledTaskWeekday = - | "MO" - | "TU" - | "WE" - | "TH" - | "FR" - | "SA" - | "SU"; -export const V2PluginReadResponse__ScheduledTaskWeekday = Schema.Literals([ - "MO", - "TU", - "WE", - "TH", - "FR", - "SA", - "SU", -]); - -export type V2PluginShareCheckoutResponse__AbsolutePathBuf = string; -export const V2PluginShareCheckoutResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2PluginShareListResponse__AbsolutePathBuf = string; -export const V2PluginShareListResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2PluginShareListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; -export const V2PluginShareListResponse__PluginAuthPolicy = Schema.Literals([ - "ON_INSTALL", - "ON_USE", -]); - -export type V2PluginShareListResponse__PluginInstallPolicy = - | "NOT_AVAILABLE" - | "AVAILABLE" - | "INSTALLED_BY_DEFAULT"; -export const V2PluginShareListResponse__PluginInstallPolicy = Schema.Literals([ - "NOT_AVAILABLE", - "AVAILABLE", - "INSTALLED_BY_DEFAULT", -]); - -export type V2PluginShareListResponse__PluginInstallPolicySource = - | "WORKSPACE_SETTING" - | "IMPLICIT_CANONICAL_APP"; -export const V2PluginShareListResponse__PluginInstallPolicySource = Schema.Literals([ - "WORKSPACE_SETTING", - "IMPLICIT_CANONICAL_APP", -]); - -export type V2PluginShareListResponse__PluginShareDiscoverability = - | "LISTED" - | "UNLISTED" - | "PRIVATE"; -export const V2PluginShareListResponse__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type V2PluginShareListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner"; -export const V2PluginShareListResponse__PluginSharePrincipalRole = Schema.Literals([ - "reader", - "editor", - "owner", -]); - -export type V2PluginShareListResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; -export const V2PluginShareListResponse__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - -export type V2PluginShareSaveParams__AbsolutePathBuf = string; -export const V2PluginShareSaveParams__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2PluginShareSaveParams__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE"; -export const V2PluginShareSaveParams__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type V2PluginShareSaveParams__PluginSharePrincipalType = "user" | "group" | "workspace"; -export const V2PluginShareSaveParams__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - -export type V2PluginShareSaveParams__PluginShareTargetRole = "reader" | "editor"; -export const V2PluginShareSaveParams__PluginShareTargetRole = Schema.Literals(["reader", "editor"]); - -export type V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = - | "user" - | "group" - | "workspace"; -export const V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - -export type V2PluginShareUpdateTargetsParams__PluginShareTargetRole = "reader" | "editor"; -export const V2PluginShareUpdateTargetsParams__PluginShareTargetRole = Schema.Literals([ - "reader", - "editor", -]); - -export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = - | "UNLISTED" - | "PRIVATE" - | "LISTED"; -export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([ - "UNLISTED", - "PRIVATE", - "LISTED", -]); - -export type V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability = - | "LISTED" - | "UNLISTED" - | "PRIVATE"; -export const V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability = Schema.Literals([ - "LISTED", - "UNLISTED", - "PRIVATE", -]); - -export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole = - | "reader" - | "editor" - | "owner"; -export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole = Schema.Literals([ - "reader", - "editor", - "owner", -]); - -export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = - | "user" - | "group" - | "workspace"; -export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Schema.Literals([ - "user", - "group", - "workspace", -]); - -export type V2RawResponseCompletedNotification__TokenUsageBreakdown = { - readonly cacheWriteInputTokens?: number; - readonly cachedInputTokens: number; - readonly inputTokens: number; - readonly outputTokens: number; - readonly reasoningOutputTokens: number; - readonly totalTokens: number; +export type V2PluginReadResponse__SkillInterface = { + readonly brandColor?: string | null; + readonly defaultPrompt?: string | null; + readonly displayName?: string | null; + readonly iconLarge?: string | null; + readonly iconSmall?: string | null; + readonly shortDescription?: string | null; }; -export const V2RawResponseCompletedNotification__TokenUsageBreakdown = Schema.Struct({ - cacheWriteInputTokens: Schema.optionalKey( - Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()), - ), - cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), +export const V2PluginReadResponse__SkillInterface = Schema.Struct({ + brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + iconLarge: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + iconSmall: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2RawResponseItemCompletedNotification__AgentMessageInputContent = +export type V2RawResponseItemCompletedNotification__ContentItem = | { readonly text: string; readonly type: "input_text" } - | { readonly encrypted_content: string; readonly type: "encrypted_content" }; -export const V2RawResponseItemCompletedNotification__AgentMessageInputContent = Schema.Union( + | { readonly image_url: string; readonly type: "input_image" } + | { readonly text: string; readonly type: "output_text" }; +export const V2RawResponseItemCompletedNotification__ContentItem = Schema.Union( [ Schema.Struct({ text: Schema.String, - type: Schema.Literal("input_text").annotate({ - title: "InputTextAgentMessageInputContentType", - }), - }).annotate({ title: "InputTextAgentMessageInputContent" }), + type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }), + }).annotate({ title: "InputTextContentItem" }), Schema.Struct({ - encrypted_content: Schema.String, - type: Schema.Literal("encrypted_content").annotate({ - title: "EncryptedContentAgentMessageInputContentType", - }), - }).annotate({ title: "EncryptedContentAgentMessageInputContent" }), + image_url: Schema.String, + type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), + }).annotate({ title: "InputImageContentItem" }), + Schema.Struct({ + text: Schema.String, + type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), + }).annotate({ title: "OutputTextContentItem" }), ], { mode: "oneOf" }, ); +export type V2RawResponseItemCompletedNotification__GhostCommit = { + readonly id: string; + readonly parent?: string | null; + readonly preexisting_untracked_dirs: ReadonlyArray; + readonly preexisting_untracked_files: ReadonlyArray; +}; +export const V2RawResponseItemCompletedNotification__GhostCommit = Schema.Struct({ + id: Schema.String, + parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + preexisting_untracked_dirs: Schema.Array(Schema.String), + preexisting_untracked_files: Schema.Array(Schema.String), +}).annotate({ description: "Details of a ghost commit created from a repository state." }); + export type V2RawResponseItemCompletedNotification__ImageDetail = | "auto" | "low" @@ -5896,17 +4273,6 @@ export const V2RawResponseItemCompletedNotification__ImageDetail = Schema.Litera "original", ]); -export type V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough = { - readonly turn_id?: string | null; -}; -export const V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough = - Schema.Struct({ - turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }).annotate({ - description: - "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.", - }); - export type V2RawResponseItemCompletedNotification__LocalShellAction = { readonly command: ReadonlyArray; readonly env?: { readonly [x: string]: string } | null; @@ -6032,14 +4398,6 @@ export const V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction { mode: "oneOf" }, ); -export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus = - | "disabled" - | "connecting" - | "connected" - | "errored"; -export const V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus = - Schema.Literals(["disabled", "connecting", "connected", "errored"]); - export type V2ReviewStartParams__ReviewDelivery = "inline" | "detached"; export const V2ReviewStartParams__ReviewDelivery = Schema.Literals(["inline", "detached"]); @@ -6091,12 +4449,6 @@ export const V2ReviewStartParams__ReviewTarget = Schema.Union( { mode: "oneOf" }, ); -export type V2ReviewStartResponse__AbsolutePathBuf = string; -export const V2ReviewStartResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ReviewStartResponse__CollabAgentStatus = | "pendingInit" | "running" @@ -6115,6 +4467,48 @@ export const V2ReviewStartResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ReviewStartResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ReviewStartResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ReviewStartResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -6129,8 +4523,7 @@ export const V2ReviewStartResponse__CommandExecutionStatus = Schema.Literals([ export type V2ReviewStartResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -6145,12 +4538,6 @@ export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Un title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -6171,32 +4558,6 @@ export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ReviewStartResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ReviewStartResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ReviewStartResponse__LegacyAppPathString = string; -export const V2ReviewStartResponse__LegacyAppPathString = Schema.String; - -export type V2ReviewStartResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ReviewStartResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ReviewStartResponse__McpToolCallError = { readonly message: string }; export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -6279,17 +4640,24 @@ export const V2ReviewStartResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ReviewStartResponse__ReasoningEffort = string; -export const V2ReviewStartResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ReviewStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2ReviewStartResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ReviewStartResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ReviewStartResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ReviewStartResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -6360,20 +4728,6 @@ export const V2ReviewStartResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = "credits" | "usage_limit"; -export const V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = Schema.Literals([ - "credits", - "usage_limit", -]); - -export type V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus = - | "sent" - | "cooldown_active"; -export const V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus = Schema.Literals([ - "sent", - "cooldown_active", -]); - export type V2ServerRequestResolvedNotification__RequestId = string | number; export const V2ServerRequestResolvedNotification__RequestId = Schema.Union([ Schema.String, @@ -6386,16 +4740,13 @@ export const V2SkillsConfigWriteParams__AbsolutePathBuf = Schema.String.annotate "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); -export type V2SkillsExtraRootsSetParams__AbsolutePathBuf = string; -export const V2SkillsExtraRootsSetParams__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2SkillsListResponse__AbsolutePathBuf = string; -export const V2SkillsListResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +export type V2SkillsListParams__SkillsListExtraRootsForCwd = { + readonly cwd: string; + readonly extraUserRoots: ReadonlyArray; +}; +export const V2SkillsListParams__SkillsListExtraRootsForCwd = Schema.Struct({ + cwd: Schema.String, + extraUserRoots: Schema.Array(Schema.String), }); export type V2SkillsListResponse__SkillErrorInfo = { @@ -6407,6 +4758,23 @@ export const V2SkillsListResponse__SkillErrorInfo = Schema.Struct({ path: Schema.String, }); +export type V2SkillsListResponse__SkillInterface = { + readonly brandColor?: string | null; + readonly defaultPrompt?: string | null; + readonly displayName?: string | null; + readonly iconLarge?: string | null; + readonly iconSmall?: string | null; + readonly shortDescription?: string | null; +}; +export const V2SkillsListResponse__SkillInterface = Schema.Struct({ + brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + iconLarge: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + iconSmall: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + export type V2SkillsListResponse__SkillScope = "user" | "repo" | "system" | "admin"; export const V2SkillsListResponse__SkillScope = Schema.Literals([ "user", @@ -6432,18 +4800,18 @@ export const V2SkillsListResponse__SkillToolDependency = Schema.Struct({ value: Schema.String, }); -export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2ThreadForkParams__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ThreadForkParams__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -6457,7 +4825,7 @@ export type V2ThreadForkParams__AskForApproval = }; export const V2ThreadForkParams__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -6481,8 +4849,8 @@ export const V2ThreadForkParams__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ThreadForkParams__ThreadSource = string; -export const V2ThreadForkParams__ThreadSource = Schema.String; +export type V2ThreadForkParams__ServiceTier = "fast" | "flex"; +export const V2ThreadForkParams__ServiceTier = Schema.Literals(["fast", "flex"]); export type V2ThreadForkResponse__AbsolutePathBuf = string; export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({ @@ -6495,6 +4863,7 @@ export const V2ThreadForkResponse__AgentPath = Schema.String; export type V2ThreadForkResponse__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -6508,7 +4877,7 @@ export type V2ThreadForkResponse__AskForApproval = }; export const V2ThreadForkResponse__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -6540,6 +4909,48 @@ export const V2ThreadForkResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadForkResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadForkResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadForkResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -6554,8 +4965,7 @@ export const V2ThreadForkResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadForkResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -6570,12 +4980,6 @@ export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Uni title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -6607,32 +5011,6 @@ export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadForkResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadForkResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadForkResponse__LegacyAppPathString = string; -export const V2ThreadForkResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadForkResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadForkResponse__McpToolCallError = { readonly message: string }; export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -6715,17 +5093,27 @@ export const V2ThreadForkResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadForkResponse__ReasoningEffort = string; -export const V2ThreadForkResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); +export type V2ThreadForkResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadForkResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); -export type V2ThreadForkResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2ThreadForkResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadForkResponse__ServiceTier = "fast" | "flex"; +export const V2ThreadForkResponse__ServiceTier = Schema.Literals(["fast", "flex"]); export type V2ThreadForkResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -6761,9 +5149,6 @@ export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadForkResponse__ThreadId = string; export const V2ThreadForkResponse__ThreadId = Schema.String; -export type V2ThreadForkResponse__ThreadSource = string; -export const V2ThreadForkResponse__ThreadSource = Schema.String; - export type V2ThreadForkResponse__TurnStatus = | "completed" | "interrupted" @@ -6808,85 +5193,8 @@ export const V2ThreadForkResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadGoalGetResponse__ThreadGoalStatus = - | "active" - | "paused" - | "blocked" - | "usageLimited" - | "budgetLimited" - | "complete"; -export const V2ThreadGoalGetResponse__ThreadGoalStatus = Schema.Literals([ - "active", - "paused", - "blocked", - "usageLimited", - "budgetLimited", - "complete", -]); - -export type V2ThreadGoalSetParams__ThreadGoalStatus = - | "active" - | "paused" - | "blocked" - | "usageLimited" - | "budgetLimited" - | "complete"; -export const V2ThreadGoalSetParams__ThreadGoalStatus = Schema.Literals([ - "active", - "paused", - "blocked", - "usageLimited", - "budgetLimited", - "complete", -]); - -export type V2ThreadGoalSetResponse__ThreadGoalStatus = - | "active" - | "paused" - | "blocked" - | "usageLimited" - | "budgetLimited" - | "complete"; -export const V2ThreadGoalSetResponse__ThreadGoalStatus = Schema.Literals([ - "active", - "paused", - "blocked", - "usageLimited", - "budgetLimited", - "complete", -]); - -export type V2ThreadGoalUpdatedNotification__ThreadGoalStatus = - | "active" - | "paused" - | "blocked" - | "usageLimited" - | "budgetLimited" - | "complete"; -export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals([ - "active", - "paused", - "blocked", - "usageLimited", - "budgetLimited", - "complete", -]); - -export type V2ThreadListParams__SortDirection = "asc" | "desc"; -export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]); - -export type V2ThreadListParams__ThreadListCwdFilter = string | ReadonlyArray; -export const V2ThreadListParams__ThreadListCwdFilter = Schema.Union([ - Schema.String, - Schema.Array(Schema.String), -]); - -export type V2ThreadListParams__ThreadSortKey = "created_at" | "updated_at" | "recency_at"; -export const V2ThreadListParams__ThreadSortKey = Schema.Literals([ - "created_at", - "updated_at", - "recency_at", -]); +export type V2ThreadListParams__ThreadSortKey = "created_at" | "updated_at"; +export const V2ThreadListParams__ThreadSortKey = Schema.Literals(["created_at", "updated_at"]); export type V2ThreadListParams__ThreadSourceKind = | "cli" @@ -6912,12 +5220,6 @@ export const V2ThreadListParams__ThreadSourceKind = Schema.Literals([ "unknown", ]); -export type V2ThreadListResponse__AbsolutePathBuf = string; -export const V2ThreadListResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ThreadListResponse__AgentPath = string; export const V2ThreadListResponse__AgentPath = Schema.String; @@ -6939,6 +5241,48 @@ export const V2ThreadListResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadListResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadListResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadListResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -6953,8 +5297,7 @@ export const V2ThreadListResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadListResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -6969,12 +5312,6 @@ export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Uni title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -7006,32 +5343,6 @@ export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadListResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadListResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadListResponse__LegacyAppPathString = string; -export const V2ThreadListResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadListResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadListResponse__McpToolCallError = { readonly message: string }; export const V2ThreadListResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -7114,17 +5425,24 @@ export const V2ThreadListResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadListResponse__ReasoningEffort = string; -export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadListResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2ThreadListResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadListResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadListResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ThreadListResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -7160,9 +5478,6 @@ export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadListResponse__ThreadId = string; export const V2ThreadListResponse__ThreadId = Schema.String; -export type V2ThreadListResponse__ThreadSource = string; -export const V2ThreadListResponse__ThreadSource = Schema.String; - export type V2ThreadListResponse__TurnStatus = | "completed" | "interrupted" @@ -7242,12 +5557,6 @@ export const V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = S ), }); -export type V2ThreadMetadataUpdateResponse__AbsolutePathBuf = string; -export const V2ThreadMetadataUpdateResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ThreadMetadataUpdateResponse__AgentPath = string; export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String; @@ -7269,6 +5578,48 @@ export const V2ThreadMetadataUpdateResponse__CollabAgentStatus = Schema.Literals "notFound", ]); +export type V2ThreadMetadataUpdateResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadMetadataUpdateResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadMetadataUpdateResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -7283,8 +5634,7 @@ export const V2ThreadMetadataUpdateResponse__CommandExecutionStatus = Schema.Lit export type V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -7299,12 +5649,6 @@ export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -7339,32 +5683,6 @@ export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct( text: Schema.String, }); -export type V2ThreadMetadataUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadMetadataUpdateResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string; -export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadMetadataUpdateResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string }; export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -7455,20 +5773,24 @@ export const V2ThreadMetadataUpdateResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string; -export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadMetadataUpdateResponse__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadMetadataUpdateResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ThreadMetadataUpdateResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -7506,9 +5828,6 @@ export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals( export type V2ThreadMetadataUpdateResponse__ThreadId = string; export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String; -export type V2ThreadMetadataUpdateResponse__ThreadSource = string; -export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String; - export type V2ThreadMetadataUpdateResponse__TurnStatus = | "completed" | "interrupted" @@ -7553,12 +5872,6 @@ export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadReadResponse__AbsolutePathBuf = string; -export const V2ThreadReadResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ThreadReadResponse__AgentPath = string; export const V2ThreadReadResponse__AgentPath = Schema.String; @@ -7580,6 +5893,48 @@ export const V2ThreadReadResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadReadResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadReadResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadReadResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -7594,8 +5949,7 @@ export const V2ThreadReadResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadReadResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -7610,12 +5964,6 @@ export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Uni title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -7647,32 +5995,6 @@ export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadReadResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadReadResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadReadResponse__LegacyAppPathString = string; -export const V2ThreadReadResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadReadResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadReadResponse__McpToolCallError = { readonly message: string }; export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -7755,17 +6077,24 @@ export const V2ThreadReadResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadReadResponse__ReasoningEffort = string; -export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadReadResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2ThreadReadResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadReadResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadReadResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ThreadReadResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -7801,9 +6130,6 @@ export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadReadResponse__ThreadId = string; export const V2ThreadReadResponse__ThreadId = Schema.String; -export type V2ThreadReadResponse__ThreadSource = string; -export const V2ThreadReadResponse__ThreadSource = Schema.String; - export type V2ThreadReadResponse__TurnStatus = | "completed" | "interrupted" @@ -7876,46 +6202,24 @@ export const V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioCh }, ).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." }); -export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2" | "v3"; +export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2"; export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = Schema.Literals([ "v1", "v2", - "v3", ]); -export type V2ThreadResumeParams__AgentMessageInputContent = - | { readonly text: string; readonly type: "input_text" } - | { readonly encrypted_content: string; readonly type: "encrypted_content" }; -export const V2ThreadResumeParams__AgentMessageInputContent = Schema.Union( - [ - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("input_text").annotate({ - title: "InputTextAgentMessageInputContentType", - }), - }).annotate({ title: "InputTextAgentMessageInputContent" }), - Schema.Struct({ - encrypted_content: Schema.String, - type: Schema.Literal("encrypted_content").annotate({ - title: "EncryptedContentAgentMessageInputContentType", - }), - }).annotate({ title: "EncryptedContentAgentMessageInputContent" }), - ], - { mode: "oneOf" }, -); - -export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ThreadResumeParams__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -7929,7 +6233,7 @@ export type V2ThreadResumeParams__AskForApproval = }; export const V2ThreadResumeParams__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -7943,6 +6247,41 @@ export const V2ThreadResumeParams__AskForApproval = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadResumeParams__ContentItem = + | { readonly text: string; readonly type: "input_text" } + | { readonly image_url: string; readonly type: "input_image" } + | { readonly text: string; readonly type: "output_text" }; +export const V2ThreadResumeParams__ContentItem = Schema.Union( + [ + Schema.Struct({ + text: Schema.String, + type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }), + }).annotate({ title: "InputTextContentItem" }), + Schema.Struct({ + image_url: Schema.String, + type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), + }).annotate({ title: "InputImageContentItem" }), + Schema.Struct({ + text: Schema.String, + type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), + }).annotate({ title: "OutputTextContentItem" }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadResumeParams__GhostCommit = { + readonly id: string; + readonly parent?: string | null; + readonly preexisting_untracked_dirs: ReadonlyArray; + readonly preexisting_untracked_files: ReadonlyArray; +}; +export const V2ThreadResumeParams__GhostCommit = Schema.Struct({ + id: Schema.String, + parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + preexisting_untracked_dirs: Schema.Array(Schema.String), + preexisting_untracked_files: Schema.Array(Schema.String), +}).annotate({ description: "Details of a ghost commit created from a repository state." }); + export type V2ThreadResumeParams__ImageDetail = "auto" | "low" | "high" | "original"; export const V2ThreadResumeParams__ImageDetail = Schema.Literals([ "auto", @@ -7951,16 +6290,6 @@ export const V2ThreadResumeParams__ImageDetail = Schema.Literals([ "original", ]); -export type V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = { - readonly turn_id?: string | null; -}; -export const V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = Schema.Struct({ - turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ - description: - "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.", -}); - export type V2ThreadResumeParams__LocalShellAction = { readonly command: ReadonlyArray; readonly env?: { readonly [x: string]: string } | null; @@ -8096,15 +6425,8 @@ export const V2ThreadResumeParams__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ThreadResumeParams__SortDirection = "asc" | "desc"; -export const V2ThreadResumeParams__SortDirection = Schema.Literals(["asc", "desc"]); - -export type V2ThreadResumeParams__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadResumeParams__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); +export type V2ThreadResumeParams__ServiceTier = "fast" | "flex"; +export const V2ThreadResumeParams__ServiceTier = Schema.Literals(["fast", "flex"]); export type V2ThreadResumeResponse__AbsolutePathBuf = string; export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({ @@ -8117,6 +6439,7 @@ export const V2ThreadResumeResponse__AgentPath = Schema.String; export type V2ThreadResumeResponse__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -8130,7 +6453,7 @@ export type V2ThreadResumeResponse__AskForApproval = }; export const V2ThreadResumeResponse__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -8162,6 +6485,48 @@ export const V2ThreadResumeResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadResumeResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadResumeResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadResumeResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -8176,8 +6541,7 @@ export const V2ThreadResumeResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadResumeResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -8192,12 +6556,6 @@ export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.U title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -8229,32 +6587,6 @@ export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadResumeResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadResumeResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadResumeResponse__LegacyAppPathString = string; -export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadResumeResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string }; export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -8337,17 +6669,27 @@ export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeResponse__ReasoningEffort = string; -export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); +export type V2ThreadResumeResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadResumeResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); -export type V2ThreadResumeResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2ThreadResumeResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadResumeResponse__ServiceTier = "fast" | "flex"; +export const V2ThreadResumeResponse__ServiceTier = Schema.Literals(["fast", "flex"]); export type V2ThreadResumeResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -8383,9 +6725,6 @@ export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadResumeResponse__ThreadId = string; export const V2ThreadResumeResponse__ThreadId = Schema.String; -export type V2ThreadResumeResponse__ThreadSource = string; -export const V2ThreadResumeResponse__ThreadSource = Schema.String; - export type V2ThreadResumeResponse__TurnStatus = | "completed" | "interrupted" @@ -8430,12 +6769,6 @@ export const V2ThreadResumeResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadRollbackResponse__AbsolutePathBuf = string; -export const V2ThreadRollbackResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ThreadRollbackResponse__AgentPath = string; export const V2ThreadRollbackResponse__AgentPath = Schema.String; @@ -8457,6 +6790,48 @@ export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadRollbackResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadRollbackResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadRollbackResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -8471,8 +6846,7 @@ export const V2ThreadRollbackResponse__CommandExecutionStatus = Schema.Literals( export type V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -8487,12 +6861,6 @@ export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -8524,32 +6892,6 @@ export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadRollbackResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadRollbackResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadRollbackResponse__LegacyAppPathString = string; -export const V2ThreadRollbackResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadRollbackResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string }; export const V2ThreadRollbackResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -8635,20 +6977,24 @@ export const V2ThreadRollbackResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadRollbackResponse__ReasoningEffort = string; -export const V2ThreadRollbackResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadRollbackResponse__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2ThreadRollbackResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadRollbackResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadRollbackResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ThreadRollbackResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -8684,9 +7030,6 @@ export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadRollbackResponse__ThreadId = string; export const V2ThreadRollbackResponse__ThreadId = Schema.String; -export type V2ThreadRollbackResponse__ThreadSource = string; -export const V2ThreadRollbackResponse__ThreadSource = Schema.String; - export type V2ThreadRollbackResponse__TurnStatus = | "completed" | "interrupted" @@ -8731,114 +7074,6 @@ export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = string; -export const V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = { - readonly extends?: string | null; - readonly id: string; -}; -export const V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = Schema.Struct({ - extends: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Parent profile identifier from the selected permissions profile's `extends` setting, when present.", - }), - Schema.Null, - ]), - ), - id: Schema.String.annotate({ - description: - "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", - }), -}); - -export type V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = - | "user" - | "auto_review" - | "guardian_subagent"; -export const V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = Schema.Literals([ - "user", - "auto_review", - "guardian_subagent", -]).annotate({ - description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", -}); - -export type V2ThreadSettingsUpdatedNotification__AskForApproval = - | "untrusted" - | "on-request" - | "never" - | { - readonly granular: { - readonly mcp_elicitations: boolean; - readonly request_permissions?: boolean; - readonly rules: boolean; - readonly sandbox_approval: boolean; - readonly skill_approval?: boolean; - }; - }; -export const V2ThreadSettingsUpdatedNotification__AskForApproval = Schema.Union( - [ - Schema.Literals(["untrusted", "on-request", "never"]), - Schema.Struct({ - granular: Schema.Struct({ - mcp_elicitations: Schema.Boolean, - request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - rules: Schema.Boolean, - sandbox_approval: Schema.Boolean, - skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - }), - }).annotate({ title: "GranularAskForApproval" }), - ], - { mode: "oneOf" }, -); - -export type V2ThreadSettingsUpdatedNotification__ModeKind = "plan" | "default"; -export const V2ThreadSettingsUpdatedNotification__ModeKind = Schema.Literals([ - "plan", - "default", -]).annotate({ description: "Initial collaboration mode to use when the TUI starts." }); - -export type V2ThreadSettingsUpdatedNotification__Personality = "none" | "friendly" | "pragmatic"; -export const V2ThreadSettingsUpdatedNotification__Personality = Schema.Literals([ - "none", - "friendly", - "pragmatic", -]); - -export type V2ThreadSettingsUpdatedNotification__ReasoningEffort = string; -export const V2ThreadSettingsUpdatedNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadSettingsUpdatedNotification__ReasoningSummary = - | "auto" - | "concise" - | "detailed" - | "none"; -export const V2ThreadSettingsUpdatedNotification__ReasoningSummary = Schema.Union( - [ - Schema.Literals(["auto", "concise", "detailed"]), - Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries", -}); - -export type V2ThreadStartedNotification__AbsolutePathBuf = string; -export const V2ThreadStartedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ThreadStartedNotification__AgentPath = string; export const V2ThreadStartedNotification__AgentPath = Schema.String; @@ -8860,6 +7095,48 @@ export const V2ThreadStartedNotification__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadStartedNotification__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadStartedNotification__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadStartedNotification__CommandExecutionStatus = | "inProgress" | "completed" @@ -8874,8 +7151,7 @@ export const V2ThreadStartedNotification__CommandExecutionStatus = Schema.Litera export type V2ThreadStartedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -8890,12 +7166,6 @@ export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Sch title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -8930,32 +7200,6 @@ export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadStartedNotification__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadStartedNotification__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadStartedNotification__LegacyAppPathString = string; -export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String; - -export type V2ThreadStartedNotification__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string }; export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -9043,20 +7287,24 @@ export const V2ThreadStartedNotification__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartedNotification__ReasoningEffort = string; -export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadStartedNotification__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2ThreadStartedNotification__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadStartedNotification__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadStartedNotification__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ThreadStartedNotification__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -9094,9 +7342,6 @@ export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([ export type V2ThreadStartedNotification__ThreadId = string; export const V2ThreadStartedNotification__ThreadId = Schema.String; -export type V2ThreadStartedNotification__ThreadSource = string; -export const V2ThreadStartedNotification__ThreadSource = Schema.String; - export type V2ThreadStartedNotification__TurnStatus = | "completed" | "interrupted" @@ -9141,18 +7386,18 @@ export const V2ThreadStartedNotification__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2ThreadStartParams__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ThreadStartParams__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ThreadStartParams__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -9166,7 +7411,7 @@ export type V2ThreadStartParams__AskForApproval = }; export const V2ThreadStartParams__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -9180,29 +7425,6 @@ export const V2ThreadStartParams__AskForApproval = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartParams__DynamicToolNamespaceTool = { - readonly deferLoading?: boolean; - readonly description: string; - readonly inputSchema: unknown; - readonly name: string; - readonly type: "function"; -}; -export const V2ThreadStartParams__DynamicToolNamespaceTool = Schema.Union( - [ - Schema.Struct({ - deferLoading: Schema.optionalKey(Schema.Boolean), - description: Schema.String, - inputSchema: Schema.Unknown, - name: Schema.String, - type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }), - }).annotate({ title: "FunctionDynamicToolNamespaceTool" }), - ], - { mode: "oneOf" }, -); - -export type V2ThreadStartParams__LegacyAppPathString = string; -export const V2ThreadStartParams__LegacyAppPathString = Schema.String; - export type V2ThreadStartParams__Personality = "none" | "friendly" | "pragmatic"; export const V2ThreadStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]); @@ -9216,8 +7438,8 @@ export const V2ThreadStartParams__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ThreadStartParams__ThreadSource = string; -export const V2ThreadStartParams__ThreadSource = Schema.String; +export type V2ThreadStartParams__ServiceTier = "fast" | "flex"; +export const V2ThreadStartParams__ServiceTier = Schema.Literals(["fast", "flex"]); export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear"; export const V2ThreadStartParams__ThreadStartSource = Schema.Literals(["startup", "clear"]); @@ -9233,6 +7455,7 @@ export const V2ThreadStartResponse__AgentPath = Schema.String; export type V2ThreadStartResponse__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -9246,7 +7469,7 @@ export type V2ThreadStartResponse__AskForApproval = }; export const V2ThreadStartResponse__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -9278,6 +7501,48 @@ export const V2ThreadStartResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadStartResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadStartResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadStartResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -9292,8 +7557,7 @@ export const V2ThreadStartResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadStartResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -9308,12 +7572,6 @@ export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Un title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -9345,32 +7603,6 @@ export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadStartResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadStartResponse__LegacyAppPathString = string; -export const V2ThreadStartResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadStartResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadStartResponse__McpToolCallError = { readonly message: string }; export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -9453,17 +7685,27 @@ export const V2ThreadStartResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartResponse__ReasoningEffort = string; -export const V2ThreadStartResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); +export type V2ThreadStartResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadStartResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); -export type V2ThreadStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2ThreadStartResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadStartResponse__ServiceTier = "fast" | "flex"; +export const V2ThreadStartResponse__ServiceTier = Schema.Literals(["fast", "flex"]); export type V2ThreadStartResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -9499,9 +7741,6 @@ export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadStartResponse__ThreadId = string; export const V2ThreadStartResponse__ThreadId = Schema.String; -export type V2ThreadStartResponse__ThreadSource = string; -export const V2ThreadStartResponse__ThreadSource = Schema.String; - export type V2ThreadStartResponse__TurnStatus = | "completed" | "interrupted" @@ -9555,7 +7794,6 @@ export const V2ThreadStatusChangedNotification__ThreadActiveFlag = Schema.Litera ]); export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = { - readonly cacheWriteInputTokens?: number; readonly cachedInputTokens: number; readonly inputTokens: number; readonly outputTokens: number; @@ -9563,9 +7801,6 @@ export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = { readonly totalTokens: number; }; export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema.Struct({ - cacheWriteInputTokens: Schema.optionalKey( - Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()), - ), cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), @@ -9573,12 +7808,6 @@ export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), }); -export type V2ThreadUnarchiveResponse__AbsolutePathBuf = string; -export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2ThreadUnarchiveResponse__AgentPath = string; export const V2ThreadUnarchiveResponse__AgentPath = Schema.String; @@ -9600,6 +7829,48 @@ export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2ThreadUnarchiveResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2ThreadUnarchiveResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadUnarchiveResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -9614,8 +7885,7 @@ export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -9630,12 +7900,6 @@ export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schem title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -9670,32 +7934,6 @@ export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2ThreadUnarchiveResponse__LegacyAppPathString = string; -export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String; - -export type V2ThreadUnarchiveResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string }; export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -9783,20 +8021,24 @@ export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadUnarchiveResponse__ReasoningEffort = string; -export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2ThreadUnarchiveResponse__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2ThreadUnarchiveResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2ThreadUnarchiveResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -9834,9 +8076,6 @@ export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadUnarchiveResponse__ThreadId = string; export const V2ThreadUnarchiveResponse__ThreadId = Schema.String; -export type V2ThreadUnarchiveResponse__ThreadSource = string; -export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String; - export type V2ThreadUnarchiveResponse__TurnStatus = | "completed" | "interrupted" @@ -9891,12 +8130,6 @@ export const V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus = Schema.Liter "unsubscribed", ]); -export type V2TurnCompletedNotification__AbsolutePathBuf = string; -export const V2TurnCompletedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2TurnCompletedNotification__CollabAgentStatus = | "pendingInit" | "running" @@ -9915,6 +8148,48 @@ export const V2TurnCompletedNotification__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2TurnCompletedNotification__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2TurnCompletedNotification__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2TurnCompletedNotification__CommandExecutionStatus = | "inProgress" | "completed" @@ -9929,8 +8204,7 @@ export const V2TurnCompletedNotification__CommandExecutionStatus = Schema.Litera export type V2TurnCompletedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -9945,12 +8219,6 @@ export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Sch title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -9974,32 +8242,6 @@ export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2TurnCompletedNotification__LegacyAppPathString = string; -export const V2TurnCompletedNotification__LegacyAppPathString = Schema.String; - -export type V2TurnCompletedNotification__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2TurnCompletedNotification__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2TurnCompletedNotification__McpToolCallError = { readonly message: string }; export const V2TurnCompletedNotification__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -10087,20 +8329,24 @@ export const V2TurnCompletedNotification__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnCompletedNotification__ReasoningEffort = string; -export const V2TurnCompletedNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2TurnCompletedNotification__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2TurnCompletedNotification__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2TurnCompletedNotification__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2TurnCompletedNotification__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2TurnCompletedNotification__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -10181,12 +8427,6 @@ export const V2TurnPlanUpdatedNotification__TurnPlanStepStatus = Schema.Literals "completed", ]); -export type V2TurnStartedNotification__AbsolutePathBuf = string; -export const V2TurnStartedNotification__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2TurnStartedNotification__CollabAgentStatus = | "pendingInit" | "running" @@ -10205,6 +8445,48 @@ export const V2TurnStartedNotification__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2TurnStartedNotification__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2TurnStartedNotification__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2TurnStartedNotification__CommandExecutionStatus = | "inProgress" | "completed" @@ -10219,8 +8501,7 @@ export const V2TurnStartedNotification__CommandExecutionStatus = Schema.Literals export type V2TurnStartedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -10235,12 +8516,6 @@ export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schem title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -10264,32 +8539,6 @@ export const V2TurnStartedNotification__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2TurnStartedNotification__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2TurnStartedNotification__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2TurnStartedNotification__LegacyAppPathString = string; -export const V2TurnStartedNotification__LegacyAppPathString = Schema.String; - -export type V2TurnStartedNotification__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2TurnStartedNotification__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2TurnStartedNotification__McpToolCallError = { readonly message: string }; export const V2TurnStartedNotification__McpToolCallError = Schema.Struct({ message: Schema.String, @@ -10377,20 +8626,24 @@ export const V2TurnStartedNotification__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnStartedNotification__ReasoningEffort = string; -export const V2TurnStartedNotification__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2TurnStartedNotification__SubAgentActivityKind = - | "started" - | "interacted" - | "interrupted"; -export const V2TurnStartedNotification__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2TurnStartedNotification__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2TurnStartedNotification__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2TurnStartedNotification__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -10467,24 +8720,18 @@ export const V2TurnStartParams__AbsolutePathBuf = Schema.String.annotate({ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); -export type V2TurnStartParams__AdditionalContextKind = "untrusted" | "application"; -export const V2TurnStartParams__AdditionalContextKind = Schema.Literals([ - "untrusted", - "application", -]); - -export type V2TurnStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2TurnStartParams__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2TurnStartParams__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2TurnStartParams__AskForApproval = | "untrusted" + | "on-failure" | "on-request" | "never" | { @@ -10498,7 +8745,7 @@ export type V2TurnStartParams__AskForApproval = }; export const V2TurnStartParams__AskForApproval = Schema.Union( [ - Schema.Literals(["untrusted", "on-request", "never"]), + Schema.Literals(["untrusted", "on-failure", "on-request", "never"]), Schema.Struct({ granular: Schema.Struct({ mcp_elicitations: Schema.Boolean, @@ -10512,12 +8759,6 @@ export const V2TurnStartParams__AskForApproval = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnStartParams__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2TurnStartParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]); - -export type V2TurnStartParams__LegacyAppPathString = string; -export const V2TurnStartParams__LegacyAppPathString = Schema.String; - export type V2TurnStartParams__ModeKind = "plan" | "default"; export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]).annotate({ description: "Initial collaboration mode to use when the TUI starts.", @@ -10526,10 +8767,24 @@ export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]). export type V2TurnStartParams__Personality = "none" | "friendly" | "pragmatic"; export const V2TurnStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]); -export type V2TurnStartParams__ReasoningEffort = string; -export const V2TurnStartParams__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); +export type V2TurnStartParams__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2TurnStartParams__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2TurnStartParams__ReasoningSummary = "auto" | "concise" | "detailed" | "none"; export const V2TurnStartParams__ReasoningSummary = Schema.Union( @@ -10543,6 +8798,9 @@ export const V2TurnStartParams__ReasoningSummary = Schema.Union( "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries", }); +export type V2TurnStartParams__ServiceTier = "fast" | "flex"; +export const V2TurnStartParams__ServiceTier = Schema.Literals(["fast", "flex"]); + export type V2TurnStartParams__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -10568,12 +8826,6 @@ export const V2TurnStartParams__TextElement = Schema.Struct({ ), }); -export type V2TurnStartResponse__AbsolutePathBuf = string; -export const V2TurnStartResponse__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - export type V2TurnStartResponse__CollabAgentStatus = | "pendingInit" | "running" @@ -10592,6 +8844,48 @@ export const V2TurnStartResponse__CollabAgentStatus = Schema.Literals([ "notFound", ]); +export type V2TurnStartResponse__CommandAction = + | { + readonly command: string; + readonly name: string; + readonly path: string; + readonly type: "read"; + } + | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { + readonly command: string; + readonly path?: string | null; + readonly query?: string | null; + readonly type: "search"; + } + | { readonly command: string; readonly type: "unknown" }; +export const V2TurnStartResponse__CommandAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + name: Schema.String, + path: Schema.String, + type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), + }).annotate({ title: "ReadCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), + }).annotate({ title: "ListFilesCommandAction" }), + Schema.Struct({ + command: Schema.String, + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), + }).annotate({ title: "SearchCommandAction" }), + Schema.Struct({ + command: Schema.String, + type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), + }).annotate({ title: "UnknownCommandAction" }), + ], + { mode: "oneOf" }, +); + export type V2TurnStartResponse__CommandExecutionStatus = | "inProgress" | "completed" @@ -10606,8 +8900,7 @@ export const V2TurnStartResponse__CommandExecutionStatus = Schema.Literals([ export type V2TurnStartResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" } - | { readonly audioUrl: string; readonly type: "inputAudio" }; + | { readonly imageUrl: string; readonly type: "inputImage" }; export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -10622,12 +8915,6 @@ export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Unio title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), - Schema.Struct({ - audioUrl: Schema.String, - type: Schema.Literal("inputAudio").annotate({ - title: "InputAudioDynamicToolCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -10648,32 +8935,6 @@ export const V2TurnStartResponse__HookPromptFragment = Schema.Struct({ text: Schema.String, }); -export type V2TurnStartResponse__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2TurnStartResponse__ImageDetail = Schema.Literals([ - "auto", - "low", - "high", - "original", -]); - -export type V2TurnStartResponse__LegacyAppPathString = string; -export const V2TurnStartResponse__LegacyAppPathString = Schema.String; - -export type V2TurnStartResponse__McpToolCallAppContext = { - readonly actionName?: string | null; - readonly appName?: string | null; - readonly connectorId: string; - readonly linkId?: string | null; - readonly resourceUri?: string | null; -}; -export const V2TurnStartResponse__McpToolCallAppContext = Schema.Struct({ - actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorId: Schema.String, - linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2TurnStartResponse__McpToolCallError = { readonly message: string }; export const V2TurnStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String }); @@ -10756,17 +9017,24 @@ export const V2TurnStartResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnStartResponse__ReasoningEffort = string; -export const V2TurnStartResponse__ReasoningEffort = Schema.String.annotate({ - description: "A non-empty reasoning effort value advertised by the model.", -}).check(Schema.isMinLength(1)); - -export type V2TurnStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted"; -export const V2TurnStartResponse__SubAgentActivityKind = Schema.Literals([ - "started", - "interacted", - "interrupted", -]); +export type V2TurnStartResponse__ReasoningEffort = + | "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; +export const V2TurnStartResponse__ReasoningEffort = Schema.Literals([ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", +]).annotate({ + description: + "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", +}); export type V2TurnStartResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; @@ -10833,15 +9101,6 @@ export const V2TurnStartResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnSteerParams__AdditionalContextKind = "untrusted" | "application"; -export const V2TurnSteerParams__AdditionalContextKind = Schema.Literals([ - "untrusted", - "application", -]); - -export type V2TurnSteerParams__ImageDetail = "auto" | "low" | "high" | "original"; -export const V2TurnSteerParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]); - export type V2TurnSteerParams__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -10867,16 +9126,6 @@ export const V2TurnSteerParams__TextElement = Schema.Struct({ ), }); -export type V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness = - | "ready" - | "notConfigured" - | "updateRequired"; -export const V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness = Schema.Literals([ - "ready", - "notConfigured", - "updateRequired", -]); - export type V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode = | "elevated" | "unelevated"; @@ -10907,59 +9156,76 @@ export const ApplyPatchApprovalResponse__NetworkPolicyAmendment = Schema.Struct( }); export type ClientRequest__PluginInstallParams = { - readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null; + readonly forceRemoteSync?: boolean; + readonly marketplacePath: ClientRequest__AbsolutePathBuf; readonly pluginName: string; - readonly remoteMarketplaceName?: string | null; }; export const ClientRequest__PluginInstallParams = Schema.Struct({ - marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])), + forceRemoteSync: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "When true, apply the remote plugin change before the local install flow.", + }), + ), + marketplacePath: ClientRequest__AbsolutePathBuf, pluginName: Schema.String, - remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ClientRequest__PluginInstalledParams = { +export type ClientRequest__PluginListParams = { readonly cwds?: ReadonlyArray | null; - readonly installSuggestionPluginNames?: ReadonlyArray | null; + readonly forceRemoteSync?: boolean; }; -export const ClientRequest__PluginInstalledParams = Schema.Struct({ +export const ClientRequest__PluginListParams = Schema.Struct({ cwds: Schema.optionalKey( Schema.Union([ Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ - description: "Optional working directories used to discover repo marketplaces.", + description: + "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.", }), Schema.Null, ]), ), - installSuggestionPluginNames: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.String).annotate({ - description: - "Additional uninstalled plugin names that should be returned when present locally. This is used by mention surfaces that intentionally expose install entrypoints.", - }), - Schema.Null, - ]), + forceRemoteSync: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, reconcile the official curated marketplace against the remote plugin state before listing marketplaces.", + }), ), }); export type ClientRequest__PluginReadParams = { - readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null; + readonly marketplacePath: ClientRequest__AbsolutePathBuf; readonly pluginName: string; - readonly remoteMarketplaceName?: string | null; }; export const ClientRequest__PluginReadParams = Schema.Struct({ - marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])), + marketplacePath: ClientRequest__AbsolutePathBuf, pluginName: Schema.String, - remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type ClientRequest__SandboxPolicy = | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } + | { + readonly access?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly networkAccess?: boolean; + readonly type: "readOnly"; + } | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { readonly excludeSlashTmp?: boolean; readonly excludeTmpdirEnvVar?: boolean; readonly networkAccess?: boolean; + readonly readOnlyAccess?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; readonly type: "workspaceWrite"; readonly writableRoots?: ReadonlyArray; }; @@ -10971,6 +9237,29 @@ export const ClientRequest__SandboxPolicy = Schema.Union( }), }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ + access: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), }).annotate({ title: "ReadOnlySandboxPolicy" }), @@ -10986,6 +9275,29 @@ export const ClientRequest__SandboxPolicy = Schema.Union( excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + readOnlyAccess: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), writableRoots: Schema.optionalKey( Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), @@ -11012,61 +9324,32 @@ export const ClientRequest__SkillsConfigWriteParams = Schema.Struct({ ), }); -export type ClientRequest__SkillsExtraRootsSetParams = { - readonly extraRoots: ReadonlyArray; +export type ClientRequest__ExternalAgentConfigMigrationItem = { + readonly cwd?: string | null; + readonly description: string; + readonly itemType: ClientRequest__ExternalAgentConfigMigrationItemType; }; -export const ClientRequest__SkillsExtraRootsSetParams = Schema.Struct({ - extraRoots: Schema.Array(ClientRequest__AbsolutePathBuf), +export const ClientRequest__ExternalAgentConfigMigrationItem = Schema.Struct({ + cwd: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Null or empty means home-scoped migration; non-empty means repo-scoped migration.", + }), + Schema.Null, + ]), + ), + description: Schema.String, + itemType: ClientRequest__ExternalAgentConfigMigrationItemType, }); -export type ClientRequest__SendAddCreditsNudgeEmailParams = { - readonly creditType: ClientRequest__AddCreditsNudgeCreditType; -}; -export const ClientRequest__SendAddCreditsNudgeEmailParams = Schema.Struct({ - creditType: ClientRequest__AddCreditsNudgeCreditType, -}); - -export type ClientRequest__ContentItem = - | { readonly text: string; readonly type: "input_text" } - | { - readonly detail?: ClientRequest__ImageDetail | null; - readonly image_url: string; - readonly type: "input_image"; - } - | { readonly audio_url: string; readonly type: "input_audio" } - | { readonly text: string; readonly type: "output_text" }; -export const ClientRequest__ContentItem = Schema.Union( - [ - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }), - }).annotate({ title: "InputTextContentItem" }), - Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])), - image_url: Schema.String, - type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), - }).annotate({ title: "InputImageContentItem" }), - Schema.Struct({ - audio_url: Schema.String, - type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }), - }).annotate({ title: "InputAudioContentItem" }), - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), - }).annotate({ title: "OutputTextContentItem" }), - ], - { mode: "oneOf" }, -); - export type ClientRequest__FunctionCallOutputContentItem = | { readonly text: string; readonly type: "input_text" } | { readonly detail?: ClientRequest__ImageDetail | null; readonly image_url: string; readonly type: "input_image"; - } - | { readonly audio_url: string; readonly type: "input_audio" } - | { readonly encrypted_content: string; readonly type: "encrypted_content" }; + }; export const ClientRequest__FunctionCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -11082,18 +9365,6 @@ export const ClientRequest__FunctionCallOutputContentItem = Schema.Union( title: "InputImageFunctionCallOutputContentItemType", }), }).annotate({ title: "InputImageFunctionCallOutputContentItem" }), - Schema.Struct({ - audio_url: Schema.String, - type: Schema.Literal("input_audio").annotate({ - title: "InputAudioFunctionCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }), - Schema.Struct({ - encrypted_content: Schema.String, - type: Schema.Literal("encrypted_content").annotate({ - title: "EncryptedContentFunctionCallOutputContentItemType", - }), - }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }), ], { mode: "oneOf" }, ).annotate({ @@ -11112,83 +9383,10 @@ export const ClientRequest__InitializeParams = Schema.Struct({ clientInfo: ClientRequest__ClientInfo, }); -export type ClientRequest__LoginAccountParams = - | { readonly apiKey: string; readonly type: "apiKey" } - | { - readonly appBrand?: ClientRequest__LoginAppBrand | null; - readonly codexStreamlinedLogin?: boolean; - readonly type: "chatgpt"; - readonly useHostedLoginSuccessPage?: boolean; - } - | { readonly type: "chatgptDeviceCode" } - | { - readonly accessToken: string; - readonly chatgptAccountId: string; - readonly chatgptPlanType?: string | null; - readonly type: "chatgptAuthTokens"; - } - | { readonly apiKey: string; readonly region: string; readonly type: "amazonBedrock" }; -export const ClientRequest__LoginAccountParams = Schema.Union( - [ - Schema.Struct({ - apiKey: Schema.String, - type: Schema.Literal("apiKey").annotate({ title: "ApiKeyLoginAccountParamsType" }), - }).annotate({ title: "ApiKeyLoginAccountParams" }), - Schema.Struct({ - appBrand: Schema.optionalKey(Schema.Union([ClientRequest__LoginAppBrand, Schema.Null])), - codexStreamlinedLogin: Schema.optionalKey(Schema.Boolean), - type: Schema.Literal("chatgpt").annotate({ title: "ChatgptLoginAccountParamsType" }), - useHostedLoginSuccessPage: Schema.optionalKey(Schema.Boolean), - }).annotate({ title: "ChatgptLoginAccountParams" }), - Schema.Struct({ - type: Schema.Literal("chatgptDeviceCode").annotate({ - title: "ChatgptDeviceCodeLoginAccountParamsType", - }), - }).annotate({ title: "ChatgptDeviceCodeLoginAccountParams" }), - Schema.Struct({ - accessToken: Schema.String.annotate({ - description: - "Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.", - }), - chatgptAccountId: Schema.String.annotate({ - description: "Workspace/account identifier supplied by the client.", - }), - chatgptPlanType: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.", - }), - Schema.Null, - ]), - ), - type: Schema.Literal("chatgptAuthTokens").annotate({ - title: "ChatgptAuthTokensLoginAccountParamsType", - }), - }).annotate({ - title: "ChatgptAuthTokensLoginAccountParams", - description: - "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.", - }), - Schema.Struct({ - apiKey: Schema.String, - region: Schema.String, - type: Schema.Literal("amazonBedrock").annotate({ - title: "AmazonBedrockLoginAccountParamsType", - }), - }).annotate({ - title: "AmazonBedrockLoginAccountParams", - description: "[UNSTABLE] Managed Amazon Bedrock login is experimental.", - }), - ], - { mode: "oneOf" }, -); - export type ClientRequest__ListMcpServerStatusParams = { readonly cursor?: string | null; readonly detail?: ClientRequest__McpServerStatusDetail | null; readonly limit?: number | null; - readonly threadId?: string | null; }; export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({ cursor: Schema.optionalKey( @@ -11216,7 +9414,6 @@ export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({ Schema.Null, ]), ), - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type ClientRequest__ConfigEdit = { @@ -11253,42 +9450,6 @@ export const ClientRequest__ConfigValueWriteParams = Schema.Struct({ value: Schema.Unknown, }); -export type ClientRequest__PluginListParams = { - readonly cwds?: ReadonlyArray | null; - readonly marketplaceKinds?: ReadonlyArray | null; -}; -export const ClientRequest__PluginListParams = Schema.Struct({ - cwds: Schema.optionalKey( - Schema.Union([ - Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ - description: - "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.", - }), - Schema.Null, - ]), - ), - marketplaceKinds: Schema.optionalKey( - Schema.Union([ - Schema.Array(ClientRequest__PluginListMarketplaceKind).annotate({ - description: - "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.", - }), - Schema.Null, - ]), - ), -}); - -export type ClientRequest__PluginShareTarget = { - readonly principalId: string; - readonly principalType: ClientRequest__PluginSharePrincipalType; - readonly role: ClientRequest__PluginShareTargetRole; -}; -export const ClientRequest__PluginShareTarget = Schema.Struct({ - principalId: Schema.String, - principalType: ClientRequest__PluginSharePrincipalType, - role: ClientRequest__PluginShareTargetRole, -}); - export type ClientRequest__Settings = { readonly developer_instructions?: string | null; readonly model: string; @@ -11316,6 +9477,54 @@ export const ClientRequest__ReviewStartParams = Schema.Struct({ threadId: Schema.String, }); +export type ClientRequest__ThreadForkParams = { + readonly approvalPolicy?: ClientRequest__AskForApproval | null; + readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; + readonly baseInstructions?: string | null; + readonly config?: { readonly [x: string]: unknown } | null; + readonly cwd?: string | null; + readonly developerInstructions?: string | null; + readonly ephemeral?: boolean; + readonly model?: string | null; + readonly modelProvider?: string | null; + readonly sandbox?: ClientRequest__SandboxMode | null; + readonly serviceTier?: ClientRequest__ServiceTier | null | null; + readonly threadId: string; +}; +export const ClientRequest__ThreadForkParams = Schema.Struct({ + approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])), + approvalsReviewer: Schema.optionalKey( + Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({ + description: + "Override where approval requests are routed for review on this thread and subsequent turns.", + }), + ), + baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + config: Schema.optionalKey( + Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]), + ), + cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + ephemeral: Schema.optionalKey(Schema.Boolean), + model: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: "Configuration overrides for the forked thread, if any.", + }), + Schema.Null, + ]), + ), + modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), + serviceTier: Schema.optionalKey( + Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]), + ), + threadId: Schema.String, +}).annotate({ + description: + "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", +}); + export type ClientRequest__ThreadResumeParams = { readonly approvalPolicy?: ClientRequest__AskForApproval | null; readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; @@ -11327,7 +9536,7 @@ export type ClientRequest__ThreadResumeParams = { readonly modelProvider?: string | null; readonly personality?: ClientRequest__Personality | null; readonly sandbox?: ClientRequest__SandboxMode | null; - readonly serviceTier?: string | null; + readonly serviceTier?: ClientRequest__ServiceTier | null | null; readonly threadId: string; }; export const ClientRequest__ThreadResumeParams = Schema.Struct({ @@ -11355,41 +9564,38 @@ export const ClientRequest__ThreadResumeParams = Schema.Struct({ modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + serviceTier: Schema.optionalKey( + Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]), + ), threadId: Schema.String, }).annotate({ description: - "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.", + "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", }); -export type ClientRequest__MigrationDetails = { - readonly commands?: ReadonlyArray; - readonly hooks?: ReadonlyArray; - readonly mcpServers?: ReadonlyArray; - readonly memory?: ReadonlyArray; - readonly plugins?: ReadonlyArray; - readonly sessions?: ReadonlyArray; - readonly skills?: ReadonlyArray; - readonly subagents?: ReadonlyArray; +export type ClientRequest__SkillsListParams = { + readonly cwds?: ReadonlyArray; + readonly forceReload?: boolean; + readonly perCwdExtraUserRoots?: ReadonlyArray | null; }; -export const ClientRequest__MigrationDetails = Schema.Struct({ - commands: Schema.optionalKey( - Schema.Array(ClientRequest__CommandMigration).annotate({ default: [] }), +export const ClientRequest__SkillsListParams = Schema.Struct({ + cwds: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "When empty, defaults to the current session working directory.", + }), ), - hooks: Schema.optionalKey(Schema.Array(ClientRequest__HookMigration).annotate({ default: [] })), - mcpServers: Schema.optionalKey( - Schema.Array(ClientRequest__McpServerMigration).annotate({ default: [] }), + forceReload: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "When true, bypass the skills cache and re-scan skills from disk.", + }), ), - memory: Schema.optionalKey(Schema.Array(Schema.String)), - plugins: Schema.optionalKey( - Schema.Array(ClientRequest__PluginsMigration).annotate({ default: [] }), - ), - sessions: Schema.optionalKey( - Schema.Array(ClientRequest__SessionMigration).annotate({ default: [] }), - ), - skills: Schema.optionalKey(Schema.Array(ClientRequest__SkillMigration).annotate({ default: [] })), - subagents: Schema.optionalKey( - Schema.Array(ClientRequest__SubagentMigration).annotate({ default: [] }), + perCwdExtraUserRoots: Schema.optionalKey( + Schema.Union([ + Schema.Array(ClientRequest__SkillsListExtraRootsForCwd).annotate({ + description: "Optional per-cwd extra roots to scan as user-scoped skills.", + }), + Schema.Null, + ]), ), }); @@ -11399,18 +9605,8 @@ export type ClientRequest__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: ClientRequest__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: ClientRequest__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const ClientRequest__UserInput = Schema.Union( @@ -11426,23 +9622,13 @@ export const ClientRequest__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -11457,21 +9643,6 @@ export const ClientRequest__UserInput = Schema.Union( { mode: "oneOf" }, ); -export type ClientRequest__ThreadGoalSetParams = { - readonly objective?: string | null; - readonly status?: ClientRequest__ThreadGoalStatus | null; - readonly threadId: string; - readonly tokenBudget?: number | null; -}; -export const ClientRequest__ThreadGoalSetParams = Schema.Struct({ - objective: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: Schema.optionalKey(Schema.Union([ClientRequest__ThreadGoalStatus, Schema.Null])), - threadId: Schema.String, - tokenBudget: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), -}); - export type ClientRequest__ThreadMetadataUpdateParams = { readonly gitInfo?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null; readonly threadId: string; @@ -11486,80 +9657,15 @@ export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({ threadId: Schema.String, }); -export type ClientRequest__ThreadForkParams = { - readonly approvalPolicy?: ClientRequest__AskForApproval | null; - readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; - readonly baseInstructions?: string | null; - readonly config?: { readonly [x: string]: unknown } | null; - readonly cwd?: string | null; - readonly developerInstructions?: string | null; - readonly ephemeral?: boolean; - readonly lastTurnId?: string | null; - readonly model?: string | null; - readonly modelProvider?: string | null; - readonly sandbox?: ClientRequest__SandboxMode | null; - readonly serviceTier?: string | null; - readonly threadId: string; - readonly threadSource?: ClientRequest__ThreadSource | null; -}; -export const ClientRequest__ThreadForkParams = Schema.Struct({ - approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])), - approvalsReviewer: Schema.optionalKey( - Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({ - description: - "Override where approval requests are routed for review on this thread and subsequent turns.", - }), - ), - baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - config: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]), - ), - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - ephemeral: Schema.optionalKey(Schema.Boolean), - lastTurnId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional last turn id to fork through, inclusive.\n\nWhen specified, turns after `last_turn_id` are omitted from the fork. The referenced turn cannot be in progress.", - }), - Schema.Null, - ]), - ), - model: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Configuration overrides for the forked thread, if any.", - }), - Schema.Null, - ]), - ), - modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - threadId: Schema.String, - threadSource: Schema.optionalKey( - Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({ - description: - "Optional client-supplied analytics source classification for this forked thread.", - }), - ), -}).annotate({ - description: - "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.", -}); - export type ClientRequest__ThreadListParams = { readonly archived?: boolean | null; readonly cursor?: string | null; - readonly cwd?: ClientRequest__ThreadListCwdFilter | null; + readonly cwd?: string | null; readonly limit?: number | null; readonly modelProviders?: ReadonlyArray | null; readonly searchTerm?: string | null; - readonly sortDirection?: ClientRequest__SortDirection | null; readonly sortKey?: ClientRequest__ThreadSortKey | null; readonly sourceKinds?: ReadonlyArray | null; - readonly useStateDbOnly?: boolean; }; export const ClientRequest__ThreadListParams = Schema.Struct({ archived: Schema.optionalKey( @@ -11580,10 +9686,13 @@ export const ClientRequest__ThreadListParams = Schema.Struct({ ]), ), cwd: Schema.optionalKey( - Schema.Union([ClientRequest__ThreadListCwdFilter, Schema.Null]).annotate({ - description: - "Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.", - }), + Schema.Union([ + Schema.String.annotate({ + description: + "Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.", + }), + Schema.Null, + ]), ), limit: Schema.optionalKey( Schema.Union([ @@ -11613,11 +9722,6 @@ export const ClientRequest__ThreadListParams = Schema.Struct({ Schema.Null, ]), ), - sortDirection: Schema.optionalKey( - Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({ - description: "Optional sort direction; defaults to descending (newest first).", - }), - ), sortKey: Schema.optionalKey( Schema.Union([ClientRequest__ThreadSortKey, Schema.Null]).annotate({ description: "Optional sort key; defaults to created_at.", @@ -11632,12 +9736,6 @@ export const ClientRequest__ThreadListParams = Schema.Struct({ Schema.Null, ]), ), - useStateDbOnly: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.", - }), - ), }); export type ClientRequest__ThreadStartParams = { @@ -11653,9 +9751,8 @@ export type ClientRequest__ThreadStartParams = { readonly personality?: ClientRequest__Personality | null; readonly sandbox?: ClientRequest__SandboxMode | null; readonly serviceName?: string | null; - readonly serviceTier?: string | null; + readonly serviceTier?: ClientRequest__ServiceTier | null | null; readonly sessionStartSource?: ClientRequest__ThreadStartSource | null; - readonly threadSource?: ClientRequest__ThreadSource | null; }; export const ClientRequest__ThreadStartParams = Schema.Struct({ approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])), @@ -11677,15 +9774,12 @@ export const ClientRequest__ThreadStartParams = Schema.Struct({ personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + serviceTier: Schema.optionalKey( + Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]), + ), sessionStartSource: Schema.optionalKey( Schema.Union([ClientRequest__ThreadStartSource, Schema.Null]), ), - threadSource: Schema.optionalKey( - Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({ - description: "Optional client-supplied analytics source classification for this thread.", - }), - ), }); export type ClientRequest__WindowsSandboxSetupStartParams = { @@ -11697,91 +9791,25 @@ export const ClientRequest__WindowsSandboxSetupStartParams = Schema.Struct({ mode: ClientRequest__WindowsSandboxSetupMode, }); -export type CommandExecutionRequestApprovalParams__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: CommandExecutionRequestApprovalParams__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const CommandExecutionRequestApprovalParams__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: CommandExecutionRequestApprovalParams__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - -export type CommandExecutionRequestApprovalParams__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } - | { - readonly kind: "project_roots"; - readonly subpath?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null; - } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } - | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null; - }; -export const CommandExecutionRequestApprovalParams__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey( - Schema.Union([CommandExecutionRequestApprovalParams__LegacyAppPathString, Schema.Null]), - ), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey( - Schema.Union([CommandExecutionRequestApprovalParams__LegacyAppPathString, Schema.Null]), - ), - }), - ], - { mode: "oneOf" }, +export type CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = { + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; +}; +export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct( + { + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(CommandExecutionRequestApprovalParams__AbsolutePathBuf), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(CommandExecutionRequestApprovalParams__AbsolutePathBuf), + Schema.Null, + ]), + ), + }, ); export type CommandExecutionRequestApprovalParams__NetworkApprovalContext = { @@ -12057,137 +10085,31 @@ export const McpServerElicitationRequestParams__McpElicitationUntitledSingleSele type: McpServerElicitationRequestParams__McpElicitationStringType, }); -export type PermissionsRequestApprovalParams__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } - | { - readonly kind: "project_roots"; - readonly subpath?: PermissionsRequestApprovalParams__LegacyAppPathString | null; - } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } - | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: PermissionsRequestApprovalParams__LegacyAppPathString | null; - }; -export const PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalParams__LegacyAppPathString, Schema.Null]), - ), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalParams__LegacyAppPathString, Schema.Null]), - ), - }), - ], - { mode: "oneOf" }, -); +export type PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = { + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; +}; +export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct({ + read: Schema.optionalKey( + Schema.Union([Schema.Array(PermissionsRequestApprovalParams__AbsolutePathBuf), Schema.Null]), + ), + write: Schema.optionalKey( + Schema.Union([Schema.Array(PermissionsRequestApprovalParams__AbsolutePathBuf), Schema.Null]), + ), +}); -export type PermissionsRequestApprovalResponse__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } - | { - readonly kind: "project_roots"; - readonly subpath?: PermissionsRequestApprovalResponse__LegacyAppPathString | null; - } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } - | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: PermissionsRequestApprovalResponse__LegacyAppPathString | null; - }; -export const PermissionsRequestApprovalResponse__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalResponse__LegacyAppPathString, Schema.Null]), - ), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalResponse__LegacyAppPathString, Schema.Null]), - ), - }), - ], - { mode: "oneOf" }, -); - -export type ServerNotification__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: ServerNotification__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const ServerNotification__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: ServerNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); +export type PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = { + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; +}; +export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = Schema.Struct({ + read: Schema.optionalKey( + Schema.Union([Schema.Array(PermissionsRequestApprovalResponse__AbsolutePathBuf), Schema.Null]), + ), + write: Schema.optionalKey( + Schema.Union([Schema.Array(PermissionsRequestApprovalResponse__AbsolutePathBuf), Schema.Null]), + ), +}); export type ServerNotification__FsChangedNotification = { readonly changedPaths: ReadonlyArray; @@ -12202,49 +10124,6 @@ export const ServerNotification__FsChangedNotification = Schema.Struct({ }), }).annotate({ description: "Filesystem watch notification emitted for `fs/watch` subscribers." }); -export type ServerNotification__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const ServerNotification__SandboxPolicy = Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( - Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, -); - export type ServerNotification__AppMetadata = { readonly categories?: ReadonlyArray | null; readonly developer?: string | null; @@ -12285,38 +10164,6 @@ export const ServerNotification__CollabAgentState = Schema.Struct({ status: ServerNotification__CollabAgentStatus, }); -export type ServerNotification__ExternalAgentConfigImportItemTypeFailure = { - readonly cwd?: string | null; - readonly errorType?: string | null; - readonly failureStage: string; - readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType; - readonly message: string; - readonly source?: string | null; - readonly subErrorType?: string | null; -}; -export const ServerNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - failureStage: Schema.String, - itemType: ServerNotification__ExternalAgentConfigMigrationItemType, - message: Schema.String, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type ServerNotification__ExternalAgentConfigImportItemTypeSuccess = { - readonly cwd?: string | null; - readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType; - readonly source?: string | null; - readonly target?: string | null; -}; -export const ServerNotification__ExternalAgentConfigImportItemTypeSuccess = Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - itemType: ServerNotification__ExternalAgentConfigMigrationItemType, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type ServerNotification__FuzzyFileSearchResult = { readonly file_name: string; readonly indices?: ReadonlyArray | null; @@ -12360,7 +10207,7 @@ export const ServerNotification__GuardianApprovalReview = Schema.Struct({ ), }).annotate({ description: - "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", }); export type ServerNotification__HookOutputEntry = { @@ -12372,66 +10219,15 @@ export const ServerNotification__HookOutputEntry = Schema.Struct({ text: Schema.String, }); -export type ServerNotification__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } - | { - readonly kind: "project_roots"; - readonly subpath?: ServerNotification__LegacyAppPathString | null; - } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } - | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: ServerNotification__LegacyAppPathString | null; - }; -export const ServerNotification__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey( - Schema.Union([ServerNotification__LegacyAppPathString, Schema.Null]), - ), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey( - Schema.Union([ServerNotification__LegacyAppPathString, Schema.Null]), - ), - }), - ], - { mode: "oneOf" }, -); - export type ServerNotification__McpServerStatusUpdatedNotification = { readonly error?: string | null; - readonly failureReason?: ServerNotification__McpServerStartupFailureReason | null; readonly name: string; readonly status: ServerNotification__McpServerStartupState; - readonly threadId?: string | null; }; export const ServerNotification__McpServerStatusUpdatedNotification = Schema.Struct({ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - failureReason: Schema.optionalKey( - Schema.Union([ServerNotification__McpServerStartupFailureReason, Schema.Null]), - ), name: Schema.String, status: ServerNotification__McpServerStartupState, - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type ServerNotification__MemoryCitation = { @@ -12458,23 +10254,89 @@ export const ServerNotification__ModelReroutedNotification = Schema.Struct({ turnId: Schema.String, }); -export type ServerNotification__ModelVerificationNotification = { - readonly threadId: string; - readonly turnId: string; - readonly verifications: ReadonlyArray; -}; -export const ServerNotification__ModelVerificationNotification = Schema.Struct({ - threadId: Schema.String, - turnId: Schema.String, - verifications: Schema.Array(ServerNotification__ModelVerification), -}); +export type ServerNotification__GuardianApprovalReviewAction = + | { + readonly command: string; + readonly cwd: string; + readonly source: ServerNotification__GuardianCommandSource; + readonly type: "command"; + } + | { + readonly argv: ReadonlyArray; + readonly cwd: string; + readonly program: string; + readonly source: ServerNotification__GuardianCommandSource; + readonly type: "execve"; + } + | { readonly cwd: string; readonly files: ReadonlyArray; readonly type: "applyPatch" } + | { + readonly host: string; + readonly port: number; + readonly protocol: ServerNotification__NetworkApprovalProtocol; + readonly target: string; + readonly type: "networkAccess"; + } + | { + readonly connectorId?: string | null; + readonly connectorName?: string | null; + readonly server: string; + readonly toolName: string; + readonly toolTitle?: string | null; + readonly type: "mcpToolCall"; + }; +export const ServerNotification__GuardianApprovalReviewAction = Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + cwd: Schema.String, + source: ServerNotification__GuardianCommandSource, + type: Schema.Literal("command").annotate({ + title: "CommandGuardianApprovalReviewActionType", + }), + }).annotate({ title: "CommandGuardianApprovalReviewAction" }), + Schema.Struct({ + argv: Schema.Array(Schema.String), + cwd: Schema.String, + program: Schema.String, + source: ServerNotification__GuardianCommandSource, + type: Schema.Literal("execve").annotate({ title: "ExecveGuardianApprovalReviewActionType" }), + }).annotate({ title: "ExecveGuardianApprovalReviewAction" }), + Schema.Struct({ + cwd: Schema.String, + files: Schema.Array(Schema.String), + type: Schema.Literal("applyPatch").annotate({ + title: "ApplyPatchGuardianApprovalReviewActionType", + }), + }).annotate({ title: "ApplyPatchGuardianApprovalReviewAction" }), + Schema.Struct({ + host: Schema.String, + port: Schema.Number.annotate({ format: "uint16" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + protocol: ServerNotification__NetworkApprovalProtocol, + target: Schema.String, + type: Schema.Literal("networkAccess").annotate({ + title: "NetworkAccessGuardianApprovalReviewActionType", + }), + }).annotate({ title: "NetworkAccessGuardianApprovalReviewAction" }), + Schema.Struct({ + connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + connectorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + server: Schema.String, + toolName: Schema.String, + toolTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("mcpToolCall").annotate({ + title: "McpToolCallGuardianApprovalReviewActionType", + }), + }).annotate({ title: "McpToolCallGuardianApprovalReviewAction" }), + ], + { mode: "oneOf" }, +); export type ServerNotification__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -12494,10 +10356,8 @@ export const ServerNotification__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -12597,45 +10457,34 @@ export const ServerNotification__AccountUpdatedNotification = Schema.Struct({ planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])), }); +export type ServerNotification__RateLimitSnapshot = { + readonly credits?: ServerNotification__CreditsSnapshot | null; + readonly limitId?: string | null; + readonly limitName?: string | null; + readonly planType?: ServerNotification__PlanType | null; + readonly primary?: ServerNotification__RateLimitWindow | null; + readonly secondary?: ServerNotification__RateLimitWindow | null; +}; +export const ServerNotification__RateLimitSnapshot = Schema.Struct({ + credits: Schema.optionalKey(Schema.Union([ServerNotification__CreditsSnapshot, Schema.Null])), + limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])), + primary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])), + secondary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])), +}); + export type ServerNotification__ThreadRealtimeStartedNotification = { - readonly realtimeSessionId?: string | null; + readonly sessionId?: string | null; readonly threadId: string; readonly version: ServerNotification__RealtimeConversationVersion; }; export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Struct({ - realtimeSessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, version: ServerNotification__RealtimeConversationVersion, }).annotate({ description: "EXPERIMENTAL - emitted when thread realtime startup is accepted." }); -export type ServerNotification__Settings = { - readonly developer_instructions?: string | null; - readonly model: string; - readonly reasoning_effort?: ServerNotification__ReasoningEffort | null; -}; -export const ServerNotification__Settings = Schema.Struct({ - developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - model: Schema.String, - reasoning_effort: Schema.optionalKey( - Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]), - ), -}).annotate({ description: "Settings for a collaboration mode." }); - -export type ServerNotification__RemoteControlStatusChangedNotification = { - readonly environmentId?: string | null; - readonly installationId: string; - readonly serverName: string; - readonly status: ServerNotification__RemoteControlConnectionStatus; -}; -export const ServerNotification__RemoteControlStatusChangedNotification = Schema.Struct({ - environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - installationId: Schema.String, - serverName: Schema.String, - status: ServerNotification__RemoteControlConnectionStatus, -}).annotate({ - description: "Current remote-control connection status and remote identity exposed to clients.", -}); - export type ServerNotification__ServerRequestResolvedNotification = { readonly requestId: ServerNotification__RequestId; readonly threadId: string; @@ -12645,59 +10494,14 @@ export const ServerNotification__ServerRequestResolvedNotification = Schema.Stru threadId: Schema.String, }); -export type ServerNotification__RateLimitSnapshot = { - readonly credits?: ServerNotification__CreditsSnapshot | null; - readonly individualLimit?: ServerNotification__SpendControlLimitSnapshot | null; - readonly limitId?: string | null; - readonly limitName?: string | null; - readonly planType?: ServerNotification__PlanType | null; - readonly primary?: ServerNotification__RateLimitWindow | null; - readonly rateLimitReachedType?: ServerNotification__RateLimitReachedType | null; - readonly secondary?: ServerNotification__RateLimitWindow | null; - readonly spendControlReached?: boolean | null; -}; -export const ServerNotification__RateLimitSnapshot = Schema.Struct({ - credits: Schema.optionalKey(Schema.Union([ServerNotification__CreditsSnapshot, Schema.Null])), - individualLimit: Schema.optionalKey( - Schema.Union([ServerNotification__SpendControlLimitSnapshot, Schema.Null]), - ), - limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])), - primary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])), - rateLimitReachedType: Schema.optionalKey( - Schema.Union([ServerNotification__RateLimitReachedType, Schema.Null]), - ), - secondary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])), - spendControlReached: Schema.optionalKey( - Schema.Union([ - Schema.Boolean.annotate({ - description: - "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", - }), - Schema.Null, - ]), - ), -}); - export type ServerNotification__UserInput = | { readonly text: string; readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: ServerNotification__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: ServerNotification__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const ServerNotification__UserInput = Schema.Union( @@ -12713,23 +10517,13 @@ export const ServerNotification__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -12780,29 +10574,6 @@ export const ServerNotification__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type ServerNotification__ThreadGoal = { - readonly createdAt: number; - readonly objective: string; - readonly status: ServerNotification__ThreadGoalStatus; - readonly threadId: string; - readonly timeUsedSeconds: number; - readonly tokenBudget?: number | null; - readonly tokensUsed: number; - readonly updatedAt: number; -}; -export const ServerNotification__ThreadGoal = Schema.Struct({ - createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - objective: Schema.String, - status: ServerNotification__ThreadGoalStatus, - threadId: Schema.String, - timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - tokenBudget: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), -}); - export type ServerNotification__SubAgentSource = | "review" | "compact" @@ -12876,47 +10647,18 @@ export const ServerNotification__WindowsSandboxSetupCompletedNotification = Sche success: Schema.Boolean, }); -export type ServerRequest__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: ServerRequest__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const ServerRequest__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: ServerRequest__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); +export type ServerRequest__AdditionalFileSystemPermissions = { + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; +}; +export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({ + read: Schema.optionalKey( + Schema.Union([Schema.Array(ServerRequest__AbsolutePathBuf), Schema.Null]), + ), + write: Schema.optionalKey( + Schema.Union([Schema.Array(ServerRequest__AbsolutePathBuf), Schema.Null]), + ), +}); export type ServerRequest__ChatgptAuthTokensRefreshParams = { readonly previousAccountId?: string | null; @@ -12935,44 +10677,6 @@ export const ServerRequest__ChatgptAuthTokensRefreshParams = Schema.Struct({ reason: ServerRequest__ChatgptAuthTokensRefreshReason, }); -export type ServerRequest__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } - | { readonly kind: "project_roots"; readonly subpath?: ServerRequest__LegacyAppPathString | null } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } - | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: ServerRequest__LegacyAppPathString | null; - }; -export const ServerRequest__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null])), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey(Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null])), - }), - ], - { mode: "oneOf" }, -); - export type ServerRequest__McpElicitationBooleanSchema = { readonly default?: boolean | null; readonly description?: string | null; @@ -13241,22 +10945,16 @@ export const ToolRequestUserInputParams__ToolRequestUserInputQuestion = Schema.S export type V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = { readonly credits?: V2AccountRateLimitsUpdatedNotification__CreditsSnapshot | null; - readonly individualLimit?: V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot | null; readonly limitId?: string | null; readonly limitName?: string | null; readonly planType?: V2AccountRateLimitsUpdatedNotification__PlanType | null; readonly primary?: V2AccountRateLimitsUpdatedNotification__RateLimitWindow | null; - readonly rateLimitReachedType?: V2AccountRateLimitsUpdatedNotification__RateLimitReachedType | null; readonly secondary?: V2AccountRateLimitsUpdatedNotification__RateLimitWindow | null; - readonly spendControlReached?: boolean | null; }; export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema.Struct({ credits: Schema.optionalKey( Schema.Union([V2AccountRateLimitsUpdatedNotification__CreditsSnapshot, Schema.Null]), ), - individualLimit: Schema.optionalKey( - Schema.Union([V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot, Schema.Null]), - ), limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), planType: Schema.optionalKey( @@ -13265,21 +10963,9 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema. primary: Schema.optionalKey( Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitWindow, Schema.Null]), ), - rateLimitReachedType: Schema.optionalKey( - Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitReachedType, Schema.Null]), - ), secondary: Schema.optionalKey( Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitWindow, Schema.Null]), ), - spendControlReached: Schema.optionalKey( - Schema.Union([ - Schema.Boolean.annotate({ - description: - "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", - }), - Schema.Null, - ]), - ), }); export type V2AppListUpdatedNotification__AppMetadata = { @@ -13344,31 +11030,31 @@ export const V2AppsListResponse__AppMetadata = Schema.Struct({ versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2AppsReadResponse__ConnectorMetadata = { - readonly description?: string | null; - readonly iconUrl?: string | null; - readonly id: string; - readonly name: string; - readonly toolSummaries?: ReadonlyArray | null; -}; -export const V2AppsReadResponse__ConnectorMetadata = Schema.Struct({ - description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - iconUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.String, - name: Schema.String, - toolSummaries: Schema.optionalKey( - Schema.Union([Schema.Array(V2AppsReadResponse__AppToolSummary), Schema.Null]), - ), -}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." }); - export type V2CommandExecParams__SandboxPolicy = | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } + | { + readonly access?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly networkAccess?: boolean; + readonly type: "readOnly"; + } | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { readonly excludeSlashTmp?: boolean; readonly excludeTmpdirEnvVar?: boolean; readonly networkAccess?: boolean; + readonly readOnlyAccess?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; readonly type: "workspaceWrite"; readonly writableRoots?: ReadonlyArray; }; @@ -13380,6 +11066,29 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union( }), }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ + access: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), }).annotate({ title: "ReadOnlySandboxPolicy" }), @@ -13395,6 +11104,29 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union( excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + readOnlyAccess: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), writableRoots: Schema.optionalKey( Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), @@ -13418,8 +11150,7 @@ export const V2ConfigBatchWriteParams__ConfigEdit = Schema.Struct({ export type V2ConfigReadResponse__ConfigLayerSource = | { readonly domain: string; readonly key: string; readonly type: "mdm" } | { readonly file: string; readonly type: "system" } - | { readonly id: string; readonly name: string; readonly type: "enterpriseManaged" } - | { readonly file: string; readonly profile?: string | null; readonly type: "user" } + | { readonly file: string; readonly type: "user" } | { readonly dotCodexFolder: V2ConfigReadResponse__AbsolutePathBuf; readonly type: "project" } | { readonly type: "sessionFlags" } | { @@ -13447,33 +11178,11 @@ export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union( title: "SystemConfigLayerSource", description: "Managed config layer from a file (usually `managed_config.toml`).", }), - Schema.Struct({ - id: Schema.String.annotate({ description: "Stable identifier for the delivered layer." }), - name: Schema.String.annotate({ - description: - "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.", - }), - type: Schema.Literal("enterpriseManaged").annotate({ - title: "EnterpriseManagedConfigLayerSourceType", - }), - }).annotate({ - title: "EnterpriseManagedConfigLayerSource", - description: "Enterprise-managed config layer delivered by the cloud config bundle.", - }), Schema.Struct({ file: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), - profile: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("user").annotate({ title: "UserConfigLayerSourceType" }), }).annotate({ title: "UserConfigLayerSource", @@ -13513,25 +11222,6 @@ export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ConfigReadResponse__AppsDefaultConfig = { - readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null; - readonly default_tools_approval_mode?: V2ConfigReadResponse__AppToolApproval | null; - readonly destructive_enabled?: boolean; - readonly enabled?: boolean; - readonly open_world_enabled?: boolean; -}; -export const V2ConfigReadResponse__AppsDefaultConfig = Schema.Struct({ - approvals_reviewer: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__ApprovalsReviewer, Schema.Null]), - ), - default_tools_approval_mode: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__AppToolApproval, Schema.Null]), - ), - destructive_enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - open_world_enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), -}); - export type V2ConfigReadResponse__WebSearchToolConfig = { readonly allowed_domains?: ReadonlyArray | null; readonly context_size?: V2ConfigReadResponse__WebSearchContextSize | null; @@ -13547,26 +11237,29 @@ export const V2ConfigReadResponse__WebSearchToolConfig = Schema.Struct({ ), }); -export type V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = { - readonly hooks: ReadonlyArray; - readonly matcher?: string | null; +export type V2ConfigRequirementsReadResponse__ConfigRequirements = { + readonly allowedApprovalPolicies?: ReadonlyArray | null; + readonly allowedSandboxModes?: ReadonlyArray | null; + readonly allowedWebSearchModes?: ReadonlyArray | null; + readonly enforceResidency?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null; + readonly featureRequirements?: { readonly [x: string]: boolean } | null; }; -export const V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = Schema.Struct({ - hooks: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookHandler), - matcher: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2ConfigRequirementsReadResponse__NewThreadModelDefaults = { - readonly model?: string | null; - readonly modelReasoningEffort?: V2ConfigRequirementsReadResponse__ReasoningEffort | null; - readonly serviceTier?: string | null; -}; -export const V2ConfigRequirementsReadResponse__NewThreadModelDefaults = Schema.Struct({ - model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - modelReasoningEffort: Schema.optionalKey( - Schema.Union([V2ConfigRequirementsReadResponse__ReasoningEffort, Schema.Null]), +export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({ + allowedApprovalPolicies: Schema.optionalKey( + Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__AskForApproval), Schema.Null]), + ), + allowedSandboxModes: Schema.optionalKey( + Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__SandboxMode), Schema.Null]), + ), + allowedWebSearchModes: Schema.optionalKey( + Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__WebSearchMode), Schema.Null]), + ), + enforceResidency: Schema.optionalKey( + Schema.Union([V2ConfigRequirementsReadResponse__ResidencyRequirement, Schema.Null]), + ), + featureRequirements: Schema.optionalKey( + Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]), ), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ConfigWarningNotification__TextRange = { @@ -13581,8 +11274,7 @@ export const V2ConfigWarningNotification__TextRange = Schema.Struct({ export type V2ConfigWriteResponse__ConfigLayerSource = | { readonly domain: string; readonly key: string; readonly type: "mdm" } | { readonly file: string; readonly type: "system" } - | { readonly id: string; readonly name: string; readonly type: "enterpriseManaged" } - | { readonly file: string; readonly profile?: string | null; readonly type: "user" } + | { readonly file: string; readonly type: "user" } | { readonly dotCodexFolder: V2ConfigWriteResponse__AbsolutePathBuf; readonly type: "project" } | { readonly type: "sessionFlags" } | { @@ -13610,33 +11302,11 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union( title: "SystemConfigLayerSource", description: "Managed config layer from a file (usually `managed_config.toml`).", }), - Schema.Struct({ - id: Schema.String.annotate({ description: "Stable identifier for the delivered layer." }), - name: Schema.String.annotate({ - description: - "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.", - }), - type: Schema.Literal("enterpriseManaged").annotate({ - title: "EnterpriseManagedConfigLayerSourceType", - }), - }).annotate({ - title: "EnterpriseManagedConfigLayerSource", - description: "Enterprise-managed config layer delivered by the cloud config bundle.", - }), Schema.Struct({ file: Schema.String.annotate({ description: "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }), - profile: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("user").annotate({ title: "UserConfigLayerSourceType" }), }).annotate({ title: "UserConfigLayerSource", @@ -13678,10 +11348,8 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union( export type V2ErrorNotification__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -13701,10 +11369,8 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -13786,278 +11452,56 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union( "This translation layer make sure that we expose codex error code in camel case.\n\nWhen 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 V2ExternalAgentConfigDetectResponse__MigrationDetails = { - readonly commands?: ReadonlyArray; - readonly hooks?: ReadonlyArray; - readonly mcpServers?: ReadonlyArray; - readonly memory?: ReadonlyArray; - readonly plugins?: ReadonlyArray; - readonly sessions?: ReadonlyArray; - readonly skills?: ReadonlyArray; - readonly subagents?: ReadonlyArray; +export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem = { + readonly cwd?: string | null; + readonly description: string; + readonly itemType: V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType; }; -export const V2ExternalAgentConfigDetectResponse__MigrationDetails = Schema.Struct({ - commands: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__CommandMigration).annotate({ default: [] }), - ), - hooks: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__HookMigration).annotate({ default: [] }), - ), - mcpServers: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__McpServerMigration).annotate({ default: [] }), - ), - memory: Schema.optionalKey(Schema.Array(Schema.String)), - plugins: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__PluginsMigration).annotate({ default: [] }), - ), - sessions: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__SessionMigration).annotate({ default: [] }), - ), - skills: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__SkillMigration).annotate({ default: [] }), - ), - subagents: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigDetectResponse__SubagentMigration).annotate({ default: [] }), - ), -}); - -export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeFailure = - { - readonly cwd?: string | null; - readonly errorType?: string | null; - readonly failureStage: string; - readonly itemType: V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType; - readonly message: string; - readonly source?: string | null; - readonly subErrorType?: string | null; - }; -export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeFailure = - Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - failureStage: Schema.String, - itemType: - V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType, - message: Schema.String, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }); - -export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess = - { - readonly cwd?: string | null; - readonly itemType: V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType; - readonly source?: string | null; - readonly target?: string | null; - }; -export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess = - Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - itemType: - V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }); - -export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure = - { - readonly cwd?: string | null; - readonly errorType?: string | null; - readonly failureStage: string; - readonly itemType: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType; - readonly message: string; - readonly source?: string | null; - readonly subErrorType?: string | null; - }; -export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure = - Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - failureStage: Schema.String, - itemType: - V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType, - message: Schema.String, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }); - -export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess = - { - readonly cwd?: string | null; - readonly itemType: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType; - readonly source?: string | null; - readonly target?: string | null; - }; -export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess = - Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - itemType: - V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }); - -export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate = - { - readonly name: string; - readonly sessionCount: number; - readonly source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource; - }; -export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate = - Schema.Struct({ - name: Schema.String, - sessionCount: Schema.Number.annotate({ format: "uint32" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource, - }); - -export type V2ExternalAgentConfigImportParams__MigrationDetails = { - readonly commands?: ReadonlyArray; - readonly hooks?: ReadonlyArray; - readonly mcpServers?: ReadonlyArray; - readonly memory?: ReadonlyArray; - readonly plugins?: ReadonlyArray; - readonly sessions?: ReadonlyArray; - readonly skills?: ReadonlyArray; - readonly subagents?: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportParams__MigrationDetails = Schema.Struct({ - commands: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__CommandMigration).annotate({ default: [] }), - ), - hooks: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__HookMigration).annotate({ default: [] }), - ), - mcpServers: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__McpServerMigration).annotate({ default: [] }), - ), - memory: Schema.optionalKey(Schema.Array(Schema.String)), - plugins: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__PluginsMigration).annotate({ default: [] }), - ), - sessions: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__SessionMigration).annotate({ default: [] }), - ), - skills: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__SkillMigration).annotate({ default: [] }), - ), - subagents: Schema.optionalKey( - Schema.Array(V2ExternalAgentConfigImportParams__SubagentMigration).annotate({ default: [] }), - ), -}); - -export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure = - { - readonly cwd?: string | null; - readonly errorType?: string | null; - readonly failureStage: string; - readonly itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType; - readonly message: string; - readonly source?: string | null; - readonly subErrorType?: string | null; - }; -export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure = - Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - failureStage: Schema.String, - itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType, - message: Schema.String, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }); - -export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess = - { - readonly cwd?: string | null; - readonly itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType; - readonly source?: string | null; - readonly target?: string | null; - }; -export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess = - Schema.Struct({ - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType, - source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - }); - -export type V2FileChangePatchUpdatedNotification__FileUpdateChange = { - readonly diff: string; - readonly kind: V2FileChangePatchUpdatedNotification__PatchChangeKind; - readonly path: string; -}; -export const V2FileChangePatchUpdatedNotification__FileUpdateChange = Schema.Struct({ - diff: Schema.String, - kind: V2FileChangePatchUpdatedNotification__PatchChangeKind, - path: Schema.String, -}); - -export type V2GetAccountRateLimitsResponse__RateLimitResetCredit = { - readonly description?: string | null; - readonly expiresAt?: number | null; - readonly grantedAt: number; - readonly id: string; - readonly resetType: V2GetAccountRateLimitsResponse__RateLimitResetType; - readonly status: V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus; - readonly title?: string | null; -}; -export const V2GetAccountRateLimitsResponse__RateLimitResetCredit = Schema.Struct({ - description: Schema.optionalKey( +export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem = Schema.Struct({ + cwd: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: - "Backend-provided display description for this credit, or `null` when unavailable.", + "Null or empty means home-scoped migration; non-empty means repo-scoped migration.", }), Schema.Null, ]), ), - expiresAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: - "Unix timestamp in seconds when the credit expires, or `null` if it does not expire.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - grantedAt: Schema.Number.annotate({ - description: "Unix timestamp in seconds when the credit was granted.", - format: "int64", - }).check(Schema.isInt()), - id: Schema.String.annotate({ description: "Opaque backend identifier for this reset credit." }), - resetType: V2GetAccountRateLimitsResponse__RateLimitResetType, - status: V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus, - title: Schema.optionalKey( + description: Schema.String, + itemType: V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType, +}); + +export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem = { + readonly cwd?: string | null; + readonly description: string; + readonly itemType: V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType; +}; +export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem = Schema.Struct({ + cwd: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ - description: "Backend-provided display title for this credit, or `null` when unavailable.", + description: + "Null or empty means home-scoped migration; non-empty means repo-scoped migration.", }), Schema.Null, ]), ), + description: Schema.String, + itemType: V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType, }); export type V2GetAccountRateLimitsResponse__RateLimitSnapshot = { readonly credits?: V2GetAccountRateLimitsResponse__CreditsSnapshot | null; - readonly individualLimit?: V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot | null; readonly limitId?: string | null; readonly limitName?: string | null; readonly planType?: V2GetAccountRateLimitsResponse__PlanType | null; readonly primary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; - readonly rateLimitReachedType?: V2GetAccountRateLimitsResponse__RateLimitReachedType | null; readonly secondary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; - readonly spendControlReached?: boolean | null; }; export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({ credits: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__CreditsSnapshot, Schema.Null]), ), - individualLimit: Schema.optionalKey( - Schema.Union([V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot, Schema.Null]), - ), limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), planType: Schema.optionalKey( @@ -14066,80 +11510,32 @@ export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({ primary: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]), ), - rateLimitReachedType: Schema.optionalKey( - Schema.Union([V2GetAccountRateLimitsResponse__RateLimitReachedType, Schema.Null]), - ), secondary: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]), ), - spendControlReached: Schema.optionalKey( - Schema.Union([ - Schema.Boolean.annotate({ - description: - "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", - }), - Schema.Null, - ]), - ), }); export type V2GetAccountResponse__Account = | { readonly type: "apiKey" } | { - readonly email: string | null; + readonly email: string; readonly planType: V2GetAccountResponse__PlanType; readonly type: "chatgpt"; - } - | { readonly type: "amazonBedrock"; readonly usesCodexManagedCredentials?: boolean }; + }; export const V2GetAccountResponse__Account = Schema.Union( [ Schema.Struct({ type: Schema.Literal("apiKey").annotate({ title: "ApiKeyAccountType" }), }).annotate({ title: "ApiKeyAccount" }), Schema.Struct({ - email: Schema.Union([Schema.String, Schema.Null]), + email: Schema.String, planType: V2GetAccountResponse__PlanType, type: Schema.Literal("chatgpt").annotate({ title: "ChatgptAccountType" }), }).annotate({ title: "ChatgptAccount" }), - Schema.Struct({ - type: Schema.Literal("amazonBedrock").annotate({ title: "AmazonBedrockAccountType" }), - usesCodexManagedCredentials: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - }).annotate({ title: "AmazonBedrockAccount" }), ], { mode: "oneOf" }, ); -export type V2GetWorkspaceMessagesResponse__WorkspaceMessage = { - readonly archivedAt?: number | null; - readonly createdAt?: number | null; - readonly messageBody: string; - readonly messageId: string; - readonly messageType: V2GetWorkspaceMessagesResponse__WorkspaceMessageType; -}; -export const V2GetWorkspaceMessagesResponse__WorkspaceMessage = Schema.Struct({ - archivedAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) when the message was archived.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - createdAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) when the message was created.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - messageBody: Schema.String, - messageId: Schema.String, - messageType: V2GetWorkspaceMessagesResponse__WorkspaceMessageType, -}); - export type V2HookCompletedNotification__HookOutputEntry = { readonly kind: V2HookCompletedNotification__HookOutputEntryKind; readonly text: string; @@ -14149,43 +11545,6 @@ export const V2HookCompletedNotification__HookOutputEntry = Schema.Struct({ text: Schema.String, }); -export type V2HooksListResponse__HookMetadata = { - readonly command?: string | null; - readonly currentHash: string; - readonly displayOrder: number; - readonly enabled: boolean; - readonly eventName: V2HooksListResponse__HookEventName; - readonly handlerType: V2HooksListResponse__HookHandlerType; - readonly isManaged: boolean; - readonly key: string; - readonly matcher?: string | null; - readonly pluginId?: string | null; - readonly source: V2HooksListResponse__HookSource; - readonly sourcePath: V2HooksListResponse__AbsolutePathBuf; - readonly statusMessage?: string | null; - readonly timeoutSec: number; - readonly trustStatus: V2HooksListResponse__HookTrustStatus; -}; -export const V2HooksListResponse__HookMetadata = Schema.Struct({ - command: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - currentHash: Schema.String, - displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - enabled: Schema.Boolean, - eventName: V2HooksListResponse__HookEventName, - handlerType: V2HooksListResponse__HookHandlerType, - isManaged: Schema.Boolean, - key: Schema.String, - matcher: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - source: V2HooksListResponse__HookSource, - sourcePath: V2HooksListResponse__AbsolutePathBuf, - statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - timeoutSec: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - trustStatus: V2HooksListResponse__HookTrustStatus, -}); - export type V2HookStartedNotification__HookOutputEntry = { readonly kind: V2HookStartedNotification__HookOutputEntryKind; readonly text: string; @@ -14195,48 +11554,6 @@ export const V2HookStartedNotification__HookOutputEntry = Schema.Struct({ text: Schema.String, }); -export type V2ItemCompletedNotification__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ItemCompletedNotification__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ItemCompletedNotification__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ItemCompletedNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ItemCompletedNotification__CollabAgentState = { readonly message?: string | null; readonly status: V2ItemCompletedNotification__CollabAgentStatus; @@ -14272,18 +11589,8 @@ export type V2ItemCompletedNotification__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ItemCompletedNotification__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ItemCompletedNotification__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ItemCompletedNotification__UserInput = Schema.Union( @@ -14299,27 +11606,13 @@ export const V2ItemCompletedNotification__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -14358,57 +11651,87 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApproval ), }).annotate({ description: - "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", }); -export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } +export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction = | { - readonly kind: "project_roots"; - readonly subpath?: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString | null; + readonly command: string; + readonly cwd: string; + readonly source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource; + readonly type: "command"; } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString | null; + readonly argv: ReadonlyArray; + readonly cwd: string; + readonly program: string; + readonly source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource; + readonly type: "execve"; + } + | { readonly cwd: string; readonly files: ReadonlyArray; readonly type: "applyPatch" } + | { + readonly host: string; + readonly port: number; + readonly protocol: V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol; + readonly target: string; + readonly type: "networkAccess"; + } + | { + readonly connectorId?: string | null; + readonly connectorName?: string | null; + readonly server: string; + readonly toolName: string; + readonly toolTitle?: string | null; + readonly type: "mcpToolCall"; }; -export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath = +export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction = Schema.Union( [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - Schema.Null, - ]), - ), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), + command: Schema.String, + cwd: Schema.String, + source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource, + type: Schema.Literal("command").annotate({ + title: "CommandGuardianApprovalReviewActionType", + }), + }).annotate({ title: "CommandGuardianApprovalReviewAction" }), Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - Schema.Null, - ]), - ), - }), + argv: Schema.Array(Schema.String), + cwd: Schema.String, + program: Schema.String, + source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource, + type: Schema.Literal("execve").annotate({ + title: "ExecveGuardianApprovalReviewActionType", + }), + }).annotate({ title: "ExecveGuardianApprovalReviewAction" }), + Schema.Struct({ + cwd: Schema.String, + files: Schema.Array(Schema.String), + type: Schema.Literal("applyPatch").annotate({ + title: "ApplyPatchGuardianApprovalReviewActionType", + }), + }).annotate({ title: "ApplyPatchGuardianApprovalReviewAction" }), + Schema.Struct({ + host: Schema.String, + port: Schema.Number.annotate({ format: "uint16" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + protocol: V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol, + target: Schema.String, + type: Schema.Literal("networkAccess").annotate({ + title: "NetworkAccessGuardianApprovalReviewActionType", + }), + }).annotate({ title: "NetworkAccessGuardianApprovalReviewAction" }), + Schema.Struct({ + connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + connectorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + server: Schema.String, + toolName: Schema.String, + toolTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("mcpToolCall").annotate({ + title: "McpToolCallGuardianApprovalReviewActionType", + }), + }).annotate({ title: "McpToolCallGuardianApprovalReviewAction" }), ], { mode: "oneOf" }, ); @@ -14437,101 +11760,90 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRe ), }).annotate({ description: - "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "[UNSTABLE] Temporary guardian approval review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", }); -export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = - | { readonly kind: "root" } - | { readonly kind: "minimal" } +export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction = | { - readonly kind: "project_roots"; - readonly subpath?: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString | null; + readonly command: string; + readonly cwd: string; + readonly source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource; + readonly type: "command"; } - | { readonly kind: "tmpdir" } - | { readonly kind: "slash_tmp" } | { - readonly kind: "unknown"; - readonly path: string; - readonly subpath?: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString | null; + readonly argv: ReadonlyArray; + readonly cwd: string; + readonly program: string; + readonly source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource; + readonly type: "execve"; + } + | { readonly cwd: string; readonly files: ReadonlyArray; readonly type: "applyPatch" } + | { + readonly host: string; + readonly port: number; + readonly protocol: V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol; + readonly target: string; + readonly type: "networkAccess"; + } + | { + readonly connectorId?: string | null; + readonly connectorName?: string | null; + readonly server: string; + readonly toolName: string; + readonly toolTitle?: string | null; + readonly type: "mcpToolCall"; }; -export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, - Schema.Null, - ]), - ), - }).annotate({ title: "KindFileSystemSpecialPath" }), - Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ - title: "TmpdirFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ - title: "SlashTmpFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("unknown"), - path: Schema.String, - subpath: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, - Schema.Null, - ]), - ), - }), - ], - { mode: "oneOf" }, -); - -export type V2ItemStartedNotification__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ItemStartedNotification__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ItemStartedNotification__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ItemStartedNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); +export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction = + Schema.Union( + [ + Schema.Struct({ + command: Schema.String, + cwd: Schema.String, + source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource, + type: Schema.Literal("command").annotate({ + title: "CommandGuardianApprovalReviewActionType", + }), + }).annotate({ title: "CommandGuardianApprovalReviewAction" }), + Schema.Struct({ + argv: Schema.Array(Schema.String), + cwd: Schema.String, + program: Schema.String, + source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource, + type: Schema.Literal("execve").annotate({ + title: "ExecveGuardianApprovalReviewActionType", + }), + }).annotate({ title: "ExecveGuardianApprovalReviewAction" }), + Schema.Struct({ + cwd: Schema.String, + files: Schema.Array(Schema.String), + type: Schema.Literal("applyPatch").annotate({ + title: "ApplyPatchGuardianApprovalReviewActionType", + }), + }).annotate({ title: "ApplyPatchGuardianApprovalReviewAction" }), + Schema.Struct({ + host: Schema.String, + port: Schema.Number.annotate({ format: "uint16" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + protocol: V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol, + target: Schema.String, + type: Schema.Literal("networkAccess").annotate({ + title: "NetworkAccessGuardianApprovalReviewActionType", + }), + }).annotate({ title: "NetworkAccessGuardianApprovalReviewAction" }), + Schema.Struct({ + connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + connectorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + server: Schema.String, + toolName: Schema.String, + toolTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("mcpToolCall").annotate({ + title: "McpToolCallGuardianApprovalReviewActionType", + }), + }).annotate({ title: "McpToolCallGuardianApprovalReviewAction" }), + ], + { mode: "oneOf" }, + ); export type V2ItemStartedNotification__CollabAgentState = { readonly message?: string | null; @@ -14568,18 +11880,8 @@ export type V2ItemStartedNotification__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ItemStartedNotification__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ItemStartedNotification__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ItemStartedNotification__UserInput = Schema.Union( @@ -14595,27 +11897,13 @@ export const V2ItemStartedNotification__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -14635,7 +11923,6 @@ export type V2ListMcpServerStatusResponse__McpServerStatus = { readonly name: string; readonly resourceTemplates: ReadonlyArray; readonly resources: ReadonlyArray; - readonly serverInfo?: V2ListMcpServerStatusResponse__McpServerInfo | null; readonly tools: { readonly [x: string]: V2ListMcpServerStatusResponse__Tool }; }; export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({ @@ -14643,9 +11930,6 @@ export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({ name: Schema.String, resourceTemplates: Schema.Array(V2ListMcpServerStatusResponse__ResourceTemplate), resources: Schema.Array(V2ListMcpServerStatusResponse__Resource), - serverInfo: Schema.optionalKey( - Schema.Union([V2ListMcpServerStatusResponse__McpServerInfo, Schema.Null]), - ), tools: Schema.Record(Schema.String, V2ListMcpServerStatusResponse__Tool), }); @@ -14658,169 +11942,6 @@ export const V2ModelListResponse__ReasoningEffortOption = Schema.Struct({ reasoningEffort: V2ModelListResponse__ReasoningEffort, }); -export type V2PluginInstalledResponse__MarketplaceLoadErrorInfo = { - readonly marketplacePath: V2PluginInstalledResponse__AbsolutePathBuf; - readonly message: string; -}; -export const V2PluginInstalledResponse__MarketplaceLoadErrorInfo = Schema.Struct({ - marketplacePath: V2PluginInstalledResponse__AbsolutePathBuf, - message: Schema.String, -}); - -export type V2PluginInstalledResponse__PluginInterface = { - readonly brandColor?: string | null; - readonly capabilities: ReadonlyArray; - readonly category?: string | null; - readonly composerIcon?: V2PluginInstalledResponse__AbsolutePathBuf | null; - readonly composerIconUrl?: string | null; - readonly defaultPrompt?: ReadonlyArray | null; - readonly developerName?: string | null; - readonly displayName?: string | null; - readonly logo?: V2PluginInstalledResponse__AbsolutePathBuf | null; - readonly logoDark?: V2PluginInstalledResponse__AbsolutePathBuf | null; - readonly logoUrl?: string | null; - readonly logoUrlDark?: string | null; - readonly longDescription?: string | null; - readonly privacyPolicyUrl?: string | null; - readonly screenshotUrls: ReadonlyArray; - readonly screenshots: ReadonlyArray; - readonly shortDescription?: string | null; - readonly termsOfServiceUrl?: string | null; - readonly websiteUrl?: string | null; -}; -export const V2PluginInstalledResponse__PluginInterface = Schema.Struct({ - brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - capabilities: Schema.Array(Schema.String), - category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - composerIcon: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local composer icon path, resolved from the installed plugin package.", - }), - ), - composerIconUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote composer icon URL from the plugin catalog." }), - Schema.Null, - ]), - ), - defaultPrompt: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.String).annotate({ - description: - "Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.", - }), - Schema.Null, - ]), - ), - developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - logo: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local logo path, resolved from the installed plugin package.", - }), - ), - logoDark: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local dark-mode logo path, resolved from the installed plugin package.", - }), - ), - logoUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), - logoUrlDark: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote dark-mode logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), - longDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - privacyPolicyUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - screenshotUrls: Schema.Array(Schema.String).annotate({ - description: "Remote screenshot URLs from the plugin catalog.", - }), - screenshots: Schema.Array(V2PluginInstalledResponse__AbsolutePathBuf).annotate({ - description: "Local screenshot paths, resolved from the installed plugin package.", - }), - shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2PluginInstalledResponse__PluginSource = - | { readonly path: V2PluginInstalledResponse__AbsolutePathBuf; readonly type: "local" } - | { - readonly path?: string | null; - readonly refName?: string | null; - readonly sha?: string | null; - readonly type: "git"; - readonly url: string; - } - | { - readonly package: string; - readonly registry?: string | null; - readonly type: "npm"; - readonly version?: string | null; - } - | { readonly type: "remote" }; -export const V2PluginInstalledResponse__PluginSource = Schema.Union( - [ - Schema.Struct({ - path: V2PluginInstalledResponse__AbsolutePathBuf, - type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }), - }).annotate({ title: "LocalPluginSource" }), - Schema.Struct({ - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("git").annotate({ title: "GitPluginSourceType" }), - url: Schema.String, - }).annotate({ title: "GitPluginSource" }), - Schema.Struct({ - package: Schema.String, - registry: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional HTTPS registry URL. Authentication stays in the user's npm config.", - }), - Schema.Null, - ]), - ), - type: Schema.Literal("npm").annotate({ title: "NpmPluginSourceType" }), - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Optional npm version or version range." }), - Schema.Null, - ]), - ), - }).annotate({ title: "NpmPluginSource" }), - Schema.Struct({ - type: Schema.Literal("remote").annotate({ title: "RemotePluginSourceType" }), - }).annotate({ - title: "RemotePluginSource", - description: - "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.", - }), - ], - { mode: "oneOf" }, -); - -export type V2PluginInstalledResponse__PluginSharePrincipal = { - readonly name: string; - readonly principalId: string; - readonly principalType: V2PluginInstalledResponse__PluginSharePrincipalType; - readonly role: V2PluginInstalledResponse__PluginSharePrincipalRole; -}; -export const V2PluginInstalledResponse__PluginSharePrincipal = Schema.Struct({ - name: Schema.String, - principalId: Schema.String, - principalType: V2PluginInstalledResponse__PluginSharePrincipalType, - role: V2PluginInstalledResponse__PluginSharePrincipalRole, -}); - export type V2PluginListResponse__MarketplaceLoadErrorInfo = { readonly marketplacePath: V2PluginListResponse__AbsolutePathBuf; readonly message: string; @@ -14835,17 +11956,12 @@ export type V2PluginListResponse__PluginInterface = { readonly capabilities: ReadonlyArray; readonly category?: string | null; readonly composerIcon?: V2PluginListResponse__AbsolutePathBuf | null; - readonly composerIconUrl?: string | null; readonly defaultPrompt?: ReadonlyArray | null; readonly developerName?: string | null; readonly displayName?: string | null; readonly logo?: V2PluginListResponse__AbsolutePathBuf | null; - readonly logoDark?: V2PluginListResponse__AbsolutePathBuf | null; - readonly logoUrl?: string | null; - readonly logoUrlDark?: string | null; readonly longDescription?: string | null; readonly privacyPolicyUrl?: string | null; - readonly screenshotUrls: ReadonlyArray; readonly screenshots: ReadonlyArray; readonly shortDescription?: string | null; readonly termsOfServiceUrl?: string | null; @@ -14856,15 +11972,7 @@ export const V2PluginListResponse__PluginInterface = Schema.Struct({ capabilities: Schema.Array(Schema.String), category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), composerIcon: Schema.optionalKey( - Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local composer icon path, resolved from the installed plugin package.", - }), - ), - composerIconUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote composer icon URL from the plugin catalog." }), - Schema.Null, - ]), + Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]), ), defaultPrompt: Schema.optionalKey( Schema.Union([ @@ -14877,129 +11985,40 @@ export const V2PluginListResponse__PluginInterface = Schema.Struct({ ), developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - logo: Schema.optionalKey( - Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local logo path, resolved from the installed plugin package.", - }), - ), - logoDark: Schema.optionalKey( - Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local dark-mode logo path, resolved from the installed plugin package.", - }), - ), - logoUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), - logoUrlDark: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote dark-mode logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), + logo: Schema.optionalKey(Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null])), longDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), privacyPolicyUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - screenshotUrls: Schema.Array(Schema.String).annotate({ - description: "Remote screenshot URLs from the plugin catalog.", - }), - screenshots: Schema.Array(V2PluginListResponse__AbsolutePathBuf).annotate({ - description: "Local screenshot paths, resolved from the installed plugin package.", - }), + screenshots: Schema.Array(V2PluginListResponse__AbsolutePathBuf), shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2PluginListResponse__PluginSource = - | { readonly path: V2PluginListResponse__AbsolutePathBuf; readonly type: "local" } - | { - readonly path?: string | null; - readonly refName?: string | null; - readonly sha?: string | null; - readonly type: "git"; - readonly url: string; - } - | { - readonly package: string; - readonly registry?: string | null; - readonly type: "npm"; - readonly version?: string | null; - } - | { readonly type: "remote" }; +export type V2PluginListResponse__PluginSource = { + readonly path: V2PluginListResponse__AbsolutePathBuf; + readonly type: "local"; +}; export const V2PluginListResponse__PluginSource = Schema.Union( [ Schema.Struct({ path: V2PluginListResponse__AbsolutePathBuf, type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }), }).annotate({ title: "LocalPluginSource" }), - Schema.Struct({ - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("git").annotate({ title: "GitPluginSourceType" }), - url: Schema.String, - }).annotate({ title: "GitPluginSource" }), - Schema.Struct({ - package: Schema.String, - registry: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional HTTPS registry URL. Authentication stays in the user's npm config.", - }), - Schema.Null, - ]), - ), - type: Schema.Literal("npm").annotate({ title: "NpmPluginSourceType" }), - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Optional npm version or version range." }), - Schema.Null, - ]), - ), - }).annotate({ title: "NpmPluginSource" }), - Schema.Struct({ - type: Schema.Literal("remote").annotate({ title: "RemotePluginSourceType" }), - }).annotate({ - title: "RemotePluginSource", - description: - "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.", - }), ], { mode: "oneOf" }, ); -export type V2PluginListResponse__PluginSharePrincipal = { - readonly name: string; - readonly principalId: string; - readonly principalType: V2PluginListResponse__PluginSharePrincipalType; - readonly role: V2PluginListResponse__PluginSharePrincipalRole; -}; -export const V2PluginListResponse__PluginSharePrincipal = Schema.Struct({ - name: Schema.String, - principalId: Schema.String, - principalType: V2PluginListResponse__PluginSharePrincipalType, - role: V2PluginListResponse__PluginSharePrincipalRole, -}); - export type V2PluginReadResponse__PluginInterface = { readonly brandColor?: string | null; readonly capabilities: ReadonlyArray; readonly category?: string | null; readonly composerIcon?: V2PluginReadResponse__AbsolutePathBuf | null; - readonly composerIconUrl?: string | null; readonly defaultPrompt?: ReadonlyArray | null; readonly developerName?: string | null; readonly displayName?: string | null; readonly logo?: V2PluginReadResponse__AbsolutePathBuf | null; - readonly logoDark?: V2PluginReadResponse__AbsolutePathBuf | null; - readonly logoUrl?: string | null; - readonly logoUrlDark?: string | null; readonly longDescription?: string | null; readonly privacyPolicyUrl?: string | null; - readonly screenshotUrls: ReadonlyArray; readonly screenshots: ReadonlyArray; readonly shortDescription?: string | null; readonly termsOfServiceUrl?: string | null; @@ -15010,15 +12029,7 @@ export const V2PluginReadResponse__PluginInterface = Schema.Struct({ capabilities: Schema.Array(Schema.String), category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), composerIcon: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local composer icon path, resolved from the installed plugin package.", - }), - ), - composerIconUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote composer icon URL from the plugin catalog." }), - Schema.Null, - ]), + Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]), ), defaultPrompt: Schema.optionalKey( Schema.Union([ @@ -15031,437 +12042,53 @@ export const V2PluginReadResponse__PluginInterface = Schema.Struct({ ), developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - logo: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local logo path, resolved from the installed plugin package.", - }), - ), - logoDark: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local dark-mode logo path, resolved from the installed plugin package.", - }), - ), - logoUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), - logoUrlDark: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote dark-mode logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), + logo: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])), longDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), privacyPolicyUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - screenshotUrls: Schema.Array(Schema.String).annotate({ - description: "Remote screenshot URLs from the plugin catalog.", - }), - screenshots: Schema.Array(V2PluginReadResponse__AbsolutePathBuf).annotate({ - description: "Local screenshot paths, resolved from the installed plugin package.", - }), + screenshots: Schema.Array(V2PluginReadResponse__AbsolutePathBuf), shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2PluginReadResponse__PluginSource = - | { readonly path: V2PluginReadResponse__AbsolutePathBuf; readonly type: "local" } - | { - readonly path?: string | null; - readonly refName?: string | null; - readonly sha?: string | null; - readonly type: "git"; - readonly url: string; - } - | { - readonly package: string; - readonly registry?: string | null; - readonly type: "npm"; - readonly version?: string | null; - } - | { readonly type: "remote" }; +export type V2PluginReadResponse__PluginSource = { + readonly path: V2PluginReadResponse__AbsolutePathBuf; + readonly type: "local"; +}; export const V2PluginReadResponse__PluginSource = Schema.Union( [ Schema.Struct({ path: V2PluginReadResponse__AbsolutePathBuf, type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }), }).annotate({ title: "LocalPluginSource" }), - Schema.Struct({ - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("git").annotate({ title: "GitPluginSourceType" }), - url: Schema.String, - }).annotate({ title: "GitPluginSource" }), - Schema.Struct({ - package: Schema.String, - registry: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional HTTPS registry URL. Authentication stays in the user's npm config.", - }), - Schema.Null, - ]), - ), - type: Schema.Literal("npm").annotate({ title: "NpmPluginSourceType" }), - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Optional npm version or version range." }), - Schema.Null, - ]), - ), - }).annotate({ title: "NpmPluginSource" }), - Schema.Struct({ - type: Schema.Literal("remote").annotate({ title: "RemotePluginSourceType" }), - }).annotate({ - title: "RemotePluginSource", - description: - "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.", - }), ], { mode: "oneOf" }, ); -export type V2PluginReadResponse__SkillInterface = { - readonly brandColor?: string | null; - readonly defaultPrompt?: string | null; - readonly displayName?: string | null; - readonly iconLarge?: V2PluginReadResponse__AbsolutePathBuf | null; - readonly iconSmall?: V2PluginReadResponse__AbsolutePathBuf | null; +export type V2PluginReadResponse__SkillSummary = { + readonly description: string; + readonly enabled: boolean; + readonly interface?: V2PluginReadResponse__SkillInterface | null; + readonly name: string; + readonly path: string; readonly shortDescription?: string | null; }; -export const V2PluginReadResponse__SkillInterface = Schema.Struct({ - brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - iconLarge: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])), - iconSmall: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])), +export const V2PluginReadResponse__SkillSummary = Schema.Struct({ + description: Schema.String, + enabled: Schema.Boolean, + interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__SkillInterface, Schema.Null])), + name: Schema.String, + path: Schema.String, shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2PluginReadResponse__AppTemplateSummary = { - readonly canonicalConnectorId?: string | null; - readonly category?: string | null; - readonly description?: string | null; - readonly logoUrl?: string | null; - readonly logoUrlDark?: string | null; - readonly materializedAppIds: ReadonlyArray; - readonly name: string; - readonly reason?: V2PluginReadResponse__AppTemplateUnavailableReason | null; - readonly templateId: string; -}; -export const V2PluginReadResponse__AppTemplateSummary = Schema.Struct({ - canonicalConnectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - logoUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - materializedAppIds: Schema.Array(Schema.String), - name: Schema.String, - reason: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__AppTemplateUnavailableReason, Schema.Null]), - ), - templateId: Schema.String, -}); - -export type V2PluginReadResponse__PluginHookSummary = { - readonly eventName: V2PluginReadResponse__HookEventName; - readonly key: string; -}; -export const V2PluginReadResponse__PluginHookSummary = Schema.Struct({ - eventName: V2PluginReadResponse__HookEventName, - key: Schema.String, -}); - -export type V2PluginReadResponse__PluginSharePrincipal = { - readonly name: string; - readonly principalId: string; - readonly principalType: V2PluginReadResponse__PluginSharePrincipalType; - readonly role: V2PluginReadResponse__PluginSharePrincipalRole; -}; -export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({ - name: Schema.String, - principalId: Schema.String, - principalType: V2PluginReadResponse__PluginSharePrincipalType, - role: V2PluginReadResponse__PluginSharePrincipalRole, -}); - -export type V2PluginReadResponse__ScheduledTaskSchedule = - | { - readonly days?: ReadonlyArray | null; - readonly intervalHours: number; - readonly type: "hourly"; - } - | { readonly time: string; readonly type: "daily" } - | { readonly time: string; readonly type: "weekdays" } - | { - readonly days: ReadonlyArray; - readonly time: string; - readonly type: "weekly"; - }; -export const V2PluginReadResponse__ScheduledTaskSchedule = Schema.Union( - [ - Schema.Struct({ - days: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskWeekday), Schema.Null]), - ), - intervalHours: Schema.Number.annotate({ format: "uint32" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - type: Schema.Literal("hourly").annotate({ title: "HourlyScheduledTaskScheduleType" }), - }).annotate({ title: "HourlyScheduledTaskSchedule" }), - Schema.Struct({ - time: Schema.String, - type: Schema.Literal("daily").annotate({ title: "DailyScheduledTaskScheduleType" }), - }).annotate({ title: "DailyScheduledTaskSchedule" }), - Schema.Struct({ - time: Schema.String, - type: Schema.Literal("weekdays").annotate({ title: "WeekdaysScheduledTaskScheduleType" }), - }).annotate({ title: "WeekdaysScheduledTaskSchedule" }), - Schema.Struct({ - days: Schema.Array(V2PluginReadResponse__ScheduledTaskWeekday), - time: Schema.String, - type: Schema.Literal("weekly").annotate({ title: "WeeklyScheduledTaskScheduleType" }), - }).annotate({ title: "WeeklyScheduledTaskSchedule" }), - ], - { mode: "oneOf" }, -); - -export type V2PluginShareListResponse__PluginInterface = { - readonly brandColor?: string | null; - readonly capabilities: ReadonlyArray; - readonly category?: string | null; - readonly composerIcon?: V2PluginShareListResponse__AbsolutePathBuf | null; - readonly composerIconUrl?: string | null; - readonly defaultPrompt?: ReadonlyArray | null; - readonly developerName?: string | null; - readonly displayName?: string | null; - readonly logo?: V2PluginShareListResponse__AbsolutePathBuf | null; - readonly logoDark?: V2PluginShareListResponse__AbsolutePathBuf | null; - readonly logoUrl?: string | null; - readonly logoUrlDark?: string | null; - readonly longDescription?: string | null; - readonly privacyPolicyUrl?: string | null; - readonly screenshotUrls: ReadonlyArray; - readonly screenshots: ReadonlyArray; - readonly shortDescription?: string | null; - readonly termsOfServiceUrl?: string | null; - readonly websiteUrl?: string | null; -}; -export const V2PluginShareListResponse__PluginInterface = Schema.Struct({ - brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - capabilities: Schema.Array(Schema.String), - category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - composerIcon: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local composer icon path, resolved from the installed plugin package.", - }), - ), - composerIconUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote composer icon URL from the plugin catalog." }), - Schema.Null, - ]), - ), - defaultPrompt: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.String).annotate({ - description: - "Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.", - }), - Schema.Null, - ]), - ), - developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - logo: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local logo path, resolved from the installed plugin package.", - }), - ), - logoDark: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: "Local dark-mode logo path, resolved from the installed plugin package.", - }), - ), - logoUrl: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), - logoUrlDark: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Remote dark-mode logo URL from the plugin catalog." }), - Schema.Null, - ]), - ), - longDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - privacyPolicyUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - screenshotUrls: Schema.Array(Schema.String).annotate({ - description: "Remote screenshot URLs from the plugin catalog.", - }), - screenshots: Schema.Array(V2PluginShareListResponse__AbsolutePathBuf).annotate({ - description: "Local screenshot paths, resolved from the installed plugin package.", - }), - shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2PluginShareListResponse__PluginSource = - | { readonly path: V2PluginShareListResponse__AbsolutePathBuf; readonly type: "local" } - | { - readonly path?: string | null; - readonly refName?: string | null; - readonly sha?: string | null; - readonly type: "git"; - readonly url: string; - } - | { - readonly package: string; - readonly registry?: string | null; - readonly type: "npm"; - readonly version?: string | null; - } - | { readonly type: "remote" }; -export const V2PluginShareListResponse__PluginSource = Schema.Union( - [ - Schema.Struct({ - path: V2PluginShareListResponse__AbsolutePathBuf, - type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }), - }).annotate({ title: "LocalPluginSource" }), - Schema.Struct({ - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("git").annotate({ title: "GitPluginSourceType" }), - url: Schema.String, - }).annotate({ title: "GitPluginSource" }), - Schema.Struct({ - package: Schema.String, - registry: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional HTTPS registry URL. Authentication stays in the user's npm config.", - }), - Schema.Null, - ]), - ), - type: Schema.Literal("npm").annotate({ title: "NpmPluginSourceType" }), - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Optional npm version or version range." }), - Schema.Null, - ]), - ), - }).annotate({ title: "NpmPluginSource" }), - Schema.Struct({ - type: Schema.Literal("remote").annotate({ title: "RemotePluginSourceType" }), - }).annotate({ - title: "RemotePluginSource", - description: - "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.", - }), - ], - { mode: "oneOf" }, -); - -export type V2PluginShareListResponse__PluginSharePrincipal = { - readonly name: string; - readonly principalId: string; - readonly principalType: V2PluginShareListResponse__PluginSharePrincipalType; - readonly role: V2PluginShareListResponse__PluginSharePrincipalRole; -}; -export const V2PluginShareListResponse__PluginSharePrincipal = Schema.Struct({ - name: Schema.String, - principalId: Schema.String, - principalType: V2PluginShareListResponse__PluginSharePrincipalType, - role: V2PluginShareListResponse__PluginSharePrincipalRole, -}); - -export type V2PluginShareSaveParams__PluginShareTarget = { - readonly principalId: string; - readonly principalType: V2PluginShareSaveParams__PluginSharePrincipalType; - readonly role: V2PluginShareSaveParams__PluginShareTargetRole; -}; -export const V2PluginShareSaveParams__PluginShareTarget = Schema.Struct({ - principalId: Schema.String, - principalType: V2PluginShareSaveParams__PluginSharePrincipalType, - role: V2PluginShareSaveParams__PluginShareTargetRole, -}); - -export type V2PluginShareUpdateTargetsParams__PluginShareTarget = { - readonly principalId: string; - readonly principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType; - readonly role: V2PluginShareUpdateTargetsParams__PluginShareTargetRole; -}; -export const V2PluginShareUpdateTargetsParams__PluginShareTarget = Schema.Struct({ - principalId: Schema.String, - principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType, - role: V2PluginShareUpdateTargetsParams__PluginShareTargetRole, -}); - -export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = { - readonly name: string; - readonly principalId: string; - readonly principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType; - readonly role: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole; -}; -export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = Schema.Struct({ - name: Schema.String, - principalId: Schema.String, - principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType, - role: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole, -}); - -export type V2RawResponseItemCompletedNotification__ContentItem = - | { readonly text: string; readonly type: "input_text" } - | { - readonly detail?: V2RawResponseItemCompletedNotification__ImageDetail | null; - readonly image_url: string; - readonly type: "input_image"; - } - | { readonly audio_url: string; readonly type: "input_audio" } - | { readonly text: string; readonly type: "output_text" }; -export const V2RawResponseItemCompletedNotification__ContentItem = Schema.Union( - [ - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }), - }).annotate({ title: "InputTextContentItem" }), - Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2RawResponseItemCompletedNotification__ImageDetail, Schema.Null]), - ), - image_url: Schema.String, - type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), - }).annotate({ title: "InputImageContentItem" }), - Schema.Struct({ - audio_url: Schema.String, - type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }), - }).annotate({ title: "InputAudioContentItem" }), - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), - }).annotate({ title: "OutputTextContentItem" }), - ], - { mode: "oneOf" }, -); - export type V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem = | { readonly text: string; readonly type: "input_text" } | { readonly detail?: V2RawResponseItemCompletedNotification__ImageDetail | null; readonly image_url: string; readonly type: "input_image"; - } - | { readonly audio_url: string; readonly type: "input_audio" } - | { readonly encrypted_content: string; readonly type: "encrypted_content" }; + }; export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -15479,18 +12106,6 @@ export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentIt title: "InputImageFunctionCallOutputContentItemType", }), }).annotate({ title: "InputImageFunctionCallOutputContentItem" }), - Schema.Struct({ - audio_url: Schema.String, - type: Schema.Literal("input_audio").annotate({ - title: "InputAudioFunctionCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }), - Schema.Struct({ - encrypted_content: Schema.String, - type: Schema.Literal("encrypted_content").annotate({ - title: "EncryptedContentFunctionCallOutputContentItemType", - }), - }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }), ], { mode: "oneOf" }, ).annotate({ @@ -15498,48 +12113,6 @@ export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentIt "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.", }); -export type V2ReviewStartResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ReviewStartResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ReviewStartResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ReviewStartResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ReviewStartResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ReviewStartResponse__CollabAgentStatus; @@ -15560,10 +12133,8 @@ export const V2ReviewStartResponse__MemoryCitation = Schema.Struct({ export type V2ReviewStartResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -15583,10 +12154,8 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -15685,18 +12254,8 @@ export type V2ReviewStartResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ReviewStartResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ReviewStartResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ReviewStartResponse__UserInput = Schema.Union( @@ -15712,23 +12271,13 @@ export const V2ReviewStartResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -15743,23 +12292,6 @@ export const V2ReviewStartResponse__UserInput = Schema.Union( { mode: "oneOf" }, ); -export type V2SkillsListResponse__SkillInterface = { - readonly brandColor?: string | null; - readonly defaultPrompt?: string | null; - readonly displayName?: string | null; - readonly iconLarge?: V2SkillsListResponse__AbsolutePathBuf | null; - readonly iconSmall?: V2SkillsListResponse__AbsolutePathBuf | null; - readonly shortDescription?: string | null; -}; -export const V2SkillsListResponse__SkillInterface = Schema.Struct({ - brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - iconLarge: Schema.optionalKey(Schema.Union([V2SkillsListResponse__AbsolutePathBuf, Schema.Null])), - iconSmall: Schema.optionalKey(Schema.Union([V2SkillsListResponse__AbsolutePathBuf, Schema.Null])), - shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2SkillsListResponse__SkillDependencies = { readonly tools: ReadonlyArray; }; @@ -15767,44 +12299,108 @@ export const V2SkillsListResponse__SkillDependencies = Schema.Struct({ tools: Schema.Array(V2SkillsListResponse__SkillToolDependency), }); -export type V2ThreadForkResponse__CommandAction = +export type V2ThreadForkResponse__SandboxPolicy = + | { readonly type: "dangerFullAccess" } | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadForkResponse__AbsolutePathBuf; - readonly type: "read"; + readonly access?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly networkAccess?: boolean; + readonly type: "readOnly"; } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadForkResponse__CommandAction = Schema.Union( + readonly excludeSlashTmp?: boolean; + readonly excludeTmpdirEnvVar?: boolean; + readonly networkAccess?: boolean; + readonly readOnlyAccess?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly type: "workspaceWrite"; + readonly writableRoots?: ReadonlyArray; + }; +export const V2ThreadForkResponse__SandboxPolicy = Schema.Union( [ Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadForkResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), + type: Schema.Literal("dangerFullAccess").annotate({ + title: "DangerFullAccessSandboxPolicyType", + }), + }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), + access: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), + }).annotate({ title: "ReadOnlySandboxPolicy" }), Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), + networkAccess: Schema.optionalKey( + Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), + ), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + readOnlyAccess: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), + type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), ], { mode: "oneOf" }, ); @@ -15829,10 +12425,8 @@ export const V2ThreadForkResponse__MemoryCitation = Schema.Struct({ export type V2ThreadForkResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -15852,10 +12446,8 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -15954,18 +12546,8 @@ export type V2ThreadForkResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadForkResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadForkResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadForkResponse__UserInput = Schema.Union( @@ -15981,23 +12563,13 @@ export const V2ThreadForkResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16045,117 +12617,6 @@ export const V2ThreadForkResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadGoalGetResponse__ThreadGoal = { - readonly createdAt: number; - readonly objective: string; - readonly status: V2ThreadGoalGetResponse__ThreadGoalStatus; - readonly threadId: string; - readonly timeUsedSeconds: number; - readonly tokenBudget?: number | null; - readonly tokensUsed: number; - readonly updatedAt: number; -}; -export const V2ThreadGoalGetResponse__ThreadGoal = Schema.Struct({ - createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - objective: Schema.String, - status: V2ThreadGoalGetResponse__ThreadGoalStatus, - threadId: Schema.String, - timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - tokenBudget: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), -}); - -export type V2ThreadGoalSetResponse__ThreadGoal = { - readonly createdAt: number; - readonly objective: string; - readonly status: V2ThreadGoalSetResponse__ThreadGoalStatus; - readonly threadId: string; - readonly timeUsedSeconds: number; - readonly tokenBudget?: number | null; - readonly tokensUsed: number; - readonly updatedAt: number; -}; -export const V2ThreadGoalSetResponse__ThreadGoal = Schema.Struct({ - createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - objective: Schema.String, - status: V2ThreadGoalSetResponse__ThreadGoalStatus, - threadId: Schema.String, - timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - tokenBudget: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), -}); - -export type V2ThreadGoalUpdatedNotification__ThreadGoal = { - readonly createdAt: number; - readonly objective: string; - readonly status: V2ThreadGoalUpdatedNotification__ThreadGoalStatus; - readonly threadId: string; - readonly timeUsedSeconds: number; - readonly tokenBudget?: number | null; - readonly tokensUsed: number; - readonly updatedAt: number; -}; -export const V2ThreadGoalUpdatedNotification__ThreadGoal = Schema.Struct({ - createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - objective: Schema.String, - status: V2ThreadGoalUpdatedNotification__ThreadGoalStatus, - threadId: Schema.String, - timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - tokenBudget: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), - tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), -}); - -export type V2ThreadListResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadListResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadListResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadListResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadListResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadListResponse__CollabAgentStatus; @@ -16176,10 +12637,8 @@ export const V2ThreadListResponse__MemoryCitation = Schema.Struct({ export type V2ThreadListResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -16199,10 +12658,8 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -16301,18 +12758,8 @@ export type V2ThreadListResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadListResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadListResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadListResponse__UserInput = Schema.Union( @@ -16328,23 +12775,13 @@ export const V2ThreadListResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16392,48 +12829,6 @@ export const V2ThreadListResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadMetadataUpdateResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadMetadataUpdateResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadMetadataUpdateResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadMetadataUpdateResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadMetadataUpdateResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadMetadataUpdateResponse__CollabAgentStatus; @@ -16454,10 +12849,8 @@ export const V2ThreadMetadataUpdateResponse__MemoryCitation = Schema.Struct({ export type V2ThreadMetadataUpdateResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -16477,10 +12870,8 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -16579,18 +12970,8 @@ export type V2ThreadMetadataUpdateResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union( @@ -16606,27 +12987,13 @@ export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16674,48 +13041,6 @@ export const V2ThreadMetadataUpdateResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadReadResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadReadResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadReadResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadReadResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadReadResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadReadResponse__CollabAgentStatus; @@ -16736,10 +13061,8 @@ export const V2ThreadReadResponse__MemoryCitation = Schema.Struct({ export type V2ThreadReadResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -16759,10 +13082,8 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -16861,18 +13182,8 @@ export type V2ThreadReadResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadReadResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadReadResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadReadResponse__UserInput = Schema.Union( @@ -16888,23 +13199,13 @@ export const V2ThreadReadResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16952,47 +13253,13 @@ export const V2ThreadReadResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeParams__ContentItem = - | { readonly text: string; readonly type: "input_text" } - | { - readonly detail?: V2ThreadResumeParams__ImageDetail | null; - readonly image_url: string; - readonly type: "input_image"; - } - | { readonly audio_url: string; readonly type: "input_audio" } - | { readonly text: string; readonly type: "output_text" }; -export const V2ThreadResumeParams__ContentItem = Schema.Union( - [ - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }), - }).annotate({ title: "InputTextContentItem" }), - Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__ImageDetail, Schema.Null])), - image_url: Schema.String, - type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), - }).annotate({ title: "InputImageContentItem" }), - Schema.Struct({ - audio_url: Schema.String, - type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }), - }).annotate({ title: "InputAudioContentItem" }), - Schema.Struct({ - text: Schema.String, - type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), - }).annotate({ title: "OutputTextContentItem" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadResumeParams__FunctionCallOutputContentItem = | { readonly text: string; readonly type: "input_text" } | { readonly detail?: V2ThreadResumeParams__ImageDetail | null; readonly image_url: string; readonly type: "input_image"; - } - | { readonly audio_url: string; readonly type: "input_audio" } - | { readonly encrypted_content: string; readonly type: "encrypted_content" }; + }; export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -17008,18 +13275,6 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( title: "InputImageFunctionCallOutputContentItemType", }), }).annotate({ title: "InputImageFunctionCallOutputContentItem" }), - Schema.Struct({ - audio_url: Schema.String, - type: Schema.Literal("input_audio").annotate({ - title: "InputAudioFunctionCallOutputContentItemType", - }), - }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }), - Schema.Struct({ - encrypted_content: Schema.String, - type: Schema.Literal("encrypted_content").annotate({ - title: "EncryptedContentFunctionCallOutputContentItemType", - }), - }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }), ], { mode: "oneOf" }, ).annotate({ @@ -17027,44 +13282,108 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.", }); -export type V2ThreadResumeResponse__CommandAction = +export type V2ThreadResumeResponse__SandboxPolicy = + | { readonly type: "dangerFullAccess" } | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadResumeResponse__AbsolutePathBuf; - readonly type: "read"; + readonly access?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly networkAccess?: boolean; + readonly type: "readOnly"; } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadResumeResponse__CommandAction = Schema.Union( + readonly excludeSlashTmp?: boolean; + readonly excludeTmpdirEnvVar?: boolean; + readonly networkAccess?: boolean; + readonly readOnlyAccess?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly type: "workspaceWrite"; + readonly writableRoots?: ReadonlyArray; + }; +export const V2ThreadResumeResponse__SandboxPolicy = Schema.Union( [ Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadResumeResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), + type: Schema.Literal("dangerFullAccess").annotate({ + title: "DangerFullAccessSandboxPolicyType", + }), + }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), + access: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), + }).annotate({ title: "ReadOnlySandboxPolicy" }), Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), + networkAccess: Schema.optionalKey( + Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), + ), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + readOnlyAccess: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), + type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), ], { mode: "oneOf" }, ); @@ -17089,10 +13408,8 @@ export const V2ThreadResumeResponse__MemoryCitation = Schema.Struct({ export type V2ThreadResumeResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -17112,10 +13429,8 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -17214,18 +13529,8 @@ export type V2ThreadResumeResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadResumeResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadResumeResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadResumeResponse__UserInput = Schema.Union( @@ -17241,23 +13546,13 @@ export const V2ThreadResumeResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17305,48 +13600,6 @@ export const V2ThreadResumeResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadRollbackResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadRollbackResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadRollbackResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadRollbackResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadRollbackResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadRollbackResponse__CollabAgentStatus; @@ -17367,10 +13620,8 @@ export const V2ThreadRollbackResponse__MemoryCitation = Schema.Struct({ export type V2ThreadRollbackResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -17390,10 +13641,8 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -17492,18 +13741,8 @@ export type V2ThreadRollbackResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadRollbackResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadRollbackResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadRollbackResponse__UserInput = Schema.Union( @@ -17519,27 +13758,13 @@ export const V2ThreadRollbackResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17587,106 +13812,6 @@ export const V2ThreadRollbackResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadSettingsUpdatedNotification__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadSettingsUpdatedNotification__SandboxPolicy = Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadSettingsUpdatedNotification__AbsolutePathBuf).annotate({ - default: [], - }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, -); - -export type V2ThreadSettingsUpdatedNotification__Settings = { - readonly developer_instructions?: string | null; - readonly model: string; - readonly reasoning_effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null; -}; -export const V2ThreadSettingsUpdatedNotification__Settings = Schema.Struct({ - developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - model: Schema.String, - reasoning_effort: Schema.optionalKey( - Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]), - ), -}).annotate({ description: "Settings for a collaboration mode." }); - -export type V2ThreadStartedNotification__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadStartedNotification__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadStartedNotification__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadStartedNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadStartedNotification__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadStartedNotification__CollabAgentStatus; @@ -17707,10 +13832,8 @@ export const V2ThreadStartedNotification__MemoryCitation = Schema.Struct({ export type V2ThreadStartedNotification__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -17730,10 +13853,8 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -17832,18 +13953,8 @@ export type V2ThreadStartedNotification__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadStartedNotification__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadStartedNotification__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadStartedNotification__UserInput = Schema.Union( @@ -17859,27 +13970,13 @@ export const V2ThreadStartedNotification__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17927,44 +14024,108 @@ export const V2ThreadStartedNotification__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartResponse__CommandAction = +export type V2ThreadStartResponse__SandboxPolicy = + | { readonly type: "dangerFullAccess" } | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadStartResponse__AbsolutePathBuf; - readonly type: "read"; + readonly access?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly networkAccess?: boolean; + readonly type: "readOnly"; } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } + | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadStartResponse__CommandAction = Schema.Union( + readonly excludeSlashTmp?: boolean; + readonly excludeTmpdirEnvVar?: boolean; + readonly networkAccess?: boolean; + readonly readOnlyAccess?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly type: "workspaceWrite"; + readonly writableRoots?: ReadonlyArray; + }; +export const V2ThreadStartResponse__SandboxPolicy = Schema.Union( [ Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadStartResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), + type: Schema.Literal("dangerFullAccess").annotate({ + title: "DangerFullAccessSandboxPolicyType", + }), + }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), + access: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), + }).annotate({ title: "ReadOnlySandboxPolicy" }), Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), + networkAccess: Schema.optionalKey( + Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), + ), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + readOnlyAccess: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), + type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), ], { mode: "oneOf" }, ); @@ -17989,10 +14150,8 @@ export const V2ThreadStartResponse__MemoryCitation = Schema.Struct({ export type V2ThreadStartResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -18012,10 +14171,8 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -18114,18 +14271,8 @@ export type V2ThreadStartResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadStartResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadStartResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadStartResponse__UserInput = Schema.Union( @@ -18141,23 +14288,13 @@ export const V2ThreadStartResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18245,48 +14382,6 @@ export const V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = Schema.St total: V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown, }); -export type V2ThreadUnarchiveResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2ThreadUnarchiveResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadUnarchiveResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2ThreadUnarchiveResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadUnarchiveResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadUnarchiveResponse__CollabAgentStatus; @@ -18307,10 +14402,8 @@ export const V2ThreadUnarchiveResponse__MemoryCitation = Schema.Struct({ export type V2ThreadUnarchiveResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -18330,10 +14423,8 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -18432,18 +14523,8 @@ export type V2ThreadUnarchiveResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( @@ -18459,27 +14540,13 @@ export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18527,48 +14594,6 @@ export const V2ThreadUnarchiveResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnCompletedNotification__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2TurnCompletedNotification__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2TurnCompletedNotification__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2TurnCompletedNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2TurnCompletedNotification__CollabAgentState = { readonly message?: string | null; readonly status: V2TurnCompletedNotification__CollabAgentStatus; @@ -18589,10 +14614,8 @@ export const V2TurnCompletedNotification__MemoryCitation = Schema.Struct({ export type V2TurnCompletedNotification__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -18612,10 +14635,8 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -18714,18 +14735,8 @@ export type V2TurnCompletedNotification__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2TurnCompletedNotification__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2TurnCompletedNotification__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnCompletedNotification__UserInput = Schema.Union( @@ -18741,27 +14752,13 @@ export const V2TurnCompletedNotification__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18785,48 +14782,6 @@ export const V2TurnPlanUpdatedNotification__TurnPlanStep = Schema.Struct({ step: Schema.String, }); -export type V2TurnStartedNotification__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2TurnStartedNotification__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2TurnStartedNotification__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2TurnStartedNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2TurnStartedNotification__CollabAgentState = { readonly message?: string | null; readonly status: V2TurnStartedNotification__CollabAgentStatus; @@ -18847,10 +14802,8 @@ export const V2TurnStartedNotification__MemoryCitation = Schema.Struct({ export type V2TurnStartedNotification__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -18870,10 +14823,8 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -18972,18 +14923,8 @@ export type V2TurnStartedNotification__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2TurnStartedNotification__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2TurnStartedNotification__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnStartedNotification__UserInput = Schema.Union( @@ -18999,27 +14940,13 @@ export const V2TurnStartedNotification__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]), - ), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey( - Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]), - ), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -19036,12 +14963,29 @@ export const V2TurnStartedNotification__UserInput = Schema.Union( export type V2TurnStartParams__SandboxPolicy = | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } + | { + readonly access?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; + readonly networkAccess?: boolean; + readonly type: "readOnly"; + } | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { readonly excludeSlashTmp?: boolean; readonly excludeTmpdirEnvVar?: boolean; readonly networkAccess?: boolean; + readonly readOnlyAccess?: + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; readonly type: "workspaceWrite"; readonly writableRoots?: ReadonlyArray; }; @@ -19053,6 +14997,29 @@ export const V2TurnStartParams__SandboxPolicy = Schema.Union( }), }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ + access: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), }).annotate({ title: "ReadOnlySandboxPolicy" }), @@ -19068,6 +15035,29 @@ export const V2TurnStartParams__SandboxPolicy = Schema.Union( excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + readOnlyAccess: Schema.optionalKey( + Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey( + Schema.Boolean.annotate({ default: true }), + ), + readableRoots: Schema.optionalKey( + Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedReadOnlyAccessType", + }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ + title: "FullAccessReadOnlyAccessType", + }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, + ).annotate({ default: { type: "fullAccess" } }), + ), type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), writableRoots: Schema.optionalKey( Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), @@ -19096,18 +15086,8 @@ export type V2TurnStartParams__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2TurnStartParams__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2TurnStartParams__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnStartParams__UserInput = Schema.Union( @@ -19123,23 +15103,13 @@ export const V2TurnStartParams__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -19154,48 +15124,6 @@ export const V2TurnStartParams__UserInput = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnStartResponse__CommandAction = - | { - readonly command: string; - readonly name: string; - readonly path: V2TurnStartResponse__AbsolutePathBuf; - readonly type: "read"; - } - | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } - | { - readonly command: string; - readonly path?: string | null; - readonly query?: string | null; - readonly type: "search"; - } - | { readonly command: string; readonly type: "unknown" }; -export const V2TurnStartResponse__CommandAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - name: Schema.String, - path: V2TurnStartResponse__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - export type V2TurnStartResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2TurnStartResponse__CollabAgentStatus; @@ -19216,10 +15144,8 @@ export const V2TurnStartResponse__MemoryCitation = Schema.Struct({ export type V2TurnStartResponse__CodexErrorInfo = | "contextWindowExceeded" - | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" - | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -19239,10 +15165,8 @@ export const V2TurnStartResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", - "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", - "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -19341,18 +15265,8 @@ export type V2TurnStartResponse__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2TurnStartResponse__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2TurnStartResponse__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnStartResponse__UserInput = Schema.Union( @@ -19368,23 +15282,13 @@ export const V2TurnStartResponse__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -19405,18 +15309,8 @@ export type V2TurnSteerParams__UserInput = readonly text_elements?: ReadonlyArray; readonly type: "text"; } - | { - readonly detail?: V2TurnSteerParams__ImageDetail | null; - readonly type: "image"; - readonly url: string; - } - | { - readonly detail?: V2TurnSteerParams__ImageDetail | null; - readonly path: string; - readonly type: "localImage"; - } - | { readonly type: "audio"; readonly url: string } - | { readonly path: string; readonly type: "localAudio" } + | { readonly type: "image"; readonly url: string } + | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnSteerParams__UserInput = Schema.Union( @@ -19432,23 +15326,13 @@ export const V2TurnSteerParams__UserInput = Schema.Union( type: Schema.Literal("text").annotate({ title: "TextUserInputType" }), }).annotate({ title: "TextUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])), type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), url: Schema.String, }).annotate({ title: "ImageUserInput" }), Schema.Struct({ - detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])), path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), - Schema.Struct({ - type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), - url: Schema.String, - }).annotate({ title: "AudioUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), - }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -19593,7 +15477,7 @@ export const ClientRequest__CommandExecParams = Schema.Struct({ sandboxPolicy: Schema.optionalKey( Schema.Union([ClientRequest__SandboxPolicy, Schema.Null]).annotate({ description: - "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted. Cannot be combined with `permissionProfile`.", + "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted.", }), ), size: Schema.optionalKey( @@ -19633,6 +15517,13 @@ export const ClientRequest__CommandExecParams = Schema.Struct({ "Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.", }); +export type ClientRequest__ExternalAgentConfigImportParams = { + readonly migrationItems: ReadonlyArray; +}; +export const ClientRequest__ExternalAgentConfigImportParams = Schema.Struct({ + migrationItems: Schema.Array(ClientRequest__ExternalAgentConfigMigrationItem), +}); + export type ClientRequest__FunctionCallOutputBody = | string | ReadonlyArray; @@ -19667,59 +15558,9 @@ export const ClientRequest__ConfigBatchWriteParams = Schema.Struct({ ), }); -export type ClientRequest__PluginShareSaveParams = { - readonly discoverability?: ClientRequest__PluginShareDiscoverability | null; - readonly pluginPath: ClientRequest__AbsolutePathBuf; - readonly remotePluginId?: string | null; - readonly shareTargets?: ReadonlyArray | null; -}; -export const ClientRequest__PluginShareSaveParams = Schema.Struct({ - discoverability: Schema.optionalKey( - Schema.Union([ClientRequest__PluginShareDiscoverability, Schema.Null]), - ), - pluginPath: ClientRequest__AbsolutePathBuf, - remotePluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - shareTargets: Schema.optionalKey( - Schema.Union([Schema.Array(ClientRequest__PluginShareTarget), Schema.Null]), - ), -}); - -export type ClientRequest__PluginShareUpdateTargetsParams = { - readonly discoverability: ClientRequest__PluginShareUpdateDiscoverability; - readonly remotePluginId: string; - readonly shareTargets: ReadonlyArray; -}; -export const ClientRequest__PluginShareUpdateTargetsParams = Schema.Struct({ - discoverability: ClientRequest__PluginShareUpdateDiscoverability, - remotePluginId: Schema.String, - shareTargets: Schema.Array(ClientRequest__PluginShareTarget), -}); - -export type ClientRequest__ExternalAgentConfigMigrationItem = { - readonly cwd?: string | null; - readonly description: string; - readonly details?: ClientRequest__MigrationDetails | null; - readonly itemType: ClientRequest__ExternalAgentConfigMigrationItemType; -}; -export const ClientRequest__ExternalAgentConfigMigrationItem = Schema.Struct({ - cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Null or empty means home-scoped migration; non-empty means repo-scoped migration.", - }), - Schema.Null, - ]), - ), - description: Schema.String, - details: Schema.optionalKey(Schema.Union([ClientRequest__MigrationDetails, Schema.Null])), - itemType: ClientRequest__ExternalAgentConfigMigrationItemType, -}); - export type ClientRequest__TurnStartParams = { readonly approvalPolicy?: ClientRequest__AskForApproval | null; readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; - readonly clientUserMessageId?: string | null; readonly cwd?: string | null; readonly effort?: ClientRequest__ReasoningEffort | null; readonly input: ReadonlyArray; @@ -19727,7 +15568,7 @@ export type ClientRequest__TurnStartParams = { readonly outputSchema?: unknown; readonly personality?: ClientRequest__Personality | null; readonly sandboxPolicy?: ClientRequest__SandboxPolicy | null; - readonly serviceTier?: string | null; + readonly serviceTier?: ClientRequest__ServiceTier | null | null; readonly summary?: ClientRequest__ReasoningSummary | null; readonly threadId: string; }; @@ -19743,7 +15584,6 @@ export const ClientRequest__TurnStartParams = Schema.Struct({ "Override where approval requests are routed for review on this turn and subsequent turns.", }), ), - clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), cwd: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ @@ -19783,12 +15623,9 @@ export const ClientRequest__TurnStartParams = Schema.Struct({ }), ), serviceTier: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Override the service tier for this turn and subsequent turns.", - }), - Schema.Null, - ]), + Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]).annotate({ + description: "Override the service tier for this turn and subsequent turns.", + }), ), summary: Schema.optionalKey( Schema.Union([ClientRequest__ReasoningSummary, Schema.Null]).annotate({ @@ -19799,13 +15636,11 @@ export const ClientRequest__TurnStartParams = Schema.Struct({ }); export type ClientRequest__TurnSteerParams = { - readonly clientUserMessageId?: string | null; readonly expectedTurnId: string; readonly input: ReadonlyArray; readonly threadId: string; }; export const ClientRequest__TurnSteerParams = Schema.Struct({ - clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), expectedTurnId: Schema.String.annotate({ description: "Required active turn id precondition. The request fails when it does not match the currently active turn.", @@ -19814,34 +15649,6 @@ export const ClientRequest__TurnSteerParams = Schema.Struct({ threadId: Schema.String, }); -export type CommandExecutionRequestApprovalParams__FileSystemPath = - | { - readonly path: CommandExecutionRequestApprovalParams__LegacyAppPathString; - readonly type: "path"; - } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { - readonly type: "special"; - readonly value: CommandExecutionRequestApprovalParams__FileSystemSpecialPath; - }; -export const CommandExecutionRequestApprovalParams__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: CommandExecutionRequestApprovalParams__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: CommandExecutionRequestApprovalParams__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); - export type CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision = | "accept" | "acceptForSession" @@ -20028,66 +15835,40 @@ export const McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSc ], ); -export type PermissionsRequestApprovalParams__FileSystemPath = - | { readonly path: PermissionsRequestApprovalParams__LegacyAppPathString; readonly type: "path" } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { - readonly type: "special"; - readonly value: PermissionsRequestApprovalParams__FileSystemSpecialPath; - }; -export const PermissionsRequestApprovalParams__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: PermissionsRequestApprovalParams__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: PermissionsRequestApprovalParams__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); +export type PermissionsRequestApprovalParams__RequestPermissionProfile = { + readonly fileSystem?: PermissionsRequestApprovalParams__AdditionalFileSystemPermissions | null; + readonly network?: PermissionsRequestApprovalParams__AdditionalNetworkPermissions | null; +}; +export const PermissionsRequestApprovalParams__RequestPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null]), + ), + network: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]), + ), +}); -export type PermissionsRequestApprovalResponse__FileSystemPath = - | { - readonly path: PermissionsRequestApprovalResponse__LegacyAppPathString; - readonly type: "path"; - } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { - readonly type: "special"; - readonly value: PermissionsRequestApprovalResponse__FileSystemSpecialPath; - }; -export const PermissionsRequestApprovalResponse__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: PermissionsRequestApprovalResponse__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: PermissionsRequestApprovalResponse__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); +export type PermissionsRequestApprovalResponse__GrantedPermissionProfile = { + readonly fileSystem?: PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions | null; + readonly network?: PermissionsRequestApprovalResponse__AdditionalNetworkPermissions | null; +}; +export const PermissionsRequestApprovalResponse__GrantedPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ + PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions, + Schema.Null, + ]), + ), + network: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalResponse__AdditionalNetworkPermissions, Schema.Null]), + ), +}); export type ServerNotification__AppInfo = { readonly appMetadata?: ServerNotification__AppMetadata | null; readonly branding?: ServerNotification__AppBranding | null; readonly description?: string | null; readonly distributionChannel?: string | null; - readonly iconAssets?: { readonly [x: string]: string } | null; - readonly iconDarkAssets?: { readonly [x: string]: string } | null; readonly id: string; readonly installUrl?: string | null; readonly isAccessible?: boolean; @@ -20103,12 +15884,6 @@ export const ServerNotification__AppInfo = Schema.Struct({ branding: Schema.optionalKey(Schema.Union([ServerNotification__AppBranding, Schema.Null])), description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), distributionChannel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - iconAssets: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), - iconDarkAssets: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), id: Schema.String, installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), isAccessible: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), @@ -20128,17 +15903,6 @@ export const ServerNotification__AppInfo = Schema.Struct({ pluginDisplayNames: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), }).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." }); -export type ServerNotification__ExternalAgentConfigImportTypeResult = { - readonly failures: ReadonlyArray; - readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType; - readonly successes: ReadonlyArray; -}; -export const ServerNotification__ExternalAgentConfigImportTypeResult = Schema.Struct({ - failures: Schema.Array(ServerNotification__ExternalAgentConfigImportItemTypeFailure), - itemType: ServerNotification__ExternalAgentConfigMigrationItemType, - successes: Schema.Array(ServerNotification__ExternalAgentConfigImportItemTypeSuccess), -}); - export type ServerNotification__FuzzyFileSearchSessionUpdatedNotification = { readonly files: ReadonlyArray; readonly query: string; @@ -20160,19 +15924,7 @@ export type ServerNotification__HookRunSummary = { readonly handlerType: ServerNotification__HookHandlerType; readonly id: string; readonly scope: ServerNotification__HookScope; - readonly source?: - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; - readonly sourcePath: ServerNotification__AbsolutePathBuf; + readonly sourcePath: string; readonly startedAt: number; readonly status: ServerNotification__HookRunStatus; readonly statusMessage?: string | null; @@ -20191,48 +15943,69 @@ export const ServerNotification__HookRunSummary = Schema.Struct({ handlerType: ServerNotification__HookHandlerType, id: Schema.String, scope: ServerNotification__HookScope, - source: Schema.optionalKey( - Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", - ]).annotate({ default: "unknown" }), - ), - sourcePath: ServerNotification__AbsolutePathBuf, + sourcePath: Schema.String, startedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), status: ServerNotification__HookRunStatus, statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ServerNotification__FileSystemPath = - | { readonly path: ServerNotification__LegacyAppPathString; readonly type: "path" } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { readonly type: "special"; readonly value: ServerNotification__FileSystemSpecialPath }; -export const ServerNotification__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: ServerNotification__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: ServerNotification__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); +export type ServerNotification__ItemGuardianApprovalReviewCompletedNotification = { + readonly action: ServerNotification__GuardianApprovalReviewAction; + readonly decisionSource: ServerNotification__AutoReviewDecisionSource; + readonly review: ServerNotification__GuardianApprovalReview; + readonly reviewId: string; + readonly targetItemId?: string | null; + readonly threadId: string; + readonly turnId: string; +}; +export const ServerNotification__ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({ + action: ServerNotification__GuardianApprovalReviewAction, + decisionSource: ServerNotification__AutoReviewDecisionSource, + review: ServerNotification__GuardianApprovalReview, + reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }), + targetItemId: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.", + }), + Schema.Null, + ]), + ), + threadId: Schema.String, + turnId: Schema.String, +}).annotate({ + description: + "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", +}); + +export type ServerNotification__ItemGuardianApprovalReviewStartedNotification = { + readonly action: ServerNotification__GuardianApprovalReviewAction; + readonly review: ServerNotification__GuardianApprovalReview; + readonly reviewId: string; + readonly targetItemId?: string | null; + readonly threadId: string; + readonly turnId: string; +}; +export const ServerNotification__ItemGuardianApprovalReviewStartedNotification = Schema.Struct({ + action: ServerNotification__GuardianApprovalReviewAction, + review: ServerNotification__GuardianApprovalReview, + reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }), + targetItemId: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.", + }), + Schema.Null, + ]), + ), + threadId: Schema.String, + turnId: Schema.String, +}).annotate({ + description: + "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", +}); export type ServerNotification__TurnError = { readonly additionalDetails?: string | null; @@ -20247,41 +16020,15 @@ export const ServerNotification__TurnError = Schema.Struct({ message: Schema.String, }); -export type ServerNotification__FileChangePatchUpdatedNotification = { - readonly changes: ReadonlyArray; - readonly itemId: string; - readonly threadId: string; - readonly turnId: string; -}; -export const ServerNotification__FileChangePatchUpdatedNotification = Schema.Struct({ - changes: Schema.Array(ServerNotification__FileUpdateChange), - itemId: Schema.String, - threadId: Schema.String, - turnId: Schema.String, -}); - -export type ServerNotification__CollaborationMode = { - readonly mode: ServerNotification__ModeKind; - readonly settings: ServerNotification__Settings; -}; -export const ServerNotification__CollaborationMode = Schema.Struct({ - mode: ServerNotification__ModeKind, - settings: ServerNotification__Settings, -}).annotate({ description: "Collaboration mode for a Codex session." }); - export type ServerNotification__AccountRateLimitsUpdatedNotification = { readonly rateLimits: ServerNotification__RateLimitSnapshot; }; export const ServerNotification__AccountRateLimitsUpdatedNotification = Schema.Struct({ rateLimits: ServerNotification__RateLimitSnapshot, -}).annotate({ - description: - "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.", }); export type ServerNotification__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -20325,13 +16072,10 @@ export type ServerNotification__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: ServerNotification__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: ServerNotification__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: ServerNotification__McpToolCallResult | null; readonly server: string; readonly status: ServerNotification__McpToolCallStatus; @@ -20343,7 +16087,6 @@ export type ServerNotification__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: ServerNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -20361,31 +16104,18 @@ export type ServerNotification__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: ServerNotification__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: ServerNotification__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: ServerNotification__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: ServerNotification__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -20395,7 +16125,6 @@ export type ServerNotification__ThreadItem = export const ServerNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(ServerNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -20491,9 +16220,6 @@ export const ServerNotification__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([ServerNotification__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -20506,15 +16232,6 @@ export const ServerNotification__ThreadItem = Schema.Union( ), error: Schema.optionalKey(Schema.Union([ServerNotification__McpToolCallError, Schema.Null])), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([ServerNotification__McpToolCallResult, Schema.Null]), ), @@ -20541,7 +16258,6 @@ export const ServerNotification__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: ServerNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -20594,52 +16310,22 @@ export const ServerNotification__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: ServerNotification__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey(Schema.Union([ServerNotification__WebSearchAction, Schema.Null])), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: ServerNotification__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([ServerNotification__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -20705,17 +16391,6 @@ export const ServerNotification__ThreadStatusChangedNotification = Schema.Struct threadId: Schema.String, }); -export type ServerNotification__ThreadGoalUpdatedNotification = { - readonly goal: ServerNotification__ThreadGoal; - readonly threadId: string; - readonly turnId?: string | null; -}; -export const ServerNotification__ThreadGoalUpdatedNotification = Schema.Struct({ - goal: ServerNotification__ThreadGoal, - threadId: Schema.String, - turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type ServerNotification__ThreadTokenUsageUpdatedNotification = { readonly threadId: string; readonly tokenUsage: ServerNotification__ThreadTokenUsage; @@ -20740,27 +16415,18 @@ export const ServerNotification__TurnPlanUpdatedNotification = Schema.Struct({ turnId: Schema.String, }); -export type ServerRequest__FileSystemPath = - | { readonly path: ServerRequest__LegacyAppPathString; readonly type: "path" } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { readonly type: "special"; readonly value: ServerRequest__FileSystemSpecialPath }; -export const ServerRequest__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: ServerRequest__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: ServerRequest__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); +export type ServerRequest__RequestPermissionProfile = { + readonly fileSystem?: ServerRequest__AdditionalFileSystemPermissions | null; + readonly network?: ServerRequest__AdditionalNetworkPermissions | null; +}; +export const ServerRequest__RequestPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]), + ), + network: Schema.optionalKey( + Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]), + ), +}); export type ServerRequest__McpElicitationTitledMultiSelectEnumSchema = { readonly default?: ReadonlyArray | null; @@ -20840,14 +16506,12 @@ export type ServerRequest__CommandExecutionRequestApprovalParams = { readonly approvalId?: string | null; readonly command?: string | null; readonly commandActions?: ReadonlyArray | null; - readonly cwd?: ServerRequest__LegacyAppPathString | null; - readonly environmentId?: string | null; + readonly cwd?: string | null; readonly itemId: string; readonly networkApprovalContext?: ServerRequest__NetworkApprovalContext | null; readonly proposedExecpolicyAmendment?: ReadonlyArray | null; readonly proposedNetworkPolicyAmendments?: ReadonlyArray | null; readonly reason?: string | null; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; @@ -20876,13 +16540,8 @@ export const ServerRequest__CommandExecutionRequestApprovalParams = Schema.Struc ]), ), cwd: Schema.optionalKey( - Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null]).annotate({ - description: "The command's working directory.", - }), - ), - environmentId: Schema.optionalKey( Schema.Union([ - Schema.String.annotate({ description: "Environment in which the command will run." }), + Schema.String.annotate({ description: "The command's working directory." }), Schema.Null, ]), ), @@ -20918,30 +16577,17 @@ export const ServerRequest__CommandExecutionRequestApprovalParams = Schema.Struc Schema.Null, ]), ), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this approval request started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }); export type ServerRequest__ToolRequestUserInputParams = { - readonly autoResolutionMs?: number | null; readonly itemId: string; readonly questions: ReadonlyArray; readonly threadId: string; readonly turnId: string; }; export const ServerRequest__ToolRequestUserInputParams = Schema.Struct({ - autoResolutionMs: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), itemId: Schema.String, questions: Schema.Array(ServerRequest__ToolRequestUserInputQuestion), threadId: Schema.String, @@ -20953,8 +16599,6 @@ export type V2AppListUpdatedNotification__AppInfo = { readonly branding?: V2AppListUpdatedNotification__AppBranding | null; readonly description?: string | null; readonly distributionChannel?: string | null; - readonly iconAssets?: { readonly [x: string]: string } | null; - readonly iconDarkAssets?: { readonly [x: string]: string } | null; readonly id: string; readonly installUrl?: string | null; readonly isAccessible?: boolean; @@ -20974,12 +16618,6 @@ export const V2AppListUpdatedNotification__AppInfo = Schema.Struct({ ), description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), distributionChannel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - iconAssets: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), - iconDarkAssets: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), id: Schema.String, installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), isAccessible: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), @@ -21004,8 +16642,6 @@ export type V2AppsListResponse__AppInfo = { readonly branding?: V2AppsListResponse__AppBranding | null; readonly description?: string | null; readonly distributionChannel?: string | null; - readonly iconAssets?: { readonly [x: string]: string } | null; - readonly iconDarkAssets?: { readonly [x: string]: string } | null; readonly id: string; readonly installUrl?: string | null; readonly isAccessible?: boolean; @@ -21021,12 +16657,6 @@ export const V2AppsListResponse__AppInfo = Schema.Struct({ branding: Schema.optionalKey(Schema.Union([V2AppsListResponse__AppBranding, Schema.Null])), description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), distributionChannel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - iconAssets: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), - iconDarkAssets: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), id: Schema.String, installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), isAccessible: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), @@ -21069,23 +16699,16 @@ export const V2ConfigReadResponse__ConfigLayerMetadata = Schema.Struct({ }); export type V2ConfigReadResponse__ToolsV2 = { + readonly view_image?: boolean | null; readonly web_search?: V2ConfigReadResponse__WebSearchToolConfig | null; }; export const V2ConfigReadResponse__ToolsV2 = Schema.Struct({ + view_image: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), web_search: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__WebSearchToolConfig, Schema.Null]), ), }); -export type V2ConfigRequirementsReadResponse__ModelsRequirements = { - readonly newThread?: V2ConfigRequirementsReadResponse__NewThreadModelDefaults | null; -}; -export const V2ConfigRequirementsReadResponse__ModelsRequirements = Schema.Struct({ - newThread: Schema.optionalKey( - Schema.Union([V2ConfigRequirementsReadResponse__NewThreadModelDefaults, Schema.Null]), - ), -}); - export type V2ConfigWriteResponse__ConfigLayerMetadata = { readonly name: V2ConfigWriteResponse__ConfigLayerSource; readonly version: string; @@ -21108,121 +16731,6 @@ export const V2ErrorNotification__TurnError = Schema.Struct({ message: Schema.String, }); -export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem = { - readonly cwd?: string | null; - readonly description: string; - readonly details?: V2ExternalAgentConfigDetectResponse__MigrationDetails | null; - readonly itemType: V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType; -}; -export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem = Schema.Struct({ - cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Null or empty means home-scoped migration; non-empty means repo-scoped migration.", - }), - Schema.Null, - ]), - ), - description: Schema.String, - details: Schema.optionalKey( - Schema.Union([V2ExternalAgentConfigDetectResponse__MigrationDetails, Schema.Null]), - ), - itemType: V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType, -}); - -export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportTypeResult = - { - readonly failures: ReadonlyArray; - readonly itemType: V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType; - readonly successes: ReadonlyArray; - }; -export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportTypeResult = - Schema.Struct({ - failures: Schema.Array( - V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeFailure, - ), - itemType: - V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType, - successes: Schema.Array( - V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess, - ), - }); - -export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory = { - readonly completedAtMs: number; - readonly failures: ReadonlyArray; - readonly importId: string; - readonly successes: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory = - Schema.Struct({ - completedAtMs: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - failures: Schema.Array( - V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure, - ), - importId: Schema.String, - successes: Schema.Array( - V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess, - ), - }); - -export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem = { - readonly cwd?: string | null; - readonly description: string; - readonly details?: V2ExternalAgentConfigImportParams__MigrationDetails | null; - readonly itemType: V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType; -}; -export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem = Schema.Struct({ - cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Null or empty means home-scoped migration; non-empty means repo-scoped migration.", - }), - Schema.Null, - ]), - ), - description: Schema.String, - details: Schema.optionalKey( - Schema.Union([V2ExternalAgentConfigImportParams__MigrationDetails, Schema.Null]), - ), - itemType: V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType, -}); - -export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportTypeResult = { - readonly failures: ReadonlyArray; - readonly itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType; - readonly successes: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportTypeResult = - Schema.Struct({ - failures: Schema.Array( - V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure, - ), - itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType, - successes: Schema.Array( - V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess, - ), - }); - -export type V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary = { - readonly availableCount: number; - readonly credits?: ReadonlyArray | null; -}; -export const V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary = Schema.Struct({ - availableCount: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - credits: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2GetAccountRateLimitsResponse__RateLimitResetCredit).annotate({ - description: - "Detail rows for available reset credits, when the backend provides them.\n\n`null` means only `availableCount` is known, while an empty array means details were fetched and no available credits were returned. The backend may cap this list, so its length can be less than `availableCount`.", - }), - Schema.Null, - ]), - ), -}); - export type V2HookCompletedNotification__HookRunSummary = { readonly completedAt?: number | null; readonly displayOrder: number; @@ -21233,19 +16741,7 @@ export type V2HookCompletedNotification__HookRunSummary = { readonly handlerType: V2HookCompletedNotification__HookHandlerType; readonly id: string; readonly scope: V2HookCompletedNotification__HookScope; - readonly source?: - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; - readonly sourcePath: V2HookCompletedNotification__AbsolutePathBuf; + readonly sourcePath: string; readonly startedAt: number; readonly status: V2HookCompletedNotification__HookRunStatus; readonly statusMessage?: string | null; @@ -21264,40 +16760,12 @@ export const V2HookCompletedNotification__HookRunSummary = Schema.Struct({ handlerType: V2HookCompletedNotification__HookHandlerType, id: Schema.String, scope: V2HookCompletedNotification__HookScope, - source: Schema.optionalKey( - Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", - ]).annotate({ default: "unknown" }), - ), - sourcePath: V2HookCompletedNotification__AbsolutePathBuf, + sourcePath: Schema.String, startedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), status: V2HookCompletedNotification__HookRunStatus, statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type V2HooksListResponse__HooksListEntry = { - readonly cwd: string; - readonly errors: ReadonlyArray; - readonly hooks: ReadonlyArray; - readonly warnings: ReadonlyArray; -}; -export const V2HooksListResponse__HooksListEntry = Schema.Struct({ - cwd: Schema.String, - errors: Schema.Array(V2HooksListResponse__HookErrorInfo), - hooks: Schema.Array(V2HooksListResponse__HookMetadata), - warnings: Schema.Array(Schema.String), -}); - export type V2HookStartedNotification__HookRunSummary = { readonly completedAt?: number | null; readonly displayOrder: number; @@ -21308,19 +16776,7 @@ export type V2HookStartedNotification__HookRunSummary = { readonly handlerType: V2HookStartedNotification__HookHandlerType; readonly id: string; readonly scope: V2HookStartedNotification__HookScope; - readonly source?: - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; - readonly sourcePath: V2HookStartedNotification__AbsolutePathBuf; + readonly sourcePath: string; readonly startedAt: number; readonly status: V2HookStartedNotification__HookRunStatus; readonly statusMessage?: string | null; @@ -21339,22 +16795,7 @@ export const V2HookStartedNotification__HookRunSummary = Schema.Struct({ handlerType: V2HookStartedNotification__HookHandlerType, id: Schema.String, scope: V2HookStartedNotification__HookScope, - source: Schema.optionalKey( - Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", - ]).annotate({ default: "unknown" }), - ), - sourcePath: V2HookStartedNotification__AbsolutePathBuf, + sourcePath: Schema.String, startedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), status: V2HookStartedNotification__HookRunStatus, statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -21362,7 +16803,6 @@ export const V2HookStartedNotification__HookRunSummary = Schema.Struct({ export type V2ItemCompletedNotification__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -21406,13 +16846,10 @@ export type V2ItemCompletedNotification__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ItemCompletedNotification__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ItemCompletedNotification__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ItemCompletedNotification__McpToolCallResult | null; readonly server: string; readonly status: V2ItemCompletedNotification__McpToolCallStatus; @@ -21424,7 +16861,6 @@ export type V2ItemCompletedNotification__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ItemCompletedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -21444,31 +16880,18 @@ export type V2ItemCompletedNotification__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ItemCompletedNotification__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ItemCompletedNotification__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ItemCompletedNotification__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ItemCompletedNotification__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -21478,7 +16901,6 @@ export type V2ItemCompletedNotification__ThreadItem = export const V2ItemCompletedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ItemCompletedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -21576,9 +16998,6 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ItemCompletedNotification__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -21593,15 +17012,6 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( Schema.Union([V2ItemCompletedNotification__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ItemCompletedNotification__McpToolCallResult, Schema.Null]), ), @@ -21628,7 +17038,6 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ItemCompletedNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -21682,54 +17091,24 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ItemCompletedNotification__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ItemCompletedNotification__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ItemCompletedNotification__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ItemCompletedNotification__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -21757,65 +17136,8 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = - | { - readonly path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString; - readonly type: "path"; - } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { - readonly type: "special"; - readonly value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath; - }; -export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); - -export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = - | { - readonly path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString; - readonly type: "path"; - } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { - readonly type: "special"; - readonly value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath; - }; -export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); - export type V2ItemStartedNotification__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -21859,13 +17181,10 @@ export type V2ItemStartedNotification__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ItemStartedNotification__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ItemStartedNotification__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ItemStartedNotification__McpToolCallResult | null; readonly server: string; readonly status: V2ItemStartedNotification__McpToolCallStatus; @@ -21877,7 +17196,6 @@ export type V2ItemStartedNotification__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ItemStartedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -21895,31 +17213,18 @@ export type V2ItemStartedNotification__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ItemStartedNotification__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ItemStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ItemStartedNotification__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ItemStartedNotification__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -21929,7 +17234,6 @@ export type V2ItemStartedNotification__ThreadItem = export const V2ItemStartedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ItemStartedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -22027,9 +17331,6 @@ export const V2ItemStartedNotification__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ItemStartedNotification__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -22044,15 +17345,6 @@ export const V2ItemStartedNotification__ThreadItem = Schema.Union( Schema.Union([V2ItemStartedNotification__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ItemStartedNotification__McpToolCallResult, Schema.Null]), ), @@ -22079,7 +17371,6 @@ export const V2ItemStartedNotification__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ItemStartedNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -22133,54 +17424,24 @@ export const V2ItemStartedNotification__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ItemStartedNotification__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ItemStartedNotification__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ItemStartedNotification__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ItemStartedNotification__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -22212,7 +17473,6 @@ export type V2ModelListResponse__Model = { readonly additionalSpeedTiers?: ReadonlyArray; readonly availabilityNux?: V2ModelListResponse__ModelAvailabilityNux | null; readonly defaultReasoningEffort: V2ModelListResponse__ReasoningEffort; - readonly defaultServiceTier?: string | null; readonly description: string; readonly displayName: string; readonly hidden: boolean; @@ -22220,31 +17480,17 @@ export type V2ModelListResponse__Model = { readonly inputModalities?: ReadonlyArray; readonly isDefault: boolean; readonly model: string; - readonly serviceTiers?: ReadonlyArray; readonly supportedReasoningEfforts: ReadonlyArray; readonly supportsPersonality?: boolean; readonly upgrade?: string | null; readonly upgradeInfo?: V2ModelListResponse__ModelUpgradeInfo | null; }; export const V2ModelListResponse__Model = Schema.Struct({ - additionalSpeedTiers: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: "Deprecated: use `serviceTiers` instead.", - default: [], - }), - ), + additionalSpeedTiers: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), availabilityNux: Schema.optionalKey( Schema.Union([V2ModelListResponse__ModelAvailabilityNux, Schema.Null]), ), defaultReasoningEffort: V2ModelListResponse__ReasoningEffort, - defaultServiceTier: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Catalog default service tier id for this model, when one is configured.", - }), - Schema.Null, - ]), - ), description: Schema.String, displayName: Schema.String, hidden: Schema.Boolean, @@ -22254,9 +17500,6 @@ export const V2ModelListResponse__Model = Schema.Struct({ ), isDefault: Schema.Boolean, model: Schema.String, - serviceTiers: Schema.optionalKey( - Schema.Array(V2ModelListResponse__ModelServiceTier).annotate({ default: [] }), - ), supportedReasoningEfforts: Schema.Array(V2ModelListResponse__ReasoningEffortOption), supportsPersonality: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), upgrade: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -22265,154 +17508,46 @@ export const V2ModelListResponse__Model = Schema.Struct({ ), }); -export type V2PluginInstalledResponse__PluginShareContext = { - readonly creatorAccountUserId?: string | null; - readonly creatorName?: string | null; - readonly discoverability?: V2PluginInstalledResponse__PluginShareDiscoverability | null; - readonly remotePluginId: string; - readonly remoteVersion?: string | null; - readonly sharePrincipals?: ReadonlyArray | null; - readonly shareUrl?: string | null; -}; -export const V2PluginInstalledResponse__PluginShareContext = Schema.Struct({ - creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - discoverability: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__PluginShareDiscoverability, Schema.Null]), - ), - remotePluginId: Schema.String, - remoteVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the remote shared plugin release when available.", - }), - Schema.Null, - ]), - ), - sharePrincipals: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginInstalledResponse__PluginSharePrincipal), Schema.Null]), - ), - shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2PluginListResponse__PluginShareContext = { - readonly creatorAccountUserId?: string | null; - readonly creatorName?: string | null; - readonly discoverability?: V2PluginListResponse__PluginShareDiscoverability | null; - readonly remotePluginId: string; - readonly remoteVersion?: string | null; - readonly sharePrincipals?: ReadonlyArray | null; - readonly shareUrl?: string | null; -}; -export const V2PluginListResponse__PluginShareContext = Schema.Struct({ - creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - discoverability: Schema.optionalKey( - Schema.Union([V2PluginListResponse__PluginShareDiscoverability, Schema.Null]), - ), - remotePluginId: Schema.String, - remoteVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the remote shared plugin release when available.", - }), - Schema.Null, - ]), - ), - sharePrincipals: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginListResponse__PluginSharePrincipal), Schema.Null]), - ), - shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2PluginReadResponse__SkillSummary = { - readonly description: string; +export type V2PluginListResponse__PluginSummary = { + readonly authPolicy: V2PluginListResponse__PluginAuthPolicy; readonly enabled: boolean; - readonly interface?: V2PluginReadResponse__SkillInterface | null; + readonly id: string; + readonly installPolicy: V2PluginListResponse__PluginInstallPolicy; + readonly installed: boolean; + readonly interface?: V2PluginListResponse__PluginInterface | null; readonly name: string; - readonly path?: V2PluginReadResponse__AbsolutePathBuf | null; - readonly shortDescription?: string | null; + readonly source: V2PluginListResponse__PluginSource; }; -export const V2PluginReadResponse__SkillSummary = Schema.Struct({ - description: Schema.String, +export const V2PluginListResponse__PluginSummary = Schema.Struct({ + authPolicy: V2PluginListResponse__PluginAuthPolicy, enabled: Schema.Boolean, - interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__SkillInterface, Schema.Null])), + id: Schema.String, + installPolicy: V2PluginListResponse__PluginInstallPolicy, + installed: Schema.Boolean, + interface: Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInterface, Schema.Null])), name: Schema.String, - path: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])), - shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + source: V2PluginListResponse__PluginSource, }); -export type V2PluginReadResponse__PluginShareContext = { - readonly creatorAccountUserId?: string | null; - readonly creatorName?: string | null; - readonly discoverability?: V2PluginReadResponse__PluginShareDiscoverability | null; - readonly remotePluginId: string; - readonly remoteVersion?: string | null; - readonly sharePrincipals?: ReadonlyArray | null; - readonly shareUrl?: string | null; -}; -export const V2PluginReadResponse__PluginShareContext = Schema.Struct({ - creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - discoverability: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__PluginShareDiscoverability, Schema.Null]), - ), - remotePluginId: Schema.String, - remoteVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the remote shared plugin release when available.", - }), - Schema.Null, - ]), - ), - sharePrincipals: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginReadResponse__PluginSharePrincipal), Schema.Null]), - ), - shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - -export type V2PluginReadResponse__ScheduledTaskSummary = { - readonly key: string; +export type V2PluginReadResponse__PluginSummary = { + readonly authPolicy: V2PluginReadResponse__PluginAuthPolicy; + readonly enabled: boolean; + readonly id: string; + readonly installPolicy: V2PluginReadResponse__PluginInstallPolicy; + readonly installed: boolean; + readonly interface?: V2PluginReadResponse__PluginInterface | null; readonly name: string; - readonly prompt: string; - readonly schedule: V2PluginReadResponse__ScheduledTaskSchedule; + readonly source: V2PluginReadResponse__PluginSource; }; -export const V2PluginReadResponse__ScheduledTaskSummary = Schema.Struct({ - key: Schema.String, +export const V2PluginReadResponse__PluginSummary = Schema.Struct({ + authPolicy: V2PluginReadResponse__PluginAuthPolicy, + enabled: Schema.Boolean, + id: Schema.String, + installPolicy: V2PluginReadResponse__PluginInstallPolicy, + installed: Schema.Boolean, + interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInterface, Schema.Null])), name: Schema.String, - prompt: Schema.String, - schedule: V2PluginReadResponse__ScheduledTaskSchedule, -}); - -export type V2PluginShareListResponse__PluginShareContext = { - readonly creatorAccountUserId?: string | null; - readonly creatorName?: string | null; - readonly discoverability?: V2PluginShareListResponse__PluginShareDiscoverability | null; - readonly remotePluginId: string; - readonly remoteVersion?: string | null; - readonly sharePrincipals?: ReadonlyArray | null; - readonly shareUrl?: string | null; -}; -export const V2PluginShareListResponse__PluginShareContext = Schema.Struct({ - creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - discoverability: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__PluginShareDiscoverability, Schema.Null]), - ), - remotePluginId: Schema.String, - remoteVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the remote shared plugin release when available.", - }), - Schema.Null, - ]), - ), - sharePrincipals: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginShareListResponse__PluginSharePrincipal), Schema.Null]), - ), - shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + source: V2PluginReadResponse__PluginSource, }); export type V2RawResponseItemCompletedNotification__FunctionCallOutputBody = @@ -22438,7 +17573,6 @@ export const V2ReviewStartResponse__TurnError = Schema.Struct({ export type V2ReviewStartResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -22482,13 +17616,10 @@ export type V2ReviewStartResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ReviewStartResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ReviewStartResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ReviewStartResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ReviewStartResponse__McpToolCallStatus; @@ -22500,7 +17631,6 @@ export type V2ReviewStartResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ReviewStartResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -22518,31 +17648,18 @@ export type V2ReviewStartResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ReviewStartResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ReviewStartResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ReviewStartResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ReviewStartResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -22552,7 +17669,6 @@ export type V2ReviewStartResponse__ThreadItem = export const V2ReviewStartResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ReviewStartResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -22648,9 +17764,6 @@ export const V2ReviewStartResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ReviewStartResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -22665,15 +17778,6 @@ export const V2ReviewStartResponse__ThreadItem = Schema.Union( Schema.Union([V2ReviewStartResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ReviewStartResponse__McpToolCallResult, Schema.Null]), ), @@ -22700,7 +17804,6 @@ export const V2ReviewStartResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ReviewStartResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -22753,54 +17856,24 @@ export const V2ReviewStartResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ReviewStartResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ReviewStartResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ReviewStartResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ReviewStartResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -22834,7 +17907,7 @@ export type V2SkillsListResponse__SkillMetadata = { readonly enabled: boolean; readonly interface?: V2SkillsListResponse__SkillInterface | null; readonly name: string; - readonly path: V2SkillsListResponse__AbsolutePathBuf; + readonly path: string; readonly scope: V2SkillsListResponse__SkillScope; readonly shortDescription?: string | null; }; @@ -22846,7 +17919,7 @@ export const V2SkillsListResponse__SkillMetadata = Schema.Struct({ enabled: Schema.Boolean, interface: Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillInterface, Schema.Null])), name: Schema.String, - path: V2SkillsListResponse__AbsolutePathBuf, + path: Schema.String, scope: V2SkillsListResponse__SkillScope, shortDescription: Schema.optionalKey( Schema.Union([ @@ -22874,7 +17947,6 @@ export const V2ThreadForkResponse__TurnError = Schema.Struct({ export type V2ThreadForkResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -22918,13 +17990,10 @@ export type V2ThreadForkResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadForkResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadForkResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadForkResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadForkResponse__McpToolCallStatus; @@ -22936,7 +18005,6 @@ export type V2ThreadForkResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadForkResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -22954,31 +18022,18 @@ export type V2ThreadForkResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadForkResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadForkResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadForkResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadForkResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -22988,7 +18043,6 @@ export type V2ThreadForkResponse__ThreadItem = export const V2ThreadForkResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadForkResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -23084,9 +18138,6 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadForkResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -23101,15 +18152,6 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadForkResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadForkResponse__McpToolCallResult, Schema.Null]), ), @@ -23136,7 +18178,6 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadForkResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -23189,54 +18230,24 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadForkResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadForkResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadForkResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadForkResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -23279,7 +18290,6 @@ export const V2ThreadListResponse__TurnError = Schema.Struct({ export type V2ThreadListResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -23323,13 +18333,10 @@ export type V2ThreadListResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadListResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadListResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadListResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadListResponse__McpToolCallStatus; @@ -23341,7 +18348,6 @@ export type V2ThreadListResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadListResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -23359,31 +18365,18 @@ export type V2ThreadListResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadListResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadListResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadListResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadListResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -23393,7 +18386,6 @@ export type V2ThreadListResponse__ThreadItem = export const V2ThreadListResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadListResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -23489,9 +18481,6 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadListResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -23506,15 +18495,6 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadListResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadListResponse__McpToolCallResult, Schema.Null]), ), @@ -23541,7 +18521,6 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadListResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -23594,54 +18573,24 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadListResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadListResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadListResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadListResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -23684,7 +18633,6 @@ export const V2ThreadMetadataUpdateResponse__TurnError = Schema.Struct({ export type V2ThreadMetadataUpdateResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -23728,13 +18676,10 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadMetadataUpdateResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadMetadataUpdateResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadMetadataUpdateResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadMetadataUpdateResponse__McpToolCallStatus; @@ -23746,7 +18691,6 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadMetadataUpdateResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -23766,31 +18710,18 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadMetadataUpdateResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadMetadataUpdateResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadMetadataUpdateResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadMetadataUpdateResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -23800,7 +18731,6 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem = export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadMetadataUpdateResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -23898,9 +18828,6 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -23915,15 +18842,6 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallResult, Schema.Null]), ), @@ -23950,7 +18868,6 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadMetadataUpdateResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -24004,54 +18921,24 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadMetadataUpdateResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadMetadataUpdateResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadMetadataUpdateResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadMetadataUpdateResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -24094,7 +18981,6 @@ export const V2ThreadReadResponse__TurnError = Schema.Struct({ export type V2ThreadReadResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -24138,13 +19024,10 @@ export type V2ThreadReadResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadReadResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadReadResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadReadResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadReadResponse__McpToolCallStatus; @@ -24156,7 +19039,6 @@ export type V2ThreadReadResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadReadResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -24174,31 +19056,18 @@ export type V2ThreadReadResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadReadResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadReadResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadReadResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadReadResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -24208,7 +19077,6 @@ export type V2ThreadReadResponse__ThreadItem = export const V2ThreadReadResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadReadResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -24304,9 +19172,6 @@ export const V2ThreadReadResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadReadResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -24321,15 +19186,6 @@ export const V2ThreadReadResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadReadResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadReadResponse__McpToolCallResult, Schema.Null]), ), @@ -24356,7 +19212,6 @@ export const V2ThreadReadResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadReadResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -24409,54 +19264,24 @@ export const V2ThreadReadResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadReadResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadReadResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadReadResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadReadResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -24507,7 +19332,6 @@ export const V2ThreadResumeResponse__TurnError = Schema.Struct({ export type V2ThreadResumeResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -24551,13 +19375,10 @@ export type V2ThreadResumeResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadResumeResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadResumeResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadResumeResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadResumeResponse__McpToolCallStatus; @@ -24569,7 +19390,6 @@ export type V2ThreadResumeResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadResumeResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -24587,31 +19407,18 @@ export type V2ThreadResumeResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadResumeResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadResumeResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadResumeResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadResumeResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -24621,7 +19428,6 @@ export type V2ThreadResumeResponse__ThreadItem = export const V2ThreadResumeResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadResumeResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -24717,9 +19523,6 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadResumeResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -24734,15 +19537,6 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadResumeResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadResumeResponse__McpToolCallResult, Schema.Null]), ), @@ -24769,7 +19563,6 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadResumeResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -24822,54 +19615,24 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadResumeResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadResumeResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadResumeResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadResumeResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -24912,7 +19675,6 @@ export const V2ThreadRollbackResponse__TurnError = Schema.Struct({ export type V2ThreadRollbackResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -24956,13 +19718,10 @@ export type V2ThreadRollbackResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadRollbackResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadRollbackResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadRollbackResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadRollbackResponse__McpToolCallStatus; @@ -24974,7 +19733,6 @@ export type V2ThreadRollbackResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadRollbackResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -24992,31 +19750,18 @@ export type V2ThreadRollbackResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadRollbackResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadRollbackResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadRollbackResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadRollbackResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -25026,7 +19771,6 @@ export type V2ThreadRollbackResponse__ThreadItem = export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadRollbackResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -25124,9 +19868,6 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadRollbackResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -25141,15 +19882,6 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadRollbackResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadRollbackResponse__McpToolCallResult, Schema.Null]), ), @@ -25176,7 +19908,6 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadRollbackResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -25230,54 +19961,24 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadRollbackResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadRollbackResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadRollbackResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadRollbackResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -25305,15 +20006,6 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadSettingsUpdatedNotification__CollaborationMode = { - readonly mode: V2ThreadSettingsUpdatedNotification__ModeKind; - readonly settings: V2ThreadSettingsUpdatedNotification__Settings; -}; -export const V2ThreadSettingsUpdatedNotification__CollaborationMode = Schema.Struct({ - mode: V2ThreadSettingsUpdatedNotification__ModeKind, - settings: V2ThreadSettingsUpdatedNotification__Settings, -}).annotate({ description: "Collaboration mode for a Codex session." }); - export type V2ThreadStartedNotification__TurnError = { readonly additionalDetails?: string | null; readonly codexErrorInfo?: V2ThreadStartedNotification__CodexErrorInfo | null; @@ -25329,7 +20021,6 @@ export const V2ThreadStartedNotification__TurnError = Schema.Struct({ export type V2ThreadStartedNotification__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -25373,13 +20064,10 @@ export type V2ThreadStartedNotification__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadStartedNotification__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadStartedNotification__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadStartedNotification__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadStartedNotification__McpToolCallStatus; @@ -25391,7 +20079,6 @@ export type V2ThreadStartedNotification__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadStartedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -25411,31 +20098,18 @@ export type V2ThreadStartedNotification__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadStartedNotification__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadStartedNotification__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadStartedNotification__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -25445,7 +20119,6 @@ export type V2ThreadStartedNotification__ThreadItem = export const V2ThreadStartedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadStartedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -25543,9 +20216,6 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadStartedNotification__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -25560,15 +20230,6 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( Schema.Union([V2ThreadStartedNotification__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadStartedNotification__McpToolCallResult, Schema.Null]), ), @@ -25595,7 +20256,6 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadStartedNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -25649,54 +20309,24 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadStartedNotification__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadStartedNotification__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadStartedNotification__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadStartedNotification__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -25739,7 +20369,6 @@ export const V2ThreadStartResponse__TurnError = Schema.Struct({ export type V2ThreadStartResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -25783,13 +20412,10 @@ export type V2ThreadStartResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadStartResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadStartResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadStartResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadStartResponse__McpToolCallStatus; @@ -25801,7 +20427,6 @@ export type V2ThreadStartResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadStartResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -25819,31 +20444,18 @@ export type V2ThreadStartResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadStartResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadStartResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadStartResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadStartResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -25853,7 +20465,6 @@ export type V2ThreadStartResponse__ThreadItem = export const V2ThreadStartResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadStartResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -25949,9 +20560,6 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadStartResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -25966,15 +20574,6 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadStartResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadStartResponse__McpToolCallResult, Schema.Null]), ), @@ -26001,7 +20600,6 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadStartResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -26054,54 +20652,24 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadStartResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadStartResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadStartResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadStartResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -26144,7 +20712,6 @@ export const V2ThreadUnarchiveResponse__TurnError = Schema.Struct({ export type V2ThreadUnarchiveResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -26188,13 +20755,10 @@ export type V2ThreadUnarchiveResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2ThreadUnarchiveResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2ThreadUnarchiveResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2ThreadUnarchiveResponse__McpToolCallResult | null; readonly server: string; readonly status: V2ThreadUnarchiveResponse__McpToolCallStatus; @@ -26206,7 +20770,6 @@ export type V2ThreadUnarchiveResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2ThreadUnarchiveResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -26224,31 +20787,18 @@ export type V2ThreadUnarchiveResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2ThreadUnarchiveResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2ThreadUnarchiveResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2ThreadUnarchiveResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadUnarchiveResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -26258,7 +20808,6 @@ export type V2ThreadUnarchiveResponse__ThreadItem = export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2ThreadUnarchiveResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -26356,9 +20905,6 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -26373,15 +20919,6 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( Schema.Union([V2ThreadUnarchiveResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2ThreadUnarchiveResponse__McpToolCallResult, Schema.Null]), ), @@ -26408,7 +20945,6 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2ThreadUnarchiveResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -26462,54 +20998,24 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2ThreadUnarchiveResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2ThreadUnarchiveResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadUnarchiveResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -26552,7 +21058,6 @@ export const V2TurnCompletedNotification__TurnError = Schema.Struct({ export type V2TurnCompletedNotification__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -26596,13 +21101,10 @@ export type V2TurnCompletedNotification__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2TurnCompletedNotification__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2TurnCompletedNotification__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2TurnCompletedNotification__McpToolCallResult | null; readonly server: string; readonly status: V2TurnCompletedNotification__McpToolCallStatus; @@ -26614,7 +21116,6 @@ export type V2TurnCompletedNotification__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2TurnCompletedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -26634,31 +21135,18 @@ export type V2TurnCompletedNotification__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2TurnCompletedNotification__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2TurnCompletedNotification__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2TurnCompletedNotification__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2TurnCompletedNotification__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -26668,7 +21156,6 @@ export type V2TurnCompletedNotification__ThreadItem = export const V2TurnCompletedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2TurnCompletedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -26766,9 +21253,6 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2TurnCompletedNotification__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -26783,15 +21267,6 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union( Schema.Union([V2TurnCompletedNotification__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2TurnCompletedNotification__McpToolCallResult, Schema.Null]), ), @@ -26818,7 +21293,6 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2TurnCompletedNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -26872,54 +21346,24 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2TurnCompletedNotification__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2TurnCompletedNotification__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2TurnCompletedNotification__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2TurnCompletedNotification__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -26962,7 +21406,6 @@ export const V2TurnStartedNotification__TurnError = Schema.Struct({ export type V2TurnStartedNotification__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -27006,13 +21449,10 @@ export type V2TurnStartedNotification__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2TurnStartedNotification__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2TurnStartedNotification__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2TurnStartedNotification__McpToolCallResult | null; readonly server: string; readonly status: V2TurnStartedNotification__McpToolCallStatus; @@ -27024,7 +21464,6 @@ export type V2TurnStartedNotification__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2TurnStartedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -27042,31 +21481,18 @@ export type V2TurnStartedNotification__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2TurnStartedNotification__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2TurnStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2TurnStartedNotification__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2TurnStartedNotification__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -27076,7 +21502,6 @@ export type V2TurnStartedNotification__ThreadItem = export const V2TurnStartedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2TurnStartedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -27174,9 +21599,6 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2TurnStartedNotification__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -27191,15 +21613,6 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union( Schema.Union([V2TurnStartedNotification__McpToolCallError, Schema.Null]), ), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2TurnStartedNotification__McpToolCallResult, Schema.Null]), ), @@ -27226,7 +21639,6 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2TurnStartedNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -27280,54 +21692,24 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2TurnStartedNotification__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey( Schema.Union([V2TurnStartedNotification__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2TurnStartedNotification__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2TurnStartedNotification__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -27370,7 +21752,6 @@ export const V2TurnStartResponse__TurnError = Schema.Struct({ export type V2TurnStartResponse__ThreadItem = | { - readonly clientId?: string | null; readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; @@ -27414,13 +21795,10 @@ export type V2TurnStartResponse__ThreadItem = readonly type: "fileChange"; } | { - readonly appContext?: V2TurnStartResponse__McpToolCallAppContext | null; readonly arguments: unknown; readonly durationMs?: number | null; readonly error?: V2TurnStartResponse__McpToolCallError | null; readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly pluginId?: string | null; readonly result?: V2TurnStartResponse__McpToolCallResult | null; readonly server: string; readonly status: V2TurnStartResponse__McpToolCallStatus; @@ -27432,7 +21810,6 @@ export type V2TurnStartResponse__ThreadItem = readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; - readonly namespace?: string | null; readonly status: V2TurnStartResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; @@ -27450,31 +21827,18 @@ export type V2TurnStartResponse__ThreadItem = readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; readonly type: "collabAgentToolCall"; } - | { - readonly agentPath: string; - readonly agentThreadId: string; - readonly id: string; - readonly kind: V2TurnStartResponse__SubAgentActivityKind; - readonly type: "subAgentActivity"; - } | { readonly action?: V2TurnStartResponse__WebSearchAction | null; readonly id: string; readonly query: string; - readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } - | { - readonly id: string; - readonly path: V2TurnStartResponse__LegacyAppPathString; - readonly type: "imageView"; - } - | { readonly durationMs: number; readonly id: string; readonly type: "sleep" } + | { readonly id: string; readonly path: string; readonly type: "imageView" } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2TurnStartResponse__AbsolutePathBuf | null; + readonly savedPath?: string | null; readonly status: string; readonly type: "imageGeneration"; } @@ -27484,7 +21848,6 @@ export type V2TurnStartResponse__ThreadItem = export const V2TurnStartResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), content: Schema.Array(V2TurnStartResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), @@ -27580,9 +21943,6 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ - appContext: Schema.optionalKey( - Schema.Union([V2TurnStartResponse__McpToolCallAppContext, Schema.Null]), - ), arguments: Schema.Unknown, durationMs: Schema.optionalKey( Schema.Union([ @@ -27595,15 +21955,6 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( ), error: Schema.optionalKey(Schema.Union([V2TurnStartResponse__McpToolCallError, Schema.Null])), id: Schema.String, - mcpAppResourceUri: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Deprecated: use `appContext.resourceUri` instead.", - }), - Schema.Null, - ]), - ), - pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( Schema.Union([V2TurnStartResponse__McpToolCallResult, Schema.Null]), ), @@ -27630,7 +21981,6 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( ]), ), id: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: V2TurnStartResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, @@ -27683,52 +22033,22 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( title: "CollabAgentToolCallThreadItemType", }), }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - agentPath: Schema.String, - agentThreadId: Schema.String, - id: Schema.String, - kind: V2TurnStartResponse__SubAgentActivityKind, - type: Schema.Literal("subAgentActivity").annotate({ - title: "SubAgentActivityThreadItemType", - }), - }).annotate({ title: "SubAgentActivityThreadItem" }), Schema.Struct({ action: Schema.optionalKey(Schema.Union([V2TurnStartResponse__WebSearchAction, Schema.Null])), id: Schema.String, query: Schema.String, - results: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.Unknown).annotate({ - description: - "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", - }), - Schema.Null, - ]), - ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2TurnStartResponse__LegacyAppPathString, + path: Schema.String, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), - Schema.Struct({ - durationMs: Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - id: Schema.String, - type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ - title: "SleepThreadItem", - description: "Display item emitted by the interruptible `clock.sleep` tool.", - }), Schema.Struct({ id: Schema.String, result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - savedPath: Schema.optionalKey( - Schema.Union([V2TurnStartResponse__AbsolutePathBuf, Schema.Null]), - ), + savedPath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), }).annotate({ title: "ImageGenerationThreadItem" }), @@ -27756,41 +22076,6 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type ClientRequest__ExternalAgentConfigImportParams = { - readonly migrationItems: ReadonlyArray; - readonly migrationSource?: string | null; - readonly source?: string | null; -}; -export const ClientRequest__ExternalAgentConfigImportParams = Schema.Struct({ - migrationItems: Schema.Array(ClientRequest__ExternalAgentConfigMigrationItem), - migrationSource: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.", - }), - Schema.Null, - ]), - ), - source: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional identifier for the product that initiated the import.", - }), - Schema.Null, - ]), - ), -}); - -export type CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = { - readonly access: CommandExecutionRequestApprovalParams__FileSystemAccessMode; - readonly path: CommandExecutionRequestApprovalParams__FileSystemPath; -}; -export const CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({ - access: CommandExecutionRequestApprovalParams__FileSystemAccessMode, - path: CommandExecutionRequestApprovalParams__FileSystemPath, -}); - export type McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema = | McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema | McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema; @@ -27799,24 +22084,6 @@ export const McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSch McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema, ]); -export type PermissionsRequestApprovalParams__FileSystemSandboxEntry = { - readonly access: PermissionsRequestApprovalParams__FileSystemAccessMode; - readonly path: PermissionsRequestApprovalParams__FileSystemPath; -}; -export const PermissionsRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({ - access: PermissionsRequestApprovalParams__FileSystemAccessMode, - path: PermissionsRequestApprovalParams__FileSystemPath, -}); - -export type PermissionsRequestApprovalResponse__FileSystemSandboxEntry = { - readonly access: PermissionsRequestApprovalResponse__FileSystemAccessMode; - readonly path: PermissionsRequestApprovalResponse__FileSystemPath; -}; -export const PermissionsRequestApprovalResponse__FileSystemSandboxEntry = Schema.Struct({ - access: PermissionsRequestApprovalResponse__FileSystemAccessMode, - path: PermissionsRequestApprovalResponse__FileSystemPath, -}); - export type ServerNotification__AppListUpdatedNotification = { readonly data: ReadonlyArray; }; @@ -27824,24 +22091,6 @@ export const ServerNotification__AppListUpdatedNotification = Schema.Struct({ data: Schema.Array(ServerNotification__AppInfo), }).annotate({ description: "EXPERIMENTAL - notification emitted when the app list changes." }); -export type ServerNotification__ExternalAgentConfigImportCompletedNotification = { - readonly importId: string; - readonly itemTypeResults: ReadonlyArray; -}; -export const ServerNotification__ExternalAgentConfigImportCompletedNotification = Schema.Struct({ - importId: Schema.String, - itemTypeResults: Schema.Array(ServerNotification__ExternalAgentConfigImportTypeResult), -}); - -export type ServerNotification__ExternalAgentConfigImportProgressNotification = { - readonly importId: string; - readonly itemTypeResults: ReadonlyArray; -}; -export const ServerNotification__ExternalAgentConfigImportProgressNotification = Schema.Struct({ - importId: Schema.String, - itemTypeResults: Schema.Array(ServerNotification__ExternalAgentConfigImportTypeResult), -}); - export type ServerNotification__HookCompletedNotification = { readonly run: ServerNotification__HookRunSummary; readonly threadId: string; @@ -27864,15 +22113,6 @@ export const ServerNotification__HookStartedNotification = Schema.Struct({ turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ServerNotification__FileSystemSandboxEntry = { - readonly access: ServerNotification__FileSystemAccessMode; - readonly path: ServerNotification__FileSystemPath; -}; -export const ServerNotification__FileSystemSandboxEntry = Schema.Struct({ - access: ServerNotification__FileSystemAccessMode, - path: ServerNotification__FileSystemPath, -}); - export type ServerNotification__ErrorNotification = { readonly error: ServerNotification__TurnError; readonly threadId: string; @@ -27886,48 +22126,12 @@ export const ServerNotification__ErrorNotification = Schema.Struct({ willRetry: Schema.Boolean, }); -export type ServerNotification__ThreadSettings = { - readonly activePermissionProfile?: ServerNotification__ActivePermissionProfile | null; - readonly approvalPolicy: ServerNotification__AskForApproval; - readonly approvalsReviewer: ServerNotification__ApprovalsReviewer; - readonly collaborationMode: ServerNotification__CollaborationMode; - readonly cwd: ServerNotification__AbsolutePathBuf; - readonly effort?: ServerNotification__ReasoningEffort | null; - readonly model: string; - readonly modelProvider: string; - readonly personality?: ServerNotification__Personality | null; - readonly sandboxPolicy: ServerNotification__SandboxPolicy; - readonly serviceTier?: string | null; - readonly summary?: ServerNotification__ReasoningSummary | null; -}; -export const ServerNotification__ThreadSettings = Schema.Struct({ - activePermissionProfile: Schema.optionalKey( - Schema.Union([ServerNotification__ActivePermissionProfile, Schema.Null]), - ), - approvalPolicy: ServerNotification__AskForApproval, - approvalsReviewer: ServerNotification__ApprovalsReviewer, - collaborationMode: ServerNotification__CollaborationMode, - cwd: ServerNotification__AbsolutePathBuf, - effort: Schema.optionalKey(Schema.Union([ServerNotification__ReasoningEffort, Schema.Null])), - model: Schema.String, - modelProvider: Schema.String, - personality: Schema.optionalKey(Schema.Union([ServerNotification__Personality, Schema.Null])), - sandboxPolicy: ServerNotification__SandboxPolicy, - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - summary: Schema.optionalKey(Schema.Union([ServerNotification__ReasoningSummary, Schema.Null])), -}); - export type ServerNotification__ItemCompletedNotification = { - readonly completedAtMs: number; readonly item: ServerNotification__ThreadItem; readonly threadId: string; readonly turnId: string; }; export const ServerNotification__ItemCompletedNotification = Schema.Struct({ - completedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this item lifecycle completed.", - format: "int64", - }).check(Schema.isInt()), item: ServerNotification__ThreadItem, threadId: Schema.String, turnId: Schema.String, @@ -27935,16 +22139,11 @@ export const ServerNotification__ItemCompletedNotification = Schema.Struct({ export type ServerNotification__ItemStartedNotification = { readonly item: ServerNotification__ThreadItem; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; export const ServerNotification__ItemStartedNotification = Schema.Struct({ item: ServerNotification__ThreadItem, - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this item lifecycle started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }); @@ -27955,7 +22154,6 @@ export type ServerNotification__Turn = { readonly error?: ServerNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: ServerNotification__TurnStatus; }; @@ -27983,18 +22181,11 @@ export const ServerNotification__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(ServerNotification__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -28007,13 +22198,19 @@ export const ServerNotification__Turn = Schema.Struct({ status: ServerNotification__TurnStatus, }); -export type ServerRequest__FileSystemSandboxEntry = { - readonly access: ServerRequest__FileSystemAccessMode; - readonly path: ServerRequest__FileSystemPath; +export type ServerRequest__PermissionsRequestApprovalParams = { + readonly itemId: string; + readonly permissions: ServerRequest__RequestPermissionProfile; + readonly reason?: string | null; + readonly threadId: string; + readonly turnId: string; }; -export const ServerRequest__FileSystemSandboxEntry = Schema.Struct({ - access: ServerRequest__FileSystemAccessMode, - path: ServerRequest__FileSystemPath, +export const ServerRequest__PermissionsRequestApprovalParams = Schema.Struct({ + itemId: Schema.String, + permissions: ServerRequest__RequestPermissionProfile, + reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + threadId: Schema.String, + turnId: Schema.String, }); export type ServerRequest__McpElicitationMultiSelectEnumSchema = @@ -28024,74 +22221,33 @@ export const ServerRequest__McpElicitationMultiSelectEnumSchema = Schema.Union([ ServerRequest__McpElicitationTitledMultiSelectEnumSchema, ]); -export type V2ConfigReadResponse__Config = { - readonly analytics?: V2ConfigReadResponse__AnalyticsConfig | null; +export type V2ConfigReadResponse__ProfileV2 = { readonly approval_policy?: V2ConfigReadResponse__AskForApproval | null; readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null; - readonly compact_prompt?: string | null; - readonly desktop?: { readonly [x: string]: unknown } | null; - readonly developer_instructions?: string | null; - readonly forced_chatgpt_workspace_id?: V2ConfigReadResponse__ForcedChatgptWorkspaceIds | null; - readonly forced_login_method?: V2ConfigReadResponse__ForcedLoginMethod | null; - readonly instructions?: string | null; + readonly chatgpt_base_url?: string | null; readonly model?: string | null; - readonly model_auto_compact_token_limit?: number | null; - readonly model_auto_compact_token_limit_scope?: V2ConfigReadResponse__AutoCompactTokenLimitScope | null; - readonly model_context_window?: number | null; readonly model_provider?: string | null; readonly model_reasoning_effort?: V2ConfigReadResponse__ReasoningEffort | null; readonly model_reasoning_summary?: V2ConfigReadResponse__ReasoningSummary | null; readonly model_verbosity?: V2ConfigReadResponse__Verbosity | null; - readonly review_model?: string | null; - readonly sandbox_mode?: V2ConfigReadResponse__SandboxMode | null; - readonly sandbox_workspace_write?: V2ConfigReadResponse__SandboxWorkspaceWrite | null; - readonly service_tier?: string | null; + readonly service_tier?: V2ConfigReadResponse__ServiceTier | null; readonly tools?: V2ConfigReadResponse__ToolsV2 | null; readonly web_search?: V2ConfigReadResponse__WebSearchMode | null; readonly [x: string]: unknown; }; -export const V2ConfigReadResponse__Config = Schema.StructWithRest( +export const V2ConfigReadResponse__ProfileV2 = Schema.StructWithRest( Schema.Struct({ - analytics: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__AnalyticsConfig, Schema.Null]), - ), approval_policy: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__AskForApproval, Schema.Null]), ), approvals_reviewer: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__ApprovalsReviewer, Schema.Null]).annotate({ description: - "[UNSTABLE] Optional default for where approval requests are routed for review.", + "[UNSTABLE] Optional profile-level override for where approval requests are routed for review. If omitted, the enclosing config default is used.", }), ), - compact_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - desktop: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]), - ), - developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - forced_chatgpt_workspace_id: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__ForcedChatgptWorkspaceIds, Schema.Null]), - ), - forced_login_method: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__ForcedLoginMethod, Schema.Null]), - ), - instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + chatgpt_base_url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - model_auto_compact_token_limit: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - Schema.Null, - ]), - ), - model_auto_compact_token_limit_scope: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__AutoCompactTokenLimitScope, Schema.Null]), - ), - model_context_window: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), - Schema.Null, - ]), - ), model_provider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), model_reasoning_effort: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__ReasoningEffort, Schema.Null]), @@ -28102,14 +22258,9 @@ export const V2ConfigReadResponse__Config = Schema.StructWithRest( model_verbosity: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__Verbosity, Schema.Null]), ), - review_model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sandbox_mode: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__SandboxMode, Schema.Null]), + service_tier: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__ServiceTier, Schema.Null]), ), - sandbox_workspace_write: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__SandboxWorkspaceWrite, Schema.Null]), - ), - service_tier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), tools: Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ToolsV2, Schema.Null])), web_search: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__WebSearchMode, Schema.Null]), @@ -28118,58 +22269,6 @@ export const V2ConfigReadResponse__Config = Schema.StructWithRest( [Schema.Record(Schema.String, Schema.Unknown)], ); -export type V2ConfigRequirementsReadResponse__ConfigRequirements = { - readonly allowAppshots?: boolean | null; - readonly allowManagedHooksOnly?: boolean | null; - readonly allowRemoteControl?: boolean | null; - readonly allowedApprovalPolicies?: ReadonlyArray | null; - readonly allowedPermissionProfiles?: { readonly [x: string]: boolean } | null; - readonly allowedSandboxModes?: ReadonlyArray | null; - readonly allowedWebSearchModes?: ReadonlyArray | null; - readonly allowedWindowsSandboxImplementations?: ReadonlyArray | null; - readonly computerUse?: V2ConfigRequirementsReadResponse__ComputerUseRequirements | null; - readonly defaultPermissions?: string | null; - readonly enforceResidency?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null; - readonly featureRequirements?: { readonly [x: string]: boolean } | null; - readonly models?: V2ConfigRequirementsReadResponse__ModelsRequirements | null; -}; -export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({ - allowAppshots: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), - allowManagedHooksOnly: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), - allowRemoteControl: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), - allowedApprovalPolicies: Schema.optionalKey( - Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__AskForApproval), Schema.Null]), - ), - allowedPermissionProfiles: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]), - ), - allowedSandboxModes: Schema.optionalKey( - Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__SandboxMode), Schema.Null]), - ), - allowedWebSearchModes: Schema.optionalKey( - Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__WebSearchMode), Schema.Null]), - ), - allowedWindowsSandboxImplementations: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode), - Schema.Null, - ]), - ), - computerUse: Schema.optionalKey( - Schema.Union([V2ConfigRequirementsReadResponse__ComputerUseRequirements, Schema.Null]), - ), - defaultPermissions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - enforceResidency: Schema.optionalKey( - Schema.Union([V2ConfigRequirementsReadResponse__ResidencyRequirement, Schema.Null]), - ), - featureRequirements: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]), - ), - models: Schema.optionalKey( - Schema.Union([V2ConfigRequirementsReadResponse__ModelsRequirements, Schema.Null]), - ), -}); - export type V2ConfigWriteResponse__OverriddenMetadata = { readonly effectiveValue: unknown; readonly message: string; @@ -28181,320 +22280,52 @@ export const V2ConfigWriteResponse__OverriddenMetadata = Schema.Struct({ overridingLayer: V2ConfigWriteResponse__ConfigLayerMetadata, }); -export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = { - readonly access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode; - readonly path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath; -}; -export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = - Schema.Struct({ - access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode, - path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath, - }); - -export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = { - readonly access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode; - readonly path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath; -}; -export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = - Schema.Struct({ - access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode, - path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath, - }); - -export type V2PluginInstalledResponse__PluginSummary = { - readonly authPolicy: V2PluginInstalledResponse__PluginAuthPolicy; - readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE"; - readonly enabled: boolean; - readonly id: string; - readonly installPolicy: V2PluginInstalledResponse__PluginInstallPolicy; - readonly installPolicySource?: V2PluginInstalledResponse__PluginInstallPolicySource | null; - readonly installed: boolean; - readonly interface?: V2PluginInstalledResponse__PluginInterface | null; - readonly keywords?: ReadonlyArray; - readonly localVersion?: string | null; - readonly mustShowInstallationInterstitial?: boolean | null; +export type V2PluginListResponse__PluginMarketplaceEntry = { + readonly interface?: V2PluginListResponse__MarketplaceInterface | null; readonly name: string; - readonly remotePluginId?: string | null; - readonly shareContext?: V2PluginInstalledResponse__PluginShareContext | null; - readonly source: V2PluginInstalledResponse__PluginSource; - readonly version?: string | null; + readonly path: V2PluginListResponse__AbsolutePathBuf; + readonly plugins: ReadonlyArray; }; -export const V2PluginInstalledResponse__PluginSummary = Schema.Struct({ - authPolicy: V2PluginInstalledResponse__PluginAuthPolicy, - availability: Schema.optionalKey( - Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({ - description: "Availability state for installing and using the plugin.", - default: "AVAILABLE", - }), - ), - enabled: Schema.Boolean, - id: Schema.String, - installPolicy: V2PluginInstalledResponse__PluginInstallPolicy, - installPolicySource: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__PluginInstallPolicySource, Schema.Null]), - ), - installed: Schema.Boolean, +export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({ interface: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__PluginInterface, Schema.Null]), + Schema.Union([V2PluginListResponse__MarketplaceInterface, Schema.Null]), ), - keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), - localVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the locally materialized plugin package when available.", - }), - Schema.Null, - ]), - ), - mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), name: Schema.String, - remotePluginId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Backend remote plugin identifier when available." }), - Schema.Null, - ]), - ), - shareContext: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__PluginShareContext, Schema.Null]).annotate({ - description: "Remote sharing context associated with this plugin when available.", - }), - ), - source: V2PluginInstalledResponse__PluginSource, - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version advertised by the remote marketplace backend when available.", - }), - Schema.Null, - ]), - ), + path: V2PluginListResponse__AbsolutePathBuf, + plugins: Schema.Array(V2PluginListResponse__PluginSummary), }); -export type V2PluginListResponse__PluginSummary = { - readonly authPolicy: V2PluginListResponse__PluginAuthPolicy; - readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE"; - readonly enabled: boolean; - readonly id: string; - readonly installPolicy: V2PluginListResponse__PluginInstallPolicy; - readonly installPolicySource?: V2PluginListResponse__PluginInstallPolicySource | null; - readonly installed: boolean; - readonly interface?: V2PluginListResponse__PluginInterface | null; - readonly keywords?: ReadonlyArray; - readonly localVersion?: string | null; - readonly mustShowInstallationInterstitial?: boolean | null; - readonly name: string; - readonly remotePluginId?: string | null; - readonly shareContext?: V2PluginListResponse__PluginShareContext | null; - readonly source: V2PluginListResponse__PluginSource; - readonly version?: string | null; +export type V2PluginReadResponse__PluginDetail = { + readonly apps: ReadonlyArray; + readonly description?: string | null; + readonly marketplaceName: string; + readonly marketplacePath: V2PluginReadResponse__AbsolutePathBuf; + readonly mcpServers: ReadonlyArray; + readonly skills: ReadonlyArray; + readonly summary: V2PluginReadResponse__PluginSummary; }; -export const V2PluginListResponse__PluginSummary = Schema.Struct({ - authPolicy: V2PluginListResponse__PluginAuthPolicy, - availability: Schema.optionalKey( - Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({ - description: "Availability state for installing and using the plugin.", - default: "AVAILABLE", - }), - ), - enabled: Schema.Boolean, - id: Schema.String, - installPolicy: V2PluginListResponse__PluginInstallPolicy, - installPolicySource: Schema.optionalKey( - Schema.Union([V2PluginListResponse__PluginInstallPolicySource, Schema.Null]), - ), - installed: Schema.Boolean, - interface: Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInterface, Schema.Null])), - keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), - localVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the locally materialized plugin package when available.", - }), - Schema.Null, - ]), - ), - mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), - name: Schema.String, - remotePluginId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Backend remote plugin identifier when available." }), - Schema.Null, - ]), - ), - shareContext: Schema.optionalKey( - Schema.Union([V2PluginListResponse__PluginShareContext, Schema.Null]).annotate({ - description: "Remote sharing context associated with this plugin when available.", - }), - ), - source: V2PluginListResponse__PluginSource, - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version advertised by the remote marketplace backend when available.", - }), - Schema.Null, - ]), - ), -}); - -export type V2PluginReadResponse__PluginSummary = { - readonly authPolicy: V2PluginReadResponse__PluginAuthPolicy; - readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE"; - readonly enabled: boolean; - readonly id: string; - readonly installPolicy: V2PluginReadResponse__PluginInstallPolicy; - readonly installPolicySource?: V2PluginReadResponse__PluginInstallPolicySource | null; - readonly installed: boolean; - readonly interface?: V2PluginReadResponse__PluginInterface | null; - readonly keywords?: ReadonlyArray; - readonly localVersion?: string | null; - readonly mustShowInstallationInterstitial?: boolean | null; - readonly name: string; - readonly remotePluginId?: string | null; - readonly shareContext?: V2PluginReadResponse__PluginShareContext | null; - readonly source: V2PluginReadResponse__PluginSource; - readonly version?: string | null; -}; -export const V2PluginReadResponse__PluginSummary = Schema.Struct({ - authPolicy: V2PluginReadResponse__PluginAuthPolicy, - availability: Schema.optionalKey( - Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({ - description: "Availability state for installing and using the plugin.", - default: "AVAILABLE", - }), - ), - enabled: Schema.Boolean, - id: Schema.String, - installPolicy: V2PluginReadResponse__PluginInstallPolicy, - installPolicySource: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__PluginInstallPolicySource, Schema.Null]), - ), - installed: Schema.Boolean, - interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInterface, Schema.Null])), - keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), - localVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the locally materialized plugin package when available.", - }), - Schema.Null, - ]), - ), - mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), - name: Schema.String, - remotePluginId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Backend remote plugin identifier when available." }), - Schema.Null, - ]), - ), - shareContext: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__PluginShareContext, Schema.Null]).annotate({ - description: "Remote sharing context associated with this plugin when available.", - }), - ), - source: V2PluginReadResponse__PluginSource, - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version advertised by the remote marketplace backend when available.", - }), - Schema.Null, - ]), - ), -}); - -export type V2PluginShareListResponse__PluginSummary = { - readonly authPolicy: V2PluginShareListResponse__PluginAuthPolicy; - readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE"; - readonly enabled: boolean; - readonly id: string; - readonly installPolicy: V2PluginShareListResponse__PluginInstallPolicy; - readonly installPolicySource?: V2PluginShareListResponse__PluginInstallPolicySource | null; - readonly installed: boolean; - readonly interface?: V2PluginShareListResponse__PluginInterface | null; - readonly keywords?: ReadonlyArray; - readonly localVersion?: string | null; - readonly mustShowInstallationInterstitial?: boolean | null; - readonly name: string; - readonly remotePluginId?: string | null; - readonly shareContext?: V2PluginShareListResponse__PluginShareContext | null; - readonly source: V2PluginShareListResponse__PluginSource; - readonly version?: string | null; -}; -export const V2PluginShareListResponse__PluginSummary = Schema.Struct({ - authPolicy: V2PluginShareListResponse__PluginAuthPolicy, - availability: Schema.optionalKey( - Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({ - description: "Availability state for installing and using the plugin.", - default: "AVAILABLE", - }), - ), - enabled: Schema.Boolean, - id: Schema.String, - installPolicy: V2PluginShareListResponse__PluginInstallPolicy, - installPolicySource: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__PluginInstallPolicySource, Schema.Null]), - ), - installed: Schema.Boolean, - interface: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__PluginInterface, Schema.Null]), - ), - keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), - localVersion: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version of the locally materialized plugin package when available.", - }), - Schema.Null, - ]), - ), - mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), - name: Schema.String, - remotePluginId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Backend remote plugin identifier when available." }), - Schema.Null, - ]), - ), - shareContext: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__PluginShareContext, Schema.Null]).annotate({ - description: "Remote sharing context associated with this plugin when available.", - }), - ), - source: V2PluginShareListResponse__PluginSource, - version: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Version advertised by the remote marketplace backend when available.", - }), - Schema.Null, - ]), - ), +export const V2PluginReadResponse__PluginDetail = Schema.Struct({ + apps: Schema.Array(V2PluginReadResponse__AppSummary), + description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + marketplaceName: Schema.String, + marketplacePath: V2PluginReadResponse__AbsolutePathBuf, + mcpServers: Schema.Array(Schema.String), + skills: Schema.Array(V2PluginReadResponse__SkillSummary), + summary: V2PluginReadResponse__PluginSummary, }); export type V2RawResponseItemCompletedNotification__ResponseItem = | { readonly content: ReadonlyArray; + readonly end_turn?: boolean | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly phase?: V2RawResponseItemCompletedNotification__MessagePhase | null; readonly role: string; readonly type: "message"; } - | { - readonly author: string; - readonly content: ReadonlyArray; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; - readonly recipient: string; - readonly type: "agent_message"; - } | { readonly content?: ReadonlyArray | null; readonly encrypted_content?: string | null; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly summary: ReadonlyArray; readonly type: "reasoning"; } @@ -28502,7 +22333,6 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = readonly action: V2RawResponseItemCompletedNotification__LocalShellAction; readonly call_id?: string | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly status: V2RawResponseItemCompletedNotification__LocalShellStatus; readonly type: "local_shell_call"; } @@ -28510,7 +22340,6 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = readonly arguments: string; readonly call_id: string; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly name: string; readonly namespace?: string | null; readonly type: "function_call"; @@ -28520,14 +22349,11 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = readonly call_id?: string | null; readonly execution: string; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly status?: string | null; readonly type: "tool_search_call"; } | { readonly call_id: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody; readonly type: "function_call_output"; } @@ -28535,16 +22361,12 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = readonly call_id: string; readonly id?: string | null; readonly input: string; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly name: string; - readonly namespace?: string | null; readonly status?: string | null; readonly type: "custom_tool_call"; } | { readonly call_id: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly name?: string | null; readonly output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody; readonly type: "custom_tool_call_output"; @@ -28552,8 +22374,6 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = | { readonly call_id?: string | null; readonly execution: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly status: string; readonly tools: ReadonlyArray; readonly type: "tool_search_output"; @@ -28561,42 +22381,29 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = | { readonly action?: V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; readonly status?: string | null; readonly type: "web_search_call"; } | { - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; + readonly id: string; readonly result: string; readonly revised_prompt?: string | null; readonly status: string; readonly type: "image_generation_call"; } | { - readonly encrypted_content: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; - readonly type: "compaction"; - } - | { readonly type: "compaction_trigger" } - | { - readonly encrypted_content?: string | null; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null; - readonly type: "context_compaction"; + readonly ghost_commit: V2RawResponseItemCompletedNotification__GhostCommit; + readonly type: "ghost_snapshot"; } + | { readonly encrypted_content: string; readonly type: "compaction" } | { readonly type: "other" }; export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union( [ Schema.Struct({ content: Schema.Array(V2RawResponseItemCompletedNotification__ContentItem), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), + end_turn: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), phase: Schema.optionalKey( Schema.Union([V2RawResponseItemCompletedNotification__MessagePhase, Schema.Null]), @@ -28604,19 +22411,6 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union role: Schema.String, type: Schema.Literal("message").annotate({ title: "MessageResponseItemType" }), }).annotate({ title: "MessageResponseItem" }), - Schema.Struct({ - author: Schema.String, - content: Schema.Array(V2RawResponseItemCompletedNotification__AgentMessageInputContent), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), - recipient: Schema.String, - type: Schema.Literal("agent_message").annotate({ title: "AgentMessageResponseItemType" }), - }).annotate({ title: "AgentMessageResponseItem" }), Schema.Struct({ content: Schema.optionalKey( Schema.Union([ @@ -28625,13 +22419,6 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union ]), ), encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), summary: Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary), type: Schema.Literal("reasoning").annotate({ title: "ReasoningResponseItemType" }), }).annotate({ title: "ReasoningResponseItem" }), @@ -28647,16 +22434,11 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union Schema.Union([ Schema.String.annotate({ description: "Legacy id field retained for compatibility with older payloads.", + writeOnly: true, }), Schema.Null, ]), ), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), status: V2RawResponseItemCompletedNotification__LocalShellStatus, type: Schema.Literal("local_shell_call").annotate({ title: "LocalShellCallResponseItemType", @@ -28665,12 +22447,8 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union Schema.Struct({ arguments: Schema.String, call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), name: Schema.String, namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -28680,12 +22458,8 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union arguments: Schema.Unknown, call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), execution: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("tool_search_call").annotate({ @@ -28694,13 +22468,6 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union }).annotate({ title: "ToolSearchCallResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody, type: Schema.Literal("function_call_output").annotate({ title: "FunctionCallOutputResponseItemType", @@ -28708,16 +22475,11 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union }).annotate({ title: "FunctionCallOutputResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - input: Schema.String, - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), + input: Schema.String, name: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("custom_tool_call").annotate({ title: "CustomToolCallResponseItemType", @@ -28725,13 +22487,6 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union }).annotate({ title: "CustomToolCallResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody, type: Schema.Literal("custom_tool_call_output").annotate({ @@ -28741,13 +22496,6 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union Schema.Struct({ call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), execution: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), status: Schema.String, tools: Schema.Array(Schema.Unknown), type: Schema.Literal("tool_search_output").annotate({ @@ -28761,24 +22509,14 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union Schema.Null, ]), ), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("web_search_call").annotate({ title: "WebSearchCallResponseItemType" }), }).annotate({ title: "WebSearchCallResponseItem" }), Schema.Struct({ - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), + id: Schema.String, result: Schema.String, revised_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, @@ -28786,35 +22524,14 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union title: "ImageGenerationCallResponseItemType", }), }).annotate({ title: "ImageGenerationCallResponseItem" }), + Schema.Struct({ + ghost_commit: V2RawResponseItemCompletedNotification__GhostCommit, + type: Schema.Literal("ghost_snapshot").annotate({ title: "GhostSnapshotResponseItemType" }), + }).annotate({ title: "GhostSnapshotResponseItem" }), Schema.Struct({ encrypted_content: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }), }).annotate({ title: "CompactionResponseItem" }), - Schema.Struct({ - type: Schema.Literal("compaction_trigger").annotate({ - title: "CompactionTriggerResponseItemType", - }), - }).annotate({ title: "CompactionTriggerResponseItem" }), - Schema.Struct({ - encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ - V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, - Schema.Null, - ]), - ), - type: Schema.Literal("context_compaction").annotate({ - title: "ContextCompactionResponseItemType", - }), - }).annotate({ title: "ContextCompactionResponseItem" }), Schema.Struct({ type: Schema.Literal("other").annotate({ title: "OtherResponseItemType" }), }).annotate({ title: "OtherResponseItem" }), @@ -28828,7 +22545,6 @@ export type V2ReviewStartResponse__Turn = { readonly error?: V2ReviewStartResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ReviewStartResponse__TurnStatus; }; @@ -28856,18 +22572,11 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ReviewStartResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -28897,7 +22606,6 @@ export type V2ThreadForkResponse__Turn = { readonly error?: V2ThreadForkResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadForkResponse__TurnStatus; }; @@ -28925,18 +22633,11 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadForkResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -28955,7 +22656,6 @@ export type V2ThreadListResponse__Turn = { readonly error?: V2ThreadListResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadListResponse__TurnStatus; }; @@ -28983,18 +22683,11 @@ export const V2ThreadListResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadListResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29013,7 +22706,6 @@ export type V2ThreadMetadataUpdateResponse__Turn = { readonly error?: V2ThreadMetadataUpdateResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadMetadataUpdateResponse__TurnStatus; }; @@ -29041,18 +22733,11 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadMetadataUpdateResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29071,7 +22756,6 @@ export type V2ThreadReadResponse__Turn = { readonly error?: V2ThreadReadResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadReadResponse__TurnStatus; }; @@ -29099,18 +22783,11 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadReadResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29129,7 +22806,6 @@ export type V2ThreadResumeResponse__Turn = { readonly error?: V2ThreadResumeResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadResumeResponse__TurnStatus; }; @@ -29157,18 +22833,11 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadResumeResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29187,7 +22856,6 @@ export type V2ThreadRollbackResponse__Turn = { readonly error?: V2ThreadRollbackResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadRollbackResponse__TurnStatus; }; @@ -29215,18 +22883,11 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadRollbackResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29239,50 +22900,12 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({ status: V2ThreadRollbackResponse__TurnStatus, }); -export type V2ThreadSettingsUpdatedNotification__ThreadSettings = { - readonly activePermissionProfile?: V2ThreadSettingsUpdatedNotification__ActivePermissionProfile | null; - readonly approvalPolicy: V2ThreadSettingsUpdatedNotification__AskForApproval; - readonly approvalsReviewer: V2ThreadSettingsUpdatedNotification__ApprovalsReviewer; - readonly collaborationMode: V2ThreadSettingsUpdatedNotification__CollaborationMode; - readonly cwd: V2ThreadSettingsUpdatedNotification__AbsolutePathBuf; - readonly effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null; - readonly model: string; - readonly modelProvider: string; - readonly personality?: V2ThreadSettingsUpdatedNotification__Personality | null; - readonly sandboxPolicy: V2ThreadSettingsUpdatedNotification__SandboxPolicy; - readonly serviceTier?: string | null; - readonly summary?: V2ThreadSettingsUpdatedNotification__ReasoningSummary | null; -}; -export const V2ThreadSettingsUpdatedNotification__ThreadSettings = Schema.Struct({ - activePermissionProfile: Schema.optionalKey( - Schema.Union([V2ThreadSettingsUpdatedNotification__ActivePermissionProfile, Schema.Null]), - ), - approvalPolicy: V2ThreadSettingsUpdatedNotification__AskForApproval, - approvalsReviewer: V2ThreadSettingsUpdatedNotification__ApprovalsReviewer, - collaborationMode: V2ThreadSettingsUpdatedNotification__CollaborationMode, - cwd: V2ThreadSettingsUpdatedNotification__AbsolutePathBuf, - effort: Schema.optionalKey( - Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]), - ), - model: Schema.String, - modelProvider: Schema.String, - personality: Schema.optionalKey( - Schema.Union([V2ThreadSettingsUpdatedNotification__Personality, Schema.Null]), - ), - sandboxPolicy: V2ThreadSettingsUpdatedNotification__SandboxPolicy, - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - summary: Schema.optionalKey( - Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningSummary, Schema.Null]), - ), -}); - export type V2ThreadStartedNotification__Turn = { readonly completedAt?: number | null; readonly durationMs?: number | null; readonly error?: V2ThreadStartedNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadStartedNotification__TurnStatus; }; @@ -29310,18 +22933,11 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadStartedNotification__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29340,7 +22956,6 @@ export type V2ThreadStartResponse__Turn = { readonly error?: V2ThreadStartResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadStartResponse__TurnStatus; }; @@ -29368,18 +22983,11 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadStartResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29398,7 +23006,6 @@ export type V2ThreadUnarchiveResponse__Turn = { readonly error?: V2ThreadUnarchiveResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadUnarchiveResponse__TurnStatus; }; @@ -29426,18 +23033,11 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2ThreadUnarchiveResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29456,7 +23056,6 @@ export type V2TurnCompletedNotification__Turn = { readonly error?: V2TurnCompletedNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2TurnCompletedNotification__TurnStatus; }; @@ -29484,18 +23083,11 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2TurnCompletedNotification__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29514,7 +23106,6 @@ export type V2TurnStartedNotification__Turn = { readonly error?: V2TurnStartedNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2TurnStartedNotification__TurnStatus; }; @@ -29542,18 +23133,11 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2TurnStartedNotification__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29572,7 +23156,6 @@ export type V2TurnStartResponse__Turn = { readonly error?: V2TurnStartResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; - readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2TurnStartResponse__TurnStatus; }; @@ -29600,18 +23183,11 @@ export const V2TurnStartResponse__Turn = Schema.Struct({ description: "Only populated when the Turn's status is failed.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", - }), + id: Schema.String, items: Schema.Array(V2TurnStartResponse__ThreadItem).annotate({ - description: "Thread items currently included in this turn payload.", + description: + "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", }), - itemsView: Schema.optionalKey( - Schema.Literals(["notLoaded", "summary", "full"]).annotate({ - description: "Describes how much of `items` has been loaded for this turn.", - default: "full", - }), - ), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -29624,47 +23200,6 @@ export const V2TurnStartResponse__Turn = Schema.Struct({ status: V2TurnStartResponse__TurnStatus, }); -export type CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; -}; -export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct( - { - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - }, -); - export type McpServerElicitationRequestParams__McpElicitationEnumSchema = | McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema | McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema @@ -29675,129 +23210,6 @@ export const McpServerElicitationRequestParams__McpElicitationEnumSchema = Schem McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema, ]); -export type PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; -}; -export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalParams__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), -}); - -export type PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; -}; -export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalResponse__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), -}); - -export type ServerNotification__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; -}; -export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([Schema.Array(ServerNotification__FileSystemSandboxEntry), Schema.Null]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerNotification__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerNotification__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), -}); - -export type ServerNotification__ThreadSettingsUpdatedNotification = { - readonly threadId: string; - readonly threadSettings: ServerNotification__ThreadSettings; -}; -export const ServerNotification__ThreadSettingsUpdatedNotification = Schema.Struct({ - threadId: Schema.String, - threadSettings: ServerNotification__ThreadSettings, -}); - export type ServerNotification__Thread = { readonly agentNickname?: string | null; readonly agentRole?: string | null; @@ -29810,11 +23222,8 @@ export type ServerNotification__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -29831,7 +23240,6 @@ export type ServerNotification__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: ServerNotification__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -29860,10 +23268,7 @@ export const ServerNotification__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -29880,9 +23285,7 @@ export const ServerNotification__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -29892,15 +23295,6 @@ export const ServerNotification__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -29910,18 +23304,6 @@ export const ServerNotification__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -29952,11 +23334,6 @@ export const ServerNotification__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([ServerNotification__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(ServerNotification__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -29985,42 +23362,6 @@ export const ServerNotification__TurnStartedNotification = Schema.Struct({ turn: ServerNotification__Turn, }); -export type ServerRequest__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; -}; -export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([Schema.Array(ServerRequest__FileSystemSandboxEntry), Schema.Null]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerRequest__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerRequest__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), -}); - export type ServerRequest__McpElicitationEnumSchema = | ServerRequest__McpElicitationSingleSelectEnumSchema | ServerRequest__McpElicitationMultiSelectEnumSchema @@ -30031,167 +23372,97 @@ export const ServerRequest__McpElicitationEnumSchema = Schema.Union([ ServerRequest__McpElicitationLegacyTitledEnumSchema, ]); -export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type V2ConfigReadResponse__Config = { + readonly analytics?: V2ConfigReadResponse__AnalyticsConfig | null; + readonly approval_policy?: V2ConfigReadResponse__AskForApproval | null; + readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null; + readonly compact_prompt?: string | null; + readonly developer_instructions?: string | null; + readonly forced_chatgpt_workspace_id?: string | null; + readonly forced_login_method?: V2ConfigReadResponse__ForcedLoginMethod | null; + readonly instructions?: string | null; + readonly model?: string | null; + readonly model_auto_compact_token_limit?: number | null; + readonly model_context_window?: number | null; + readonly model_provider?: string | null; + readonly model_reasoning_effort?: V2ConfigReadResponse__ReasoningEffort | null; + readonly model_reasoning_summary?: V2ConfigReadResponse__ReasoningSummary | null; + readonly model_verbosity?: V2ConfigReadResponse__Verbosity | null; + readonly profile?: string | null; + readonly profiles?: { readonly [x: string]: V2ConfigReadResponse__ProfileV2 }; + readonly review_model?: string | null; + readonly sandbox_mode?: V2ConfigReadResponse__SandboxMode | null; + readonly sandbox_workspace_write?: V2ConfigReadResponse__SandboxWorkspaceWrite | null; + readonly service_tier?: V2ConfigReadResponse__ServiceTier | null; + readonly tools?: V2ConfigReadResponse__ToolsV2 | null; + readonly web_search?: V2ConfigReadResponse__WebSearchMode | null; + readonly [x: string]: unknown; }; -export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = +export const V2ConfigReadResponse__Config = Schema.StructWithRest( Schema.Struct({ - entries: Schema.optionalKey( + analytics: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__AnalyticsConfig, Schema.Null]), + ), + approval_policy: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__AskForApproval, Schema.Null]), + ), + approvals_reviewer: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__ApprovalsReviewer, Schema.Null]).annotate({ + description: + "[UNSTABLE] Optional default for where approval requests are routed for review.", + }), + ), + compact_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + forced_chatgpt_workspace_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + forced_login_method: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__ForcedLoginMethod, Schema.Null]), + ), + instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + model_auto_compact_token_limit: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry), + Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null, ]), ), - globScanMaxDepth: Schema.optionalKey( + model_context_window: Schema.optionalKey( Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null, ]), ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array( - V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - ).annotate({ description: "This will be removed in favor of `entries`." }), - Schema.Null, - ]), + model_provider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + model_reasoning_effort: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__ReasoningEffort, Schema.Null]), ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array( - V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - ).annotate({ description: "This will be removed in favor of `entries`." }), - Schema.Null, - ]), + model_reasoning_summary: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__ReasoningSummary, Schema.Null]), ), - }); - -export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; -}; -export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = - Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry), - Schema.Null, - ]), + model_verbosity: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__Verbosity, Schema.Null]), ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), + profile: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + profiles: Schema.optionalKey( + Schema.Record(Schema.String, V2ConfigReadResponse__ProfileV2).annotate({ default: {} }), ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate( - { description: "This will be removed in favor of `entries`." }, - ), - Schema.Null, - ]), + review_model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sandbox_mode: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__SandboxMode, Schema.Null]), ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate( - { description: "This will be removed in favor of `entries`." }, - ), - Schema.Null, - ]), + sandbox_workspace_write: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__SandboxWorkspaceWrite, Schema.Null]), ), - }); - -export type V2PluginInstalledResponse__PluginMarketplaceEntry = { - readonly interface?: V2PluginInstalledResponse__MarketplaceInterface | null; - readonly name: string; - readonly path?: V2PluginInstalledResponse__AbsolutePathBuf | null; - readonly plugins: ReadonlyArray; -}; -export const V2PluginInstalledResponse__PluginMarketplaceEntry = Schema.Struct({ - interface: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__MarketplaceInterface, Schema.Null]), - ), - name: Schema.String, - path: Schema.optionalKey( - Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: - "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.", - }), - ), - plugins: Schema.Array(V2PluginInstalledResponse__PluginSummary), -}); - -export type V2PluginListResponse__PluginMarketplaceEntry = { - readonly interface?: V2PluginListResponse__MarketplaceInterface | null; - readonly name: string; - readonly path?: V2PluginListResponse__AbsolutePathBuf | null; - readonly plugins: ReadonlyArray; -}; -export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({ - interface: Schema.optionalKey( - Schema.Union([V2PluginListResponse__MarketplaceInterface, Schema.Null]), - ), - name: Schema.String, - path: Schema.optionalKey( - Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: - "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.", - }), - ), - plugins: Schema.Array(V2PluginListResponse__PluginSummary), -}); - -export type V2PluginReadResponse__PluginDetail = { - readonly appTemplates: ReadonlyArray; - readonly apps: ReadonlyArray; - readonly description?: string | null; - readonly hooks: ReadonlyArray; - readonly marketplaceName: string; - readonly marketplacePath?: V2PluginReadResponse__AbsolutePathBuf | null; - readonly mcpServers: ReadonlyArray; - readonly scheduledTasks?: ReadonlyArray | null; - readonly shareUrl?: string | null; - readonly skills: ReadonlyArray; - readonly summary: V2PluginReadResponse__PluginSummary; -}; -export const V2PluginReadResponse__PluginDetail = Schema.Struct({ - appTemplates: Schema.Array(V2PluginReadResponse__AppTemplateSummary), - apps: Schema.Array(V2PluginReadResponse__AppSummary), - description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - hooks: Schema.Array(V2PluginReadResponse__PluginHookSummary), - marketplaceName: Schema.String, - marketplacePath: Schema.optionalKey( - Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]), - ), - mcpServers: Schema.Array(Schema.String), - scheduledTasks: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskSummary), Schema.Null]), - ), - shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - skills: Schema.Array(V2PluginReadResponse__SkillSummary), - summary: V2PluginReadResponse__PluginSummary, -}); - -export type V2PluginShareListResponse__PluginShareListItem = { - readonly localPluginPath?: V2PluginShareListResponse__AbsolutePathBuf | null; - readonly plugin: V2PluginShareListResponse__PluginSummary; -}; -export const V2PluginShareListResponse__PluginShareListItem = Schema.Struct({ - localPluginPath: Schema.optionalKey( - Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]), - ), - plugin: V2PluginShareListResponse__PluginSummary, -}); + service_tier: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__ServiceTier, Schema.Null]), + ), + tools: Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ToolsV2, Schema.Null])), + web_search: Schema.optionalKey( + Schema.Union([V2ConfigReadResponse__WebSearchMode, Schema.Null]), + ), + }), + [Schema.Record(Schema.String, Schema.Unknown)], +); export type V2ThreadForkResponse__Thread = { readonly agentNickname?: string | null; @@ -30205,11 +23476,8 @@ export type V2ThreadForkResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -30226,7 +23494,6 @@ export type V2ThreadForkResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadForkResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -30255,10 +23522,7 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -30275,9 +23539,7 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -30287,15 +23549,6 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -30305,18 +23558,6 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -30347,11 +23588,6 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadForkResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadForkResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -30374,11 +23610,8 @@ export type V2ThreadListResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -30395,7 +23628,6 @@ export type V2ThreadListResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadListResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -30424,10 +23656,7 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -30444,9 +23673,7 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -30456,15 +23683,6 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -30474,18 +23692,6 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -30516,11 +23722,6 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadListResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadListResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -30543,11 +23744,8 @@ export type V2ThreadMetadataUpdateResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -30564,7 +23762,6 @@ export type V2ThreadMetadataUpdateResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadMetadataUpdateResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -30593,10 +23790,7 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -30613,9 +23807,7 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -30625,15 +23817,6 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -30643,18 +23826,6 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -30685,11 +23856,6 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadMetadataUpdateResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadMetadataUpdateResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -30712,11 +23878,8 @@ export type V2ThreadReadResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -30733,7 +23896,6 @@ export type V2ThreadReadResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadReadResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -30762,10 +23924,7 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -30782,9 +23941,7 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -30794,15 +23951,6 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -30812,18 +23960,6 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -30854,11 +23990,6 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadReadResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadReadResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -30881,11 +24012,8 @@ export type V2ThreadResumeResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -30902,7 +24030,6 @@ export type V2ThreadResumeResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadResumeResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -30931,10 +24058,7 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -30951,9 +24075,7 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -30963,15 +24085,6 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -30981,18 +24094,6 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -31023,11 +24124,6 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadResumeResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadResumeResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -31050,11 +24146,8 @@ export type V2ThreadStartedNotification__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -31071,7 +24164,6 @@ export type V2ThreadStartedNotification__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadStartedNotification__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -31100,10 +24192,7 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -31120,9 +24209,7 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -31132,15 +24219,6 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -31150,18 +24228,6 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -31192,11 +24258,6 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadStartedNotification__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadStartedNotification__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -31219,11 +24280,8 @@ export type V2ThreadStartResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -31240,7 +24298,6 @@ export type V2ThreadStartResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadStartResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -31269,10 +24326,7 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -31289,9 +24343,7 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -31301,15 +24353,6 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -31319,18 +24362,6 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -31361,11 +24392,6 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadStartResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadStartResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -31388,11 +24414,8 @@ export type V2ThreadUnarchiveResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -31409,7 +24432,6 @@ export type V2ThreadUnarchiveResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadUnarchiveResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -31438,10 +24460,7 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -31458,9 +24477,7 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -31470,15 +24487,6 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -31488,18 +24496,6 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -31530,11 +24526,6 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadUnarchiveResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -31557,48 +24548,6 @@ export const McpServerElicitationRequestParams__McpElicitationPrimitiveSchema = McpServerElicitationRequestParams__McpElicitationBooleanSchema, ]); -export type PermissionsRequestApprovalParams__RequestPermissionProfile = { - readonly fileSystem?: PermissionsRequestApprovalParams__AdditionalFileSystemPermissions | null; - readonly network?: PermissionsRequestApprovalParams__AdditionalNetworkPermissions | null; -}; -export const PermissionsRequestApprovalParams__RequestPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null]), - ), - network: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]), - ), -}); - -export type PermissionsRequestApprovalResponse__GrantedPermissionProfile = { - readonly fileSystem?: PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions | null; - readonly network?: PermissionsRequestApprovalResponse__AdditionalNetworkPermissions | null; -}; -export const PermissionsRequestApprovalResponse__GrantedPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ - PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions, - Schema.Null, - ]), - ), - network: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalResponse__AdditionalNetworkPermissions, Schema.Null]), - ), -}); - -export type ServerNotification__RequestPermissionProfile = { - readonly fileSystem?: ServerNotification__AdditionalFileSystemPermissions | null; - readonly network?: ServerNotification__AdditionalNetworkPermissions | null; -}; -export const ServerNotification__RequestPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ServerNotification__AdditionalFileSystemPermissions, Schema.Null]), - ), - network: Schema.optionalKey( - Schema.Union([ServerNotification__AdditionalNetworkPermissions, Schema.Null]), - ), -}); - export type ServerNotification__ThreadStartedNotification = { readonly thread: ServerNotification__Thread; }; @@ -31606,19 +24555,6 @@ export const ServerNotification__ThreadStartedNotification = Schema.Struct({ thread: ServerNotification__Thread, }); -export type ServerRequest__RequestPermissionProfile = { - readonly fileSystem?: ServerRequest__AdditionalFileSystemPermissions | null; - readonly network?: ServerRequest__AdditionalNetworkPermissions | null; -}; -export const ServerRequest__RequestPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]), - ), - network: Schema.optionalKey( - Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]), - ), -}); - export type ServerRequest__McpElicitationPrimitiveSchema = | ServerRequest__McpElicitationEnumSchema | ServerRequest__McpElicitationStringSchema @@ -31631,46 +24567,6 @@ export const ServerRequest__McpElicitationPrimitiveSchema = Schema.Union([ ServerRequest__McpElicitationBooleanSchema, ]); -export type V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = { - readonly fileSystem?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions | null; - readonly network?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions | null; -}; -export const V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = - Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions, - Schema.Null, - ]), - ), - network: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions, - Schema.Null, - ]), - ), - }); - -export type V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = { - readonly fileSystem?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions | null; - readonly network?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions | null; -}; -export const V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = - Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions, - Schema.Null, - ]), - ), - network: Schema.optionalKey( - Schema.Union([ - V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions, - Schema.Null, - ]), - ), - }); - export type McpServerElicitationRequestParams__McpElicitationSchema = { readonly $schema?: string | null; readonly properties: { @@ -31692,125 +24588,6 @@ export const McpServerElicitationRequestParams__McpElicitationSchema = Schema.St "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.", }); -export type ServerNotification__GuardianApprovalReviewAction = - | { - readonly command: string; - readonly cwd: ServerNotification__AbsolutePathBuf; - readonly source: ServerNotification__GuardianCommandSource; - readonly type: "command"; - } - | { - readonly argv: ReadonlyArray; - readonly cwd: ServerNotification__AbsolutePathBuf; - readonly program: string; - readonly source: ServerNotification__GuardianCommandSource; - readonly type: "execve"; - } - | { - readonly cwd: ServerNotification__AbsolutePathBuf; - readonly files: ReadonlyArray; - readonly type: "applyPatch"; - } - | { - readonly host: string; - readonly port: number; - readonly protocol: ServerNotification__NetworkApprovalProtocol; - readonly target: string; - readonly type: "networkAccess"; - } - | { - readonly connectorId?: string | null; - readonly connectorName?: string | null; - readonly server: string; - readonly toolName: string; - readonly toolTitle?: string | null; - readonly type: "mcpToolCall"; - } - | { - readonly permissions: ServerNotification__RequestPermissionProfile; - readonly reason?: string | null; - readonly type: "requestPermissions"; - }; -export const ServerNotification__GuardianApprovalReviewAction = Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - cwd: ServerNotification__AbsolutePathBuf, - source: ServerNotification__GuardianCommandSource, - type: Schema.Literal("command").annotate({ - title: "CommandGuardianApprovalReviewActionType", - }), - }).annotate({ title: "CommandGuardianApprovalReviewAction" }), - Schema.Struct({ - argv: Schema.Array(Schema.String), - cwd: ServerNotification__AbsolutePathBuf, - program: Schema.String, - source: ServerNotification__GuardianCommandSource, - type: Schema.Literal("execve").annotate({ title: "ExecveGuardianApprovalReviewActionType" }), - }).annotate({ title: "ExecveGuardianApprovalReviewAction" }), - Schema.Struct({ - cwd: ServerNotification__AbsolutePathBuf, - files: Schema.Array(ServerNotification__AbsolutePathBuf), - type: Schema.Literal("applyPatch").annotate({ - title: "ApplyPatchGuardianApprovalReviewActionType", - }), - }).annotate({ title: "ApplyPatchGuardianApprovalReviewAction" }), - Schema.Struct({ - host: Schema.String, - port: Schema.Number.annotate({ format: "uint16" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - protocol: ServerNotification__NetworkApprovalProtocol, - target: Schema.String, - type: Schema.Literal("networkAccess").annotate({ - title: "NetworkAccessGuardianApprovalReviewActionType", - }), - }).annotate({ title: "NetworkAccessGuardianApprovalReviewAction" }), - Schema.Struct({ - connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - server: Schema.String, - toolName: Schema.String, - toolTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("mcpToolCall").annotate({ - title: "McpToolCallGuardianApprovalReviewActionType", - }), - }).annotate({ title: "McpToolCallGuardianApprovalReviewAction" }), - Schema.Struct({ - permissions: ServerNotification__RequestPermissionProfile, - reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("requestPermissions").annotate({ - title: "RequestPermissionsGuardianApprovalReviewActionType", - }), - }).annotate({ title: "RequestPermissionsGuardianApprovalReviewAction" }), - ], - { mode: "oneOf" }, -); - -export type ServerRequest__PermissionsRequestApprovalParams = { - readonly cwd: ServerRequest__AbsolutePathBuf; - readonly environmentId?: string | null; - readonly itemId: string; - readonly permissions: ServerRequest__RequestPermissionProfile; - readonly reason?: string | null; - readonly startedAtMs: number; - readonly threadId: string; - readonly turnId: string; -}; -export const ServerRequest__PermissionsRequestApprovalParams = Schema.Struct({ - cwd: ServerRequest__AbsolutePathBuf, - environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - itemId: Schema.String, - permissions: ServerRequest__RequestPermissionProfile, - reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this approval request started.", - format: "int64", - }).check(Schema.isInt()), - threadId: Schema.String, - turnId: Schema.String, -}); - export type ServerRequest__McpElicitationSchema = { readonly $schema?: string | null; readonly properties: { readonly [x: string]: ServerRequest__McpElicitationPrimitiveSchema }; @@ -31827,275 +24604,6 @@ export const ServerRequest__McpElicitationSchema = Schema.Struct({ "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.", }); -export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction = - | { - readonly command: string; - readonly cwd: V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf; - readonly source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource; - readonly type: "command"; - } - | { - readonly argv: ReadonlyArray; - readonly cwd: V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf; - readonly program: string; - readonly source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource; - readonly type: "execve"; - } - | { - readonly cwd: V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf; - readonly files: ReadonlyArray; - readonly type: "applyPatch"; - } - | { - readonly host: string; - readonly port: number; - readonly protocol: V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol; - readonly target: string; - readonly type: "networkAccess"; - } - | { - readonly connectorId?: string | null; - readonly connectorName?: string | null; - readonly server: string; - readonly toolName: string; - readonly toolTitle?: string | null; - readonly type: "mcpToolCall"; - } - | { - readonly permissions: V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile; - readonly reason?: string | null; - readonly type: "requestPermissions"; - }; -export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction = - Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - cwd: V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf, - source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource, - type: Schema.Literal("command").annotate({ - title: "CommandGuardianApprovalReviewActionType", - }), - }).annotate({ title: "CommandGuardianApprovalReviewAction" }), - Schema.Struct({ - argv: Schema.Array(Schema.String), - cwd: V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf, - program: Schema.String, - source: V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource, - type: Schema.Literal("execve").annotate({ - title: "ExecveGuardianApprovalReviewActionType", - }), - }).annotate({ title: "ExecveGuardianApprovalReviewAction" }), - Schema.Struct({ - cwd: V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf, - files: Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf), - type: Schema.Literal("applyPatch").annotate({ - title: "ApplyPatchGuardianApprovalReviewActionType", - }), - }).annotate({ title: "ApplyPatchGuardianApprovalReviewAction" }), - Schema.Struct({ - host: Schema.String, - port: Schema.Number.annotate({ format: "uint16" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - protocol: V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol, - target: Schema.String, - type: Schema.Literal("networkAccess").annotate({ - title: "NetworkAccessGuardianApprovalReviewActionType", - }), - }).annotate({ title: "NetworkAccessGuardianApprovalReviewAction" }), - Schema.Struct({ - connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - server: Schema.String, - toolName: Schema.String, - toolTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("mcpToolCall").annotate({ - title: "McpToolCallGuardianApprovalReviewActionType", - }), - }).annotate({ title: "McpToolCallGuardianApprovalReviewAction" }), - Schema.Struct({ - permissions: V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile, - reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("requestPermissions").annotate({ - title: "RequestPermissionsGuardianApprovalReviewActionType", - }), - }).annotate({ title: "RequestPermissionsGuardianApprovalReviewAction" }), - ], - { mode: "oneOf" }, - ); - -export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction = - | { - readonly command: string; - readonly cwd: V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf; - readonly source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource; - readonly type: "command"; - } - | { - readonly argv: ReadonlyArray; - readonly cwd: V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf; - readonly program: string; - readonly source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource; - readonly type: "execve"; - } - | { - readonly cwd: V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf; - readonly files: ReadonlyArray; - readonly type: "applyPatch"; - } - | { - readonly host: string; - readonly port: number; - readonly protocol: V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol; - readonly target: string; - readonly type: "networkAccess"; - } - | { - readonly connectorId?: string | null; - readonly connectorName?: string | null; - readonly server: string; - readonly toolName: string; - readonly toolTitle?: string | null; - readonly type: "mcpToolCall"; - } - | { - readonly permissions: V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile; - readonly reason?: string | null; - readonly type: "requestPermissions"; - }; -export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction = - Schema.Union( - [ - Schema.Struct({ - command: Schema.String, - cwd: V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf, - source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource, - type: Schema.Literal("command").annotate({ - title: "CommandGuardianApprovalReviewActionType", - }), - }).annotate({ title: "CommandGuardianApprovalReviewAction" }), - Schema.Struct({ - argv: Schema.Array(Schema.String), - cwd: V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf, - program: Schema.String, - source: V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource, - type: Schema.Literal("execve").annotate({ - title: "ExecveGuardianApprovalReviewActionType", - }), - }).annotate({ title: "ExecveGuardianApprovalReviewAction" }), - Schema.Struct({ - cwd: V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf, - files: Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf), - type: Schema.Literal("applyPatch").annotate({ - title: "ApplyPatchGuardianApprovalReviewActionType", - }), - }).annotate({ title: "ApplyPatchGuardianApprovalReviewAction" }), - Schema.Struct({ - host: Schema.String, - port: Schema.Number.annotate({ format: "uint16" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - protocol: V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol, - target: Schema.String, - type: Schema.Literal("networkAccess").annotate({ - title: "NetworkAccessGuardianApprovalReviewActionType", - }), - }).annotate({ title: "NetworkAccessGuardianApprovalReviewAction" }), - Schema.Struct({ - connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - connectorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - server: Schema.String, - toolName: Schema.String, - toolTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("mcpToolCall").annotate({ - title: "McpToolCallGuardianApprovalReviewActionType", - }), - }).annotate({ title: "McpToolCallGuardianApprovalReviewAction" }), - Schema.Struct({ - permissions: V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile, - reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("requestPermissions").annotate({ - title: "RequestPermissionsGuardianApprovalReviewActionType", - }), - }).annotate({ title: "RequestPermissionsGuardianApprovalReviewAction" }), - ], - { mode: "oneOf" }, - ); - -export type ServerNotification__ItemGuardianApprovalReviewCompletedNotification = { - readonly action: ServerNotification__GuardianApprovalReviewAction; - readonly completedAtMs: number; - readonly decisionSource: ServerNotification__AutoReviewDecisionSource; - readonly review: ServerNotification__GuardianApprovalReview; - readonly reviewId: string; - readonly startedAtMs: number; - readonly targetItemId?: string | null; - readonly threadId: string; - readonly turnId: string; -}; -export const ServerNotification__ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({ - action: ServerNotification__GuardianApprovalReviewAction, - completedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this review completed.", - format: "int64", - }).check(Schema.isInt()), - decisionSource: ServerNotification__AutoReviewDecisionSource, - review: ServerNotification__GuardianApprovalReview, - reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this review started.", - format: "int64", - }).check(Schema.isInt()), - targetItemId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.", - }), - Schema.Null, - ]), - ), - threadId: Schema.String, - turnId: Schema.String, -}).annotate({ - description: - "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", -}); - -export type ServerNotification__ItemGuardianApprovalReviewStartedNotification = { - readonly action: ServerNotification__GuardianApprovalReviewAction; - readonly review: ServerNotification__GuardianApprovalReview; - readonly reviewId: string; - readonly startedAtMs: number; - readonly targetItemId?: string | null; - readonly threadId: string; - readonly turnId: string; -}; -export const ServerNotification__ItemGuardianApprovalReviewStartedNotification = Schema.Struct({ - action: ServerNotification__GuardianApprovalReviewAction, - review: ServerNotification__GuardianApprovalReview, - reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this review started.", - format: "int64", - }).check(Schema.isInt()), - targetItemId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.", - }), - Schema.Null, - ]), - ), - threadId: Schema.String, - turnId: Schema.String, -}).annotate({ - description: - "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", -}); - export type ServerRequest__McpServerElicitationRequestParams = | { readonly _meta?: unknown; @@ -32106,15 +24614,6 @@ export type ServerRequest__McpServerElicitationRequestParams = readonly threadId: string; readonly turnId?: string | null; } - | { - readonly _meta?: unknown; - readonly message: string; - readonly mode: "openai/form"; - readonly requestedSchema: unknown; - readonly serverName: string; - readonly threadId: string; - readonly turnId?: string | null; - } | { readonly _meta?: unknown; readonly elicitationId: string; @@ -32144,23 +24643,6 @@ export const ServerRequest__McpServerElicitationRequestParams = Schema.Union( ]), ), }), - Schema.Struct({ - _meta: Schema.optionalKey(Schema.Unknown), - message: Schema.String, - mode: Schema.Literal("openai/form"), - requestedSchema: Schema.Unknown, - serverName: Schema.String, - threadId: Schema.String, - turnId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.", - }), - Schema.Null, - ]), - ), - }), Schema.Struct({ _meta: Schema.optionalKey(Schema.Unknown), elicitationId: Schema.String, @@ -32223,16 +24705,6 @@ export const ApplyPatchApprovalResponse = Schema.Struct({ decision: ApplyPatchApprovalResponse__ReviewDecision, }).annotate({ title: "ApplyPatchApprovalResponse" }); -export type AttestationGenerateParams = {}; -export const AttestationGenerateParams = Schema.Struct({}).annotate({ - title: "AttestationGenerateParams", -}); - -export type AttestationGenerateResponse = { readonly token: string }; -export const AttestationGenerateResponse = Schema.Struct({ - token: Schema.String.annotate({ description: "Opaque client attestation token." }), -}).annotate({ title: "AttestationGenerateResponse" }); - export type ChatgptAuthTokensRefreshParams = { readonly previousAccountId?: string | null; readonly reason: ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason; @@ -32297,11 +24769,6 @@ export type ClientRequest = readonly method: "thread/archive"; readonly params: ClientRequest__ThreadArchiveParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "thread/delete"; - readonly params: ClientRequest__ThreadDeleteParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "thread/unsubscribe"; @@ -32312,21 +24779,6 @@ export type ClientRequest = readonly method: "thread/name/set"; readonly params: ClientRequest__ThreadSetNameParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "thread/goal/set"; - readonly params: ClientRequest__ThreadGoalSetParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "thread/goal/get"; - readonly params: ClientRequest__ThreadGoalGetParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "thread/goal/clear"; - readonly params: ClientRequest__ThreadGoalClearParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "thread/metadata/update"; @@ -32347,11 +24799,6 @@ export type ClientRequest = readonly method: "thread/shellCommand"; readonly params: ClientRequest__ThreadShellCommandParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "thread/approveGuardianDeniedAction"; - readonly params: ClientRequest__ThreadApproveGuardianDeniedActionParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "thread/rollback"; @@ -32372,101 +24819,26 @@ export type ClientRequest = readonly method: "thread/read"; readonly params: ClientRequest__ThreadReadParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "thread/inject_items"; - readonly params: ClientRequest__ThreadInjectItemsParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "skills/list"; readonly params: ClientRequest__SkillsListParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "skills/extraRoots/set"; - readonly params: ClientRequest__SkillsExtraRootsSetParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "hooks/list"; - readonly params: ClientRequest__HooksListParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "marketplace/add"; - readonly params: ClientRequest__MarketplaceAddParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "marketplace/remove"; - readonly params: ClientRequest__MarketplaceRemoveParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "marketplace/upgrade"; - readonly params: ClientRequest__MarketplaceUpgradeParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "plugin/list"; readonly params: ClientRequest__PluginListParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/installed"; - readonly params: ClientRequest__PluginInstalledParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "plugin/read"; readonly params: ClientRequest__PluginReadParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/skill/read"; - readonly params: ClientRequest__PluginSkillReadParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/share/save"; - readonly params: ClientRequest__PluginShareSaveParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/share/updateTargets"; - readonly params: ClientRequest__PluginShareUpdateTargetsParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/share/list"; - readonly params: ClientRequest__PluginShareListParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/share/checkout"; - readonly params: ClientRequest__PluginShareCheckoutParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "plugin/share/delete"; - readonly params: ClientRequest__PluginShareDeleteParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "app/read"; - readonly params: ClientRequest__AppsReadParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "app/list"; readonly params: ClientRequest__AppsListParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "app/installed"; - readonly params: ClientRequest__AppsInstalledParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "fs/readFile"; @@ -32552,21 +24924,11 @@ export type ClientRequest = readonly method: "model/list"; readonly params: ClientRequest__ModelListParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "modelProvider/capabilities/read"; - readonly params: ClientRequest__ModelProviderCapabilitiesReadParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "experimentalFeature/list"; readonly params: ClientRequest__ExperimentalFeatureListParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "permissionProfile/list"; - readonly params: ClientRequest__PermissionProfileListParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "experimentalFeature/enablement/set"; @@ -32602,11 +24964,6 @@ export type ClientRequest = readonly method: "windowsSandbox/setupStart"; readonly params: ClientRequest__WindowsSandboxSetupStartParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "windowsSandbox/readiness"; - readonly params?: null; - } | { readonly id: ClientRequest__RequestId; readonly method: "account/login/start"; @@ -32627,26 +24984,6 @@ export type ClientRequest = readonly method: "account/rateLimits/read"; readonly params?: null; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "account/rateLimitResetCredit/consume"; - readonly params: ClientRequest__ConsumeAccountRateLimitResetCreditParams; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "account/usage/read"; - readonly params?: null; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "account/workspaceMessages/read"; - readonly params?: null; - } - | { - readonly id: ClientRequest__RequestId; - readonly method: "account/sendAddCreditsNudgeEmail"; - readonly params: ClientRequest__SendAddCreditsNudgeEmailParams; - } | { readonly id: ClientRequest__RequestId; readonly method: "feedback/upload"; @@ -32687,11 +25024,6 @@ export type ClientRequest = readonly method: "externalAgentConfig/import"; readonly params: ClientRequest__ExternalAgentConfigImportParams; } - | { - readonly id: ClientRequest__RequestId; - readonly method: "externalAgentConfig/import/readHistories"; - readonly params?: null; - } | { readonly id: ClientRequest__RequestId; readonly method: "config/value/write"; @@ -32744,11 +25076,6 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("thread/archive").annotate({ title: "Thread/archiveRequestMethod" }), params: ClientRequest__ThreadArchiveParams, }).annotate({ title: "Thread/archiveRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/delete").annotate({ title: "Thread/deleteRequestMethod" }), - params: ClientRequest__ThreadDeleteParams, - }).annotate({ title: "Thread/deleteRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("thread/unsubscribe").annotate({ @@ -32761,23 +25088,6 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("thread/name/set").annotate({ title: "Thread/name/setRequestMethod" }), params: ClientRequest__ThreadSetNameParams, }).annotate({ title: "Thread/name/setRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/goal/set").annotate({ title: "Thread/goal/setRequestMethod" }), - params: ClientRequest__ThreadGoalSetParams, - }).annotate({ title: "Thread/goal/setRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/goal/get").annotate({ title: "Thread/goal/getRequestMethod" }), - params: ClientRequest__ThreadGoalGetParams, - }).annotate({ title: "Thread/goal/getRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/goal/clear").annotate({ - title: "Thread/goal/clearRequestMethod", - }), - params: ClientRequest__ThreadGoalClearParams, - }).annotate({ title: "Thread/goal/clearRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("thread/metadata/update").annotate({ @@ -32806,13 +25116,6 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__ThreadShellCommandParams, }).annotate({ title: "Thread/shellCommandRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/approveGuardianDeniedAction").annotate({ - title: "Thread/approveGuardianDeniedActionRequestMethod", - }), - params: ClientRequest__ThreadApproveGuardianDeniedActionParams, - }).annotate({ title: "Thread/approveGuardianDeniedActionRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("thread/rollback").annotate({ title: "Thread/rollbackRequestMethod" }), @@ -32835,127 +25138,26 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("thread/read").annotate({ title: "Thread/readRequestMethod" }), params: ClientRequest__ThreadReadParams, }).annotate({ title: "Thread/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/inject_items").annotate({ - title: "Thread/injectItemsRequestMethod", - }), - params: ClientRequest__ThreadInjectItemsParams, - }).annotate({ - title: "Thread/injectItemsRequest", - description: - "Append raw Responses API items to the thread history without starting a user turn.", - }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("skills/list").annotate({ title: "Skills/listRequestMethod" }), params: ClientRequest__SkillsListParams, }).annotate({ title: "Skills/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("skills/extraRoots/set").annotate({ - title: "Skills/extraRoots/setRequestMethod", - }), - params: ClientRequest__SkillsExtraRootsSetParams, - }).annotate({ title: "Skills/extraRoots/setRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("hooks/list").annotate({ title: "Hooks/listRequestMethod" }), - params: ClientRequest__HooksListParams, - }).annotate({ title: "Hooks/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("marketplace/add").annotate({ title: "Marketplace/addRequestMethod" }), - params: ClientRequest__MarketplaceAddParams, - }).annotate({ title: "Marketplace/addRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("marketplace/remove").annotate({ - title: "Marketplace/removeRequestMethod", - }), - params: ClientRequest__MarketplaceRemoveParams, - }).annotate({ title: "Marketplace/removeRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("marketplace/upgrade").annotate({ - title: "Marketplace/upgradeRequestMethod", - }), - params: ClientRequest__MarketplaceUpgradeParams, - }).annotate({ title: "Marketplace/upgradeRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("plugin/list").annotate({ title: "Plugin/listRequestMethod" }), params: ClientRequest__PluginListParams, }).annotate({ title: "Plugin/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/installed").annotate({ - title: "Plugin/installedRequestMethod", - }), - params: ClientRequest__PluginInstalledParams, - }).annotate({ title: "Plugin/installedRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("plugin/read").annotate({ title: "Plugin/readRequestMethod" }), params: ClientRequest__PluginReadParams, }).annotate({ title: "Plugin/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/skill/read").annotate({ - title: "Plugin/skill/readRequestMethod", - }), - params: ClientRequest__PluginSkillReadParams, - }).annotate({ title: "Plugin/skill/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/share/save").annotate({ - title: "Plugin/share/saveRequestMethod", - }), - params: ClientRequest__PluginShareSaveParams, - }).annotate({ title: "Plugin/share/saveRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/share/updateTargets").annotate({ - title: "Plugin/share/updateTargetsRequestMethod", - }), - params: ClientRequest__PluginShareUpdateTargetsParams, - }).annotate({ title: "Plugin/share/updateTargetsRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/share/list").annotate({ - title: "Plugin/share/listRequestMethod", - }), - params: ClientRequest__PluginShareListParams, - }).annotate({ title: "Plugin/share/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/share/checkout").annotate({ - title: "Plugin/share/checkoutRequestMethod", - }), - params: ClientRequest__PluginShareCheckoutParams, - }).annotate({ title: "Plugin/share/checkoutRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("plugin/share/delete").annotate({ - title: "Plugin/share/deleteRequestMethod", - }), - params: ClientRequest__PluginShareDeleteParams, - }).annotate({ title: "Plugin/share/deleteRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("app/read").annotate({ title: "App/readRequestMethod" }), - params: ClientRequest__AppsReadParams, - }).annotate({ title: "App/readRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("app/list").annotate({ title: "App/listRequestMethod" }), params: ClientRequest__AppsListParams, }).annotate({ title: "App/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("app/installed").annotate({ title: "App/installedRequestMethod" }), - params: ClientRequest__AppsInstalledParams, - }).annotate({ title: "App/installedRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("fs/readFile").annotate({ title: "Fs/readFileRequestMethod" }), @@ -33049,13 +25251,6 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("model/list").annotate({ title: "Model/listRequestMethod" }), params: ClientRequest__ModelListParams, }).annotate({ title: "Model/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("modelProvider/capabilities/read").annotate({ - title: "ModelProvider/capabilities/readRequestMethod", - }), - params: ClientRequest__ModelProviderCapabilitiesReadParams, - }).annotate({ title: "ModelProvider/capabilities/readRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("experimentalFeature/list").annotate({ @@ -33063,13 +25258,6 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__ExperimentalFeatureListParams, }).annotate({ title: "ExperimentalFeature/listRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("permissionProfile/list").annotate({ - title: "PermissionProfile/listRequestMethod", - }), - params: ClientRequest__PermissionProfileListParams, - }).annotate({ title: "PermissionProfile/listRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("experimentalFeature/enablement/set").annotate({ @@ -33119,13 +25307,6 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__WindowsSandboxSetupStartParams, }).annotate({ title: "WindowsSandbox/setupStartRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("windowsSandbox/readiness").annotate({ - title: "WindowsSandbox/readinessRequestMethod", - }), - params: Schema.optionalKey(Schema.Null), - }).annotate({ title: "WindowsSandbox/readinessRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("account/login/start").annotate({ @@ -33152,34 +25333,6 @@ export const ClientRequest = Schema.Union( }), params: Schema.optionalKey(Schema.Null), }).annotate({ title: "Account/rateLimits/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("account/rateLimitResetCredit/consume").annotate({ - title: "Account/rateLimitResetCredit/consumeRequestMethod", - }), - params: ClientRequest__ConsumeAccountRateLimitResetCreditParams, - }).annotate({ title: "Account/rateLimitResetCredit/consumeRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("account/usage/read").annotate({ - title: "Account/usage/readRequestMethod", - }), - params: Schema.optionalKey(Schema.Null), - }).annotate({ title: "Account/usage/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("account/workspaceMessages/read").annotate({ - title: "Account/workspaceMessages/readRequestMethod", - }), - params: Schema.optionalKey(Schema.Null), - }).annotate({ title: "Account/workspaceMessages/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("account/sendAddCreditsNudgeEmail").annotate({ - title: "Account/sendAddCreditsNudgeEmailRequestMethod", - }), - params: ClientRequest__SendAddCreditsNudgeEmailParams, - }).annotate({ title: "Account/sendAddCreditsNudgeEmailRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("feedback/upload").annotate({ title: "Feedback/uploadRequestMethod" }), @@ -33243,13 +25396,6 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__ExternalAgentConfigImportParams, }).annotate({ title: "ExternalAgentConfig/importRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("externalAgentConfig/import/readHistories").annotate({ - title: "ExternalAgentConfig/import/readHistoriesRequestMethod", - }), - params: Schema.optionalKey(Schema.Null), - }).annotate({ title: "ExternalAgentConfig/import/readHistoriesRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("config/value/write").annotate({ @@ -33285,15 +25431,6 @@ export const ClientRequest = Schema.Union( { mode: "oneOf" }, ).annotate({ title: "ClientRequest", description: "Request from the client to the server." }); -export type ClientRequest__AdditionalContextEntry = { - readonly kind: ClientRequest__AdditionalContextKind; - readonly value: string; -}; -export const ClientRequest__AdditionalContextEntry = Schema.Struct({ - kind: ClientRequest__AdditionalContextKind, - value: Schema.String, -}); - export type ClientRequest__ByteRange = { readonly end: number; readonly start: number }; export const ClientRequest__ByteRange = Schema.Struct({ end: Schema.Number.annotate({ format: "uint" }) @@ -33304,36 +25441,6 @@ export const ClientRequest__ByteRange = Schema.Struct({ .check(Schema.isGreaterThanOrEqualTo(0)), }); -export type ClientRequest__CapabilityRootLocation = { - readonly environmentId: string; - readonly path: string; - readonly type: "environment"; -}; -export const ClientRequest__CapabilityRootLocation = Schema.Union( - [ - Schema.Struct({ - environmentId: Schema.String, - path: Schema.String.annotate({ - description: "Absolute path for the root in the selected environment.", - }), - type: Schema.Literal("environment").annotate({ - title: "EnvironmentCapabilityRootLocationType", - }), - }).annotate({ - title: "EnvironmentCapabilityRootLocation", - description: "A path owned by an execution environment.", - }), - ], - { mode: "oneOf" }, -).annotate({ description: "Location used to resolve a selected capability root." }); - -export type ClientRequest__CodexResponseHandoffMode = "thinking" | "commentary" | "bemTags"; -export const ClientRequest__CodexResponseHandoffMode = Schema.Literals([ - "thinking", - "commentary", - "bemTags", -]); - export type ClientRequest__CollaborationMode = { readonly mode: ClientRequest__ModeKind; readonly settings: ClientRequest__Settings; @@ -33343,78 +25450,44 @@ export const ClientRequest__CollaborationMode = Schema.Struct({ settings: ClientRequest__Settings, }).annotate({ description: "Collaboration mode for a Codex session." }); -export type ClientRequest__DynamicToolSpec = - | { - readonly deferLoading?: boolean; - readonly description: string; - readonly inputSchema: unknown; - readonly name: string; - readonly type: "function"; - } - | { - readonly description: string; - readonly name: string; - readonly tools: ReadonlyArray; - readonly type: "namespace"; - }; -export const ClientRequest__DynamicToolSpec = Schema.Union( - [ - Schema.Struct({ - deferLoading: Schema.optionalKey(Schema.Boolean), - description: Schema.String, - inputSchema: Schema.Unknown, - name: Schema.String, - type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolSpecType" }), - }).annotate({ title: "FunctionDynamicToolSpec" }), - Schema.Struct({ - description: Schema.String, - name: Schema.String, - tools: Schema.Array(ClientRequest__DynamicToolNamespaceTool), - type: Schema.Literal("namespace").annotate({ title: "NamespaceDynamicToolSpecType" }), - }).annotate({ title: "NamespaceDynamicToolSpec" }), - ], - { mode: "oneOf" }, -); - -export type ClientRequest__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const ClientRequest__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", +export type ClientRequest__DynamicToolSpec = { + readonly deferLoading?: boolean; + readonly description: string; + readonly inputSchema: unknown; + readonly name: string; +}; +export const ClientRequest__DynamicToolSpec = Schema.Struct({ + deferLoading: Schema.optionalKey(Schema.Boolean), + description: Schema.String, + inputSchema: Schema.Unknown, + name: Schema.String, }); export type ClientRequest__NetworkAccess = "restricted" | "enabled"; export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type ClientRequest__ProcessTerminalSize = { readonly cols: number; readonly rows: number }; -export const ClientRequest__ProcessTerminalSize = Schema.Struct({ - cols: Schema.Number.annotate({ - description: "Terminal width in character cells.", - format: "uint16", - }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - rows: Schema.Number.annotate({ - description: "Terminal height in character cells.", - format: "uint16", - }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), -}).annotate({ description: "PTY size in character cells for `process/spawn` PTY sessions." }); - -export type ClientRequest__RealtimeConversationVersion = "v1" | "v2" | "v3"; -export const ClientRequest__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]); - -export type ClientRequest__RealtimeOutputModality = "text" | "audio"; -export const ClientRequest__RealtimeOutputModality = Schema.Literals(["text", "audio"]); +export type ClientRequest__ReadOnlyAccess = + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; +export const ClientRequest__ReadOnlyAccess = Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + readableRoots: Schema.optionalKey( + Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, +); export type ClientRequest__RealtimeVoice = | "alloy" @@ -33458,38 +25531,18 @@ export const ClientRequest__RealtimeVoice = Schema.Literals([ "verse", ]); -export type ClientRequest__RemoteControlDisableParams = { readonly ephemeral?: boolean }; -export const ClientRequest__RemoteControlDisableParams = Schema.Struct({ - ephemeral: Schema.optionalKey(Schema.Boolean), -}); - -export type ClientRequest__RemoteControlEnableParams = { readonly ephemeral?: boolean }; -export const ClientRequest__RemoteControlEnableParams = Schema.Struct({ - ephemeral: Schema.optionalKey(Schema.Boolean), -}); - export type ClientRequest__ResponseItem = | { readonly content: ReadonlyArray; + readonly end_turn?: boolean | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly phase?: ClientRequest__MessagePhase | null; readonly role: string; readonly type: "message"; } - | { - readonly author: string; - readonly content: ReadonlyArray; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; - readonly recipient: string; - readonly type: "agent_message"; - } | { readonly content?: ReadonlyArray | null; readonly encrypted_content?: string | null; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly summary: ReadonlyArray; readonly type: "reasoning"; } @@ -33497,7 +25550,6 @@ export type ClientRequest__ResponseItem = readonly action: ClientRequest__LocalShellAction; readonly call_id?: string | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly status: ClientRequest__LocalShellStatus; readonly type: "local_shell_call"; } @@ -33505,7 +25557,6 @@ export type ClientRequest__ResponseItem = readonly arguments: string; readonly call_id: string; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly name: string; readonly namespace?: string | null; readonly type: "function_call"; @@ -33515,14 +25566,11 @@ export type ClientRequest__ResponseItem = readonly call_id?: string | null; readonly execution: string; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly status?: string | null; readonly type: "tool_search_call"; } | { readonly call_id: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly output: ClientRequest__FunctionCallOutputBody; readonly type: "function_call_output"; } @@ -33530,16 +25578,12 @@ export type ClientRequest__ResponseItem = readonly call_id: string; readonly id?: string | null; readonly input: string; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly name: string; - readonly namespace?: string | null; readonly status?: string | null; readonly type: "custom_tool_call"; } | { readonly call_id: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly name?: string | null; readonly output: ClientRequest__FunctionCallOutputBody; readonly type: "custom_tool_call_output"; @@ -33547,8 +25591,6 @@ export type ClientRequest__ResponseItem = | { readonly call_id?: string | null; readonly execution: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly status: string; readonly tools: ReadonlyArray; readonly type: "tool_search_output"; @@ -33556,63 +25598,36 @@ export type ClientRequest__ResponseItem = | { readonly action?: ClientRequest__ResponsesApiWebSearchAction | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; readonly status?: string | null; readonly type: "web_search_call"; } | { - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; + readonly id: string; readonly result: string; readonly revised_prompt?: string | null; readonly status: string; readonly type: "image_generation_call"; } - | { - readonly encrypted_content: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; - readonly type: "compaction"; - } - | { readonly type: "compaction_trigger" } - | { - readonly encrypted_content?: string | null; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null; - readonly type: "context_compaction"; - } + | { readonly ghost_commit: ClientRequest__GhostCommit; readonly type: "ghost_snapshot" } + | { readonly encrypted_content: string; readonly type: "compaction" } | { readonly type: "other" }; export const ClientRequest__ResponseItem = Schema.Union( [ Schema.Struct({ content: Schema.Array(ClientRequest__ContentItem), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), + end_turn: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), phase: Schema.optionalKey(Schema.Union([ClientRequest__MessagePhase, Schema.Null])), role: Schema.String, type: Schema.Literal("message").annotate({ title: "MessageResponseItemType" }), }).annotate({ title: "MessageResponseItem" }), - Schema.Struct({ - author: Schema.String, - content: Schema.Array(ClientRequest__AgentMessageInputContent), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), - recipient: Schema.String, - type: Schema.Literal("agent_message").annotate({ title: "AgentMessageResponseItemType" }), - }).annotate({ title: "AgentMessageResponseItem" }), Schema.Struct({ content: Schema.optionalKey( Schema.Union([Schema.Array(ClientRequest__ReasoningItemContent), Schema.Null]), ), encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), summary: Schema.Array(ClientRequest__ReasoningItemReasoningSummary), type: Schema.Literal("reasoning").annotate({ title: "ReasoningResponseItemType" }), }).annotate({ title: "ReasoningResponseItem" }), @@ -33628,13 +25643,11 @@ export const ClientRequest__ResponseItem = Schema.Union( Schema.Union([ Schema.String.annotate({ description: "Legacy id field retained for compatibility with older payloads.", + writeOnly: true, }), Schema.Null, ]), ), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), status: ClientRequest__LocalShellStatus, type: Schema.Literal("local_shell_call").annotate({ title: "LocalShellCallResponseItemType", @@ -33643,9 +25656,8 @@ export const ClientRequest__ResponseItem = Schema.Union( Schema.Struct({ arguments: Schema.String, call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), name: Schema.String, namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -33655,9 +25667,8 @@ export const ClientRequest__ResponseItem = Schema.Union( arguments: Schema.Unknown, call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), execution: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("tool_search_call").annotate({ @@ -33666,10 +25677,6 @@ export const ClientRequest__ResponseItem = Schema.Union( }).annotate({ title: "ToolSearchCallResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), output: ClientRequest__FunctionCallOutputBody, type: Schema.Literal("function_call_output").annotate({ title: "FunctionCallOutputResponseItemType", @@ -33677,13 +25684,11 @@ export const ClientRequest__ResponseItem = Schema.Union( }).annotate({ title: "FunctionCallOutputResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - input: Schema.String, - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), + input: Schema.String, name: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("custom_tool_call").annotate({ title: "CustomToolCallResponseItemType", @@ -33691,10 +25696,6 @@ export const ClientRequest__ResponseItem = Schema.Union( }).annotate({ title: "CustomToolCallResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), output: ClientRequest__FunctionCallOutputBody, type: Schema.Literal("custom_tool_call_output").annotate({ @@ -33704,10 +25705,6 @@ export const ClientRequest__ResponseItem = Schema.Union( Schema.Struct({ call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), execution: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), status: Schema.String, tools: Schema.Array(Schema.Unknown), type: Schema.Literal("tool_search_output").annotate({ @@ -33718,18 +25715,14 @@ export const ClientRequest__ResponseItem = Schema.Union( action: Schema.optionalKey( Schema.Union([ClientRequest__ResponsesApiWebSearchAction, Schema.Null]), ), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("web_search_call").annotate({ title: "WebSearchCallResponseItemType" }), }).annotate({ title: "WebSearchCallResponseItem" }), Schema.Struct({ - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), + id: Schema.String, result: Schema.String, revised_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, @@ -33737,29 +25730,14 @@ export const ClientRequest__ResponseItem = Schema.Union( title: "ImageGenerationCallResponseItemType", }), }).annotate({ title: "ImageGenerationCallResponseItem" }), + Schema.Struct({ + ghost_commit: ClientRequest__GhostCommit, + type: Schema.Literal("ghost_snapshot").annotate({ title: "GhostSnapshotResponseItemType" }), + }).annotate({ title: "GhostSnapshotResponseItem" }), Schema.Struct({ encrypted_content: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }), }).annotate({ title: "CompactionResponseItem" }), - Schema.Struct({ - type: Schema.Literal("compaction_trigger").annotate({ - title: "CompactionTriggerResponseItemType", - }), - }).annotate({ title: "CompactionTriggerResponseItem" }), - Schema.Struct({ - encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), - type: Schema.Literal("context_compaction").annotate({ - title: "ContextCompactionResponseItemType", - }), - }).annotate({ title: "ContextCompactionResponseItem" }), Schema.Struct({ type: Schema.Literal("other").annotate({ title: "OtherResponseItemType" }), }).annotate({ title: "OtherResponseItem" }), @@ -33767,45 +25745,6 @@ export const ClientRequest__ResponseItem = Schema.Union( { mode: "oneOf" }, ); -export type ClientRequest__SelectedCapabilityRoot = { - readonly id: string; - readonly location: { - readonly environmentId: string; - readonly path: string; - readonly type: "environment"; - }; -}; -export const ClientRequest__SelectedCapabilityRoot = Schema.Struct({ - id: Schema.String.annotate({ - description: "Stable identifier supplied by the capability selection platform.", - }), - location: Schema.Union( - [ - Schema.Struct({ - environmentId: Schema.String, - path: Schema.String.annotate({ - description: "Absolute path for the root in the selected environment.", - }), - type: Schema.Literal("environment").annotate({ - title: "EnvironmentCapabilityRootLocationType", - }), - }).annotate({ - title: "EnvironmentCapabilityRootLocation", - description: "A path owned by an execution environment.", - }), - ], - { mode: "oneOf" }, - ).annotate({ description: "Location used to resolve a selected capability root." }), -}).annotate({ - description: "A user-selected root that can expose one or more runtime capabilities.", -}); - -export type ClientRequest__ThreadHistoryMode = "legacy" | "paginated"; -export const ClientRequest__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - -export type ClientRequest__ThreadMemoryMode = "enabled" | "disabled"; -export const ClientRequest__ThreadMemoryMode = Schema.Literals(["enabled", "disabled"]); - export type ClientRequest__ThreadRealtimeAudioChunk = { readonly data: string; readonly itemId?: string | null; @@ -33832,17 +25771,6 @@ export const ClientRequest__ThreadRealtimeAudioChunk = Schema.Struct({ ), }).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." }); -export type ClientRequest__ThreadRealtimeInitialItem = { - readonly role: ClientRequest__ConversationTextRole; - readonly text: string; -}; -export const ClientRequest__ThreadRealtimeInitialItem = Schema.Struct({ - role: ClientRequest__ConversationTextRole, - text: Schema.String, -}).annotate({ - description: "EXPERIMENTAL - role-bearing text item included when a realtime V3 session starts.", -}); - export type ClientRequest__ThreadRealtimeStartTransport = | { readonly type: "websocket" } | { readonly sdp: string; readonly type: "webrtc" }; @@ -33864,62 +25792,16 @@ export const ClientRequest__ThreadRealtimeStartTransport = Schema.Union( { mode: "oneOf" }, ).annotate({ description: "EXPERIMENTAL - transport used by thread realtime." }); -export type ClientRequest__ThreadResumeInitialTurnsPageParams = { - readonly itemsView?: ClientRequest__TurnItemsView | null; - readonly limit?: number | null; - readonly sortDirection?: ClientRequest__SortDirection | null; -}; -export const ClientRequest__ThreadResumeInitialTurnsPageParams = Schema.Struct({ - itemsView: Schema.optionalKey( - Schema.Union([ClientRequest__TurnItemsView, Schema.Null]).annotate({ - description: "How much item detail to include for each returned turn; defaults to summary.", - }), - ), - limit: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ description: "Optional turn page size.", format: "uint32" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), - sortDirection: Schema.optionalKey( - Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({ - description: "Optional turn pagination direction; defaults to descending.", - }), - ), -}); - -export type ClientRequest__TurnEnvironmentParams = { - readonly cwd: ClientRequest__LegacyAppPathString; - readonly environmentId: string; - readonly runtimeWorkspaceRoots?: ReadonlyArray | null; -}; -export const ClientRequest__TurnEnvironmentParams = Schema.Struct({ - cwd: ClientRequest__LegacyAppPathString, - environmentId: Schema.String, - runtimeWorkspaceRoots: Schema.optionalKey( - Schema.Union([ - Schema.Array(ClientRequest__LegacyAppPathString).annotate({ - description: "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", - }), - Schema.Null, - ]), - ), -}); - export type CommandExecutionRequestApprovalParams = { readonly approvalId?: string | null; readonly command?: string | null; readonly commandActions?: ReadonlyArray | null; - readonly cwd?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null; - readonly environmentId?: string | null; + readonly cwd?: string | null; readonly itemId: string; readonly networkApprovalContext?: CommandExecutionRequestApprovalParams__NetworkApprovalContext | null; readonly proposedExecpolicyAmendment?: ReadonlyArray | null; readonly proposedNetworkPolicyAmendments?: ReadonlyArray | null; readonly reason?: string | null; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; @@ -33949,13 +25831,7 @@ export const CommandExecutionRequestApprovalParams = Schema.Struct({ ), cwd: Schema.optionalKey( Schema.Union([ - CommandExecutionRequestApprovalParams__LegacyAppPathString, - Schema.Null, - ]).annotate({ description: "The command's working directory." }), - ), - environmentId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ description: "Environment in which the command will run." }), + Schema.String.annotate({ description: "The command's working directory." }), Schema.Null, ]), ), @@ -33992,10 +25868,6 @@ export const CommandExecutionRequestApprovalParams = Schema.Struct({ Schema.Null, ]), ), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this approval request started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }).annotate({ title: "CommandExecutionRequestApprovalParams" }); @@ -34015,7 +25887,7 @@ export const CommandExecutionRequestApprovalParams__AdditionalPermissionProfile Schema.Union([ CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null, - ]).annotate({ description: "Partial overlay used for per-command permission requests." }), + ]), ), }); @@ -34078,7 +25950,6 @@ export const CommandExecutionRequestApprovalResponse = Schema.Struct({ export type DynamicToolCallParams = { readonly arguments: unknown; readonly callId: string; - readonly namespace?: string | null; readonly threadId: string; readonly tool: string; readonly turnId: string; @@ -34086,7 +25957,6 @@ export type DynamicToolCallParams = { export const DynamicToolCallParams = Schema.Struct({ arguments: Schema.Unknown, callId: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, tool: Schema.String, turnId: Schema.String, @@ -34139,7 +26009,6 @@ export type FileChangeRequestApprovalParams = { readonly grantRoot?: string | null; readonly itemId: string; readonly reason?: string | null; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; @@ -34162,10 +26031,6 @@ export const FileChangeRequestApprovalParams = Schema.Struct({ Schema.Null, ]), ), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this approval request started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }).annotate({ title: "FileChangeRequestApprovalParams" }); @@ -34339,15 +26204,6 @@ export type McpServerElicitationRequestParams = readonly threadId: string; readonly turnId?: string | null; } - | { - readonly _meta?: unknown; - readonly message: string; - readonly mode: "openai/form"; - readonly requestedSchema: unknown; - readonly serverName: string; - readonly threadId: string; - readonly turnId?: string | null; - } | { readonly _meta?: unknown; readonly elicitationId: string; @@ -34377,23 +26233,6 @@ export const McpServerElicitationRequestParams = Schema.Union( ]), ), }).annotate({ title: "McpServerElicitationRequestParams" }), - Schema.Struct({ - _meta: Schema.optionalKey(Schema.Unknown), - message: Schema.String, - mode: Schema.Literal("openai/form"), - requestedSchema: Schema.Unknown, - serverName: Schema.String, - threadId: Schema.String, - turnId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.", - }), - Schema.Null, - ]), - ), - }).annotate({ title: "McpServerElicitationRequestParams" }), Schema.Struct({ _meta: Schema.optionalKey(Schema.Unknown), elicitationId: Schema.String, @@ -34437,25 +26276,16 @@ export const McpServerElicitationRequestResponse = Schema.Struct({ }).annotate({ title: "McpServerElicitationRequestResponse" }); export type PermissionsRequestApprovalParams = { - readonly cwd: PermissionsRequestApprovalParams__AbsolutePathBuf; - readonly environmentId?: string | null; readonly itemId: string; readonly permissions: PermissionsRequestApprovalParams__RequestPermissionProfile; readonly reason?: string | null; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; export const PermissionsRequestApprovalParams = Schema.Struct({ - cwd: PermissionsRequestApprovalParams__AbsolutePathBuf, - environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), itemId: Schema.String, permissions: PermissionsRequestApprovalParams__RequestPermissionProfile, reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this approval request started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }).annotate({ title: "PermissionsRequestApprovalParams" }); @@ -34463,20 +26293,10 @@ export const PermissionsRequestApprovalParams = Schema.Struct({ export type PermissionsRequestApprovalResponse = { readonly permissions: PermissionsRequestApprovalResponse__GrantedPermissionProfile; readonly scope?: "turn" | "session"; - readonly strictAutoReview?: boolean | null; }; export const PermissionsRequestApprovalResponse = Schema.Struct({ permissions: PermissionsRequestApprovalResponse__GrantedPermissionProfile, scope: Schema.optionalKey(Schema.Literals(["turn", "session"]).annotate({ default: "turn" })), - strictAutoReview: Schema.optionalKey( - Schema.Union([ - Schema.Boolean.annotate({ - description: - "Review every subsequent command in this turn before normal sandboxed execution.", - }), - Schema.Null, - ]), - ), }).annotate({ title: "PermissionsRequestApprovalResponse" }); export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session"; @@ -34492,1469 +26312,532 @@ export const RequestId = Schema.Union([ ]).annotate({ title: "RequestId" }); export type ServerNotification = - | { - readonly method: "error"; - readonly params: ServerNotification__ErrorNotification; - readonly emittedAtMs?: number; - } + | { readonly method: "error"; readonly params: ServerNotification__ErrorNotification } | { readonly method: "thread/started"; readonly params: ServerNotification__ThreadStartedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/status/changed"; readonly params: ServerNotification__ThreadStatusChangedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/archived"; readonly params: ServerNotification__ThreadArchivedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/deleted"; - readonly params: ServerNotification__ThreadDeletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/unarchived"; readonly params: ServerNotification__ThreadUnarchivedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/closed"; readonly params: ServerNotification__ThreadClosedNotification; - readonly emittedAtMs?: number; } | { readonly method: "skills/changed"; readonly params: ServerNotification__SkillsChangedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/name/updated"; readonly params: ServerNotification__ThreadNameUpdatedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/goal/updated"; - readonly params: ServerNotification__ThreadGoalUpdatedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/goal/cleared"; - readonly params: ServerNotification__ThreadGoalClearedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/environment/connected"; - readonly params: ServerNotification__EnvironmentConnectionNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/environment/disconnected"; - readonly params: ServerNotification__EnvironmentConnectionNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/settings/updated"; - readonly params: ServerNotification__ThreadSettingsUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/tokenUsage/updated"; readonly params: ServerNotification__ThreadTokenUsageUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "turn/started"; readonly params: ServerNotification__TurnStartedNotification; - readonly emittedAtMs?: number; } | { readonly method: "hook/started"; readonly params: ServerNotification__HookStartedNotification; - readonly emittedAtMs?: number; } | { readonly method: "turn/completed"; readonly params: ServerNotification__TurnCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "hook/completed"; readonly params: ServerNotification__HookCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "turn/diff/updated"; readonly params: ServerNotification__TurnDiffUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "turn/plan/updated"; readonly params: ServerNotification__TurnPlanUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/started"; readonly params: ServerNotification__ItemStartedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/autoApprovalReview/started"; readonly params: ServerNotification__ItemGuardianApprovalReviewStartedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/autoApprovalReview/completed"; readonly params: ServerNotification__ItemGuardianApprovalReviewCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/completed"; readonly params: ServerNotification__ItemCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/agentMessage/delta"; readonly params: ServerNotification__AgentMessageDeltaNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/plan/delta"; readonly params: ServerNotification__PlanDeltaNotification; - readonly emittedAtMs?: number; } | { readonly method: "command/exec/outputDelta"; readonly params: ServerNotification__CommandExecOutputDeltaNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "process/outputDelta"; - readonly params: ServerNotification__ProcessOutputDeltaNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "process/exited"; - readonly params: ServerNotification__ProcessExitedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/commandExecution/outputDelta"; readonly params: ServerNotification__CommandExecutionOutputDeltaNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/commandExecution/terminalInteraction"; readonly params: ServerNotification__TerminalInteractionNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/fileChange/outputDelta"; readonly params: ServerNotification__FileChangeOutputDeltaNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "item/fileChange/patchUpdated"; - readonly params: ServerNotification__FileChangePatchUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "serverRequest/resolved"; readonly params: ServerNotification__ServerRequestResolvedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/mcpToolCall/progress"; readonly params: ServerNotification__McpToolCallProgressNotification; - readonly emittedAtMs?: number; } | { readonly method: "mcpServer/oauthLogin/completed"; readonly params: ServerNotification__McpServerOauthLoginCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "mcpServer/startupStatus/updated"; readonly params: ServerNotification__McpServerStatusUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "account/updated"; readonly params: ServerNotification__AccountUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "account/rateLimits/updated"; readonly params: ServerNotification__AccountRateLimitsUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "app/list/updated"; readonly params: ServerNotification__AppListUpdatedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "remoteControl/status/changed"; - readonly params: ServerNotification__RemoteControlStatusChangedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "externalAgentConfig/import/progress"; - readonly params: ServerNotification__ExternalAgentConfigImportProgressNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "externalAgentConfig/import/completed"; - readonly params: ServerNotification__ExternalAgentConfigImportCompletedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "fs/changed"; - readonly params: ServerNotification__FsChangedNotification; - readonly emittedAtMs?: number; } + | { readonly method: "fs/changed"; readonly params: ServerNotification__FsChangedNotification } | { readonly method: "item/reasoning/summaryTextDelta"; readonly params: ServerNotification__ReasoningSummaryTextDeltaNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/reasoning/summaryPartAdded"; readonly params: ServerNotification__ReasoningSummaryPartAddedNotification; - readonly emittedAtMs?: number; } | { readonly method: "item/reasoning/textDelta"; readonly params: ServerNotification__ReasoningTextDeltaNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/compacted"; readonly params: ServerNotification__ContextCompactedNotification; - readonly emittedAtMs?: number; } | { readonly method: "model/rerouted"; readonly params: ServerNotification__ModelReroutedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "model/verification"; - readonly params: ServerNotification__ModelVerificationNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "turn/moderationMetadata"; - readonly params: ServerNotification__TurnModerationMetadataNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "model/safetyBuffering/updated"; - readonly params: ServerNotification__ModelSafetyBufferingUpdatedNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "warning"; - readonly params: ServerNotification__WarningNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "guardianWarning"; - readonly params: ServerNotification__GuardianWarningNotification; - readonly emittedAtMs?: number; } | { readonly method: "deprecationNotice"; readonly params: ServerNotification__DeprecationNoticeNotification; - readonly emittedAtMs?: number; } | { readonly method: "configWarning"; readonly params: ServerNotification__ConfigWarningNotification; - readonly emittedAtMs?: number; } | { readonly method: "fuzzyFileSearch/sessionUpdated"; readonly params: ServerNotification__FuzzyFileSearchSessionUpdatedNotification; - readonly emittedAtMs?: number; } | { readonly method: "fuzzyFileSearch/sessionCompleted"; readonly params: ServerNotification__FuzzyFileSearchSessionCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/started"; readonly params: ServerNotification__ThreadRealtimeStartedNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/itemAdded"; readonly params: ServerNotification__ThreadRealtimeItemAddedNotification; - readonly emittedAtMs?: number; } | { - readonly method: "thread/realtime/transcript/delta"; - readonly params: ServerNotification__ThreadRealtimeTranscriptDeltaNotification; - readonly emittedAtMs?: number; - } - | { - readonly method: "thread/realtime/transcript/done"; - readonly params: ServerNotification__ThreadRealtimeTranscriptDoneNotification; - readonly emittedAtMs?: number; + readonly method: "thread/realtime/transcriptUpdated"; + readonly params: ServerNotification__ThreadRealtimeTranscriptUpdatedNotification; } | { readonly method: "thread/realtime/outputAudio/delta"; readonly params: ServerNotification__ThreadRealtimeOutputAudioDeltaNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/sdp"; readonly params: ServerNotification__ThreadRealtimeSdpNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/error"; readonly params: ServerNotification__ThreadRealtimeErrorNotification; - readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/closed"; readonly params: ServerNotification__ThreadRealtimeClosedNotification; - readonly emittedAtMs?: number; } | { readonly method: "windows/worldWritableWarning"; readonly params: ServerNotification__WindowsWorldWritableWarningNotification; - readonly emittedAtMs?: number; } | { readonly method: "windowsSandbox/setupCompleted"; readonly params: ServerNotification__WindowsSandboxSetupCompletedNotification; - readonly emittedAtMs?: number; } | { readonly method: "account/login/completed"; readonly params: ServerNotification__AccountLoginCompletedNotification; - readonly emittedAtMs?: number; }; export const ServerNotification = Schema.Union( [ Schema.Struct({ method: Schema.Literal("error").annotate({ title: "ErrorNotificationMethod" }), params: ServerNotification__ErrorNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "ErrorNotification", description: "NEW NOTIFICATIONS" }), Schema.Struct({ method: Schema.Literal("thread/started").annotate({ title: "Thread/startedNotificationMethod", }), params: ServerNotification__ThreadStartedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/startedNotification" }), Schema.Struct({ method: Schema.Literal("thread/status/changed").annotate({ title: "Thread/status/changedNotificationMethod", }), params: ServerNotification__ThreadStatusChangedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/status/changedNotification" }), Schema.Struct({ method: Schema.Literal("thread/archived").annotate({ title: "Thread/archivedNotificationMethod", }), params: ServerNotification__ThreadArchivedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/deleted").annotate({ - title: "Thread/deletedNotificationMethod", - }), - params: ServerNotification__ThreadDeletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/archivedNotification" }), Schema.Struct({ method: Schema.Literal("thread/unarchived").annotate({ title: "Thread/unarchivedNotificationMethod", }), params: ServerNotification__ThreadUnarchivedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/unarchivedNotification" }), Schema.Struct({ method: Schema.Literal("thread/closed").annotate({ title: "Thread/closedNotificationMethod", }), params: ServerNotification__ThreadClosedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/closedNotification" }), Schema.Struct({ method: Schema.Literal("skills/changed").annotate({ title: "Skills/changedNotificationMethod", }), params: ServerNotification__SkillsChangedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Skills/changedNotification" }), Schema.Struct({ method: Schema.Literal("thread/name/updated").annotate({ title: "Thread/name/updatedNotificationMethod", }), params: ServerNotification__ThreadNameUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/goal/updated").annotate({ - title: "Thread/goal/updatedNotificationMethod", - }), - params: ServerNotification__ThreadGoalUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/goal/cleared").annotate({ - title: "Thread/goal/clearedNotificationMethod", - }), - params: ServerNotification__ThreadGoalClearedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/environment/connected").annotate({ - title: "Thread/environment/connectedNotificationMethod", - }), - params: ServerNotification__EnvironmentConnectionNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/environment/disconnected").annotate({ - title: "Thread/environment/disconnectedNotificationMethod", - }), - params: ServerNotification__EnvironmentConnectionNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/settings/updated").annotate({ - title: "Thread/settings/updatedNotificationMethod", - }), - params: ServerNotification__ThreadSettingsUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/name/updatedNotification" }), Schema.Struct({ method: Schema.Literal("thread/tokenUsage/updated").annotate({ title: "Thread/tokenUsage/updatedNotificationMethod", }), params: ServerNotification__ThreadTokenUsageUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/tokenUsage/updatedNotification" }), Schema.Struct({ method: Schema.Literal("turn/started").annotate({ title: "Turn/startedNotificationMethod" }), params: ServerNotification__TurnStartedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Turn/startedNotification" }), Schema.Struct({ method: Schema.Literal("hook/started").annotate({ title: "Hook/startedNotificationMethod" }), params: ServerNotification__HookStartedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Hook/startedNotification" }), Schema.Struct({ method: Schema.Literal("turn/completed").annotate({ title: "Turn/completedNotificationMethod", }), params: ServerNotification__TurnCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Turn/completedNotification" }), Schema.Struct({ method: Schema.Literal("hook/completed").annotate({ title: "Hook/completedNotificationMethod", }), params: ServerNotification__HookCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Hook/completedNotification" }), Schema.Struct({ method: Schema.Literal("turn/diff/updated").annotate({ title: "Turn/diff/updatedNotificationMethod", }), params: ServerNotification__TurnDiffUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Turn/diff/updatedNotification" }), Schema.Struct({ method: Schema.Literal("turn/plan/updated").annotate({ title: "Turn/plan/updatedNotificationMethod", }), params: ServerNotification__TurnPlanUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Turn/plan/updatedNotification" }), Schema.Struct({ method: Schema.Literal("item/started").annotate({ title: "Item/startedNotificationMethod" }), params: ServerNotification__ItemStartedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/startedNotification" }), Schema.Struct({ method: Schema.Literal("item/autoApprovalReview/started").annotate({ title: "Item/autoApprovalReview/startedNotificationMethod", }), params: ServerNotification__ItemGuardianApprovalReviewStartedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/autoApprovalReview/startedNotification" }), Schema.Struct({ method: Schema.Literal("item/autoApprovalReview/completed").annotate({ title: "Item/autoApprovalReview/completedNotificationMethod", }), params: ServerNotification__ItemGuardianApprovalReviewCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/autoApprovalReview/completedNotification" }), Schema.Struct({ method: Schema.Literal("item/completed").annotate({ title: "Item/completedNotificationMethod", }), params: ServerNotification__ItemCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/completedNotification" }), Schema.Struct({ method: Schema.Literal("item/agentMessage/delta").annotate({ title: "Item/agentMessage/deltaNotificationMethod", }), params: ServerNotification__AgentMessageDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/agentMessage/deltaNotification" }), Schema.Struct({ method: Schema.Literal("item/plan/delta").annotate({ title: "Item/plan/deltaNotificationMethod", }), params: ServerNotification__PlanDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", + title: "Item/plan/deltaNotification", + description: "EXPERIMENTAL - proposed plan streaming deltas for plan items.", }), Schema.Struct({ method: Schema.Literal("command/exec/outputDelta").annotate({ title: "Command/exec/outputDeltaNotificationMethod", }), params: ServerNotification__CommandExecOutputDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("process/outputDelta").annotate({ - title: "Process/outputDeltaNotificationMethod", - }), - params: ServerNotification__ProcessOutputDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("process/exited").annotate({ - title: "Process/exitedNotificationMethod", - }), - params: ServerNotification__ProcessExitedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", + title: "Command/exec/outputDeltaNotification", + description: + "Stream base64-encoded stdout/stderr chunks for a running `command/exec` session.", }), Schema.Struct({ method: Schema.Literal("item/commandExecution/outputDelta").annotate({ title: "Item/commandExecution/outputDeltaNotificationMethod", }), params: ServerNotification__CommandExecutionOutputDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/commandExecution/outputDeltaNotification" }), Schema.Struct({ method: Schema.Literal("item/commandExecution/terminalInteraction").annotate({ title: "Item/commandExecution/terminalInteractionNotificationMethod", }), params: ServerNotification__TerminalInteractionNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/commandExecution/terminalInteractionNotification" }), Schema.Struct({ method: Schema.Literal("item/fileChange/outputDelta").annotate({ title: "Item/fileChange/outputDeltaNotificationMethod", }), params: ServerNotification__FileChangeOutputDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("item/fileChange/patchUpdated").annotate({ - title: "Item/fileChange/patchUpdatedNotificationMethod", - }), - params: ServerNotification__FileChangePatchUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/fileChange/outputDeltaNotification" }), Schema.Struct({ method: Schema.Literal("serverRequest/resolved").annotate({ title: "ServerRequest/resolvedNotificationMethod", }), params: ServerNotification__ServerRequestResolvedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "ServerRequest/resolvedNotification" }), Schema.Struct({ method: Schema.Literal("item/mcpToolCall/progress").annotate({ title: "Item/mcpToolCall/progressNotificationMethod", }), params: ServerNotification__McpToolCallProgressNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/mcpToolCall/progressNotification" }), Schema.Struct({ method: Schema.Literal("mcpServer/oauthLogin/completed").annotate({ title: "McpServer/oauthLogin/completedNotificationMethod", }), params: ServerNotification__McpServerOauthLoginCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "McpServer/oauthLogin/completedNotification" }), Schema.Struct({ method: Schema.Literal("mcpServer/startupStatus/updated").annotate({ title: "McpServer/startupStatus/updatedNotificationMethod", }), params: ServerNotification__McpServerStatusUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "McpServer/startupStatus/updatedNotification" }), Schema.Struct({ method: Schema.Literal("account/updated").annotate({ title: "Account/updatedNotificationMethod", }), params: ServerNotification__AccountUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Account/updatedNotification" }), Schema.Struct({ method: Schema.Literal("account/rateLimits/updated").annotate({ title: "Account/rateLimits/updatedNotificationMethod", }), params: ServerNotification__AccountRateLimitsUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Account/rateLimits/updatedNotification" }), Schema.Struct({ method: Schema.Literal("app/list/updated").annotate({ title: "App/list/updatedNotificationMethod", }), params: ServerNotification__AppListUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("remoteControl/status/changed").annotate({ - title: "RemoteControl/status/changedNotificationMethod", - }), - params: ServerNotification__RemoteControlStatusChangedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("externalAgentConfig/import/progress").annotate({ - title: "ExternalAgentConfig/import/progressNotificationMethod", - }), - params: ServerNotification__ExternalAgentConfigImportProgressNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("externalAgentConfig/import/completed").annotate({ - title: "ExternalAgentConfig/import/completedNotificationMethod", - }), - params: ServerNotification__ExternalAgentConfigImportCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "App/list/updatedNotification" }), Schema.Struct({ method: Schema.Literal("fs/changed").annotate({ title: "Fs/changedNotificationMethod" }), params: ServerNotification__FsChangedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Fs/changedNotification" }), Schema.Struct({ method: Schema.Literal("item/reasoning/summaryTextDelta").annotate({ title: "Item/reasoning/summaryTextDeltaNotificationMethod", }), params: ServerNotification__ReasoningSummaryTextDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/reasoning/summaryTextDeltaNotification" }), Schema.Struct({ method: Schema.Literal("item/reasoning/summaryPartAdded").annotate({ title: "Item/reasoning/summaryPartAddedNotificationMethod", }), params: ServerNotification__ReasoningSummaryPartAddedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/reasoning/summaryPartAddedNotification" }), Schema.Struct({ method: Schema.Literal("item/reasoning/textDelta").annotate({ title: "Item/reasoning/textDeltaNotificationMethod", }), params: ServerNotification__ReasoningTextDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Item/reasoning/textDeltaNotification" }), Schema.Struct({ method: Schema.Literal("thread/compacted").annotate({ title: "Thread/compactedNotificationMethod", }), params: ServerNotification__ContextCompactedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", + title: "Thread/compactedNotification", + description: "Deprecated: Use `ContextCompaction` item type instead.", }), Schema.Struct({ method: Schema.Literal("model/rerouted").annotate({ title: "Model/reroutedNotificationMethod", }), params: ServerNotification__ModelReroutedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("model/verification").annotate({ - title: "Model/verificationNotificationMethod", - }), - params: ServerNotification__ModelVerificationNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("turn/moderationMetadata").annotate({ - title: "Turn/moderationMetadataNotificationMethod", - }), - params: ServerNotification__TurnModerationMetadataNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("model/safetyBuffering/updated").annotate({ - title: "Model/safetyBuffering/updatedNotificationMethod", - }), - params: ServerNotification__ModelSafetyBufferingUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("warning").annotate({ title: "WarningNotificationMethod" }), - params: ServerNotification__WarningNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("guardianWarning").annotate({ - title: "GuardianWarningNotificationMethod", - }), - params: ServerNotification__GuardianWarningNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Model/reroutedNotification" }), Schema.Struct({ method: Schema.Literal("deprecationNotice").annotate({ title: "DeprecationNoticeNotificationMethod", }), params: ServerNotification__DeprecationNoticeNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "DeprecationNoticeNotification" }), Schema.Struct({ method: Schema.Literal("configWarning").annotate({ title: "ConfigWarningNotificationMethod", }), params: ServerNotification__ConfigWarningNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "ConfigWarningNotification" }), Schema.Struct({ method: Schema.Literal("fuzzyFileSearch/sessionUpdated").annotate({ title: "FuzzyFileSearch/sessionUpdatedNotificationMethod", }), params: ServerNotification__FuzzyFileSearchSessionUpdatedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "FuzzyFileSearch/sessionUpdatedNotification" }), Schema.Struct({ method: Schema.Literal("fuzzyFileSearch/sessionCompleted").annotate({ title: "FuzzyFileSearch/sessionCompletedNotificationMethod", }), params: ServerNotification__FuzzyFileSearchSessionCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "FuzzyFileSearch/sessionCompletedNotification" }), Schema.Struct({ method: Schema.Literal("thread/realtime/started").annotate({ title: "Thread/realtime/startedNotificationMethod", }), params: ServerNotification__ThreadRealtimeStartedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/realtime/startedNotification" }), Schema.Struct({ method: Schema.Literal("thread/realtime/itemAdded").annotate({ title: "Thread/realtime/itemAddedNotificationMethod", }), params: ServerNotification__ThreadRealtimeItemAddedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/realtime/itemAddedNotification" }), Schema.Struct({ - method: Schema.Literal("thread/realtime/transcript/delta").annotate({ - title: "Thread/realtime/transcript/deltaNotificationMethod", + method: Schema.Literal("thread/realtime/transcriptUpdated").annotate({ + title: "Thread/realtime/transcriptUpdatedNotificationMethod", }), - params: ServerNotification__ThreadRealtimeTranscriptDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), - Schema.Struct({ - method: Schema.Literal("thread/realtime/transcript/done").annotate({ - title: "Thread/realtime/transcript/doneNotificationMethod", - }), - params: ServerNotification__ThreadRealtimeTranscriptDoneNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + params: ServerNotification__ThreadRealtimeTranscriptUpdatedNotification, + }).annotate({ title: "Thread/realtime/transcriptUpdatedNotification" }), Schema.Struct({ method: Schema.Literal("thread/realtime/outputAudio/delta").annotate({ title: "Thread/realtime/outputAudio/deltaNotificationMethod", }), params: ServerNotification__ThreadRealtimeOutputAudioDeltaNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/realtime/outputAudio/deltaNotification" }), Schema.Struct({ method: Schema.Literal("thread/realtime/sdp").annotate({ title: "Thread/realtime/sdpNotificationMethod", }), params: ServerNotification__ThreadRealtimeSdpNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/realtime/sdpNotification" }), Schema.Struct({ method: Schema.Literal("thread/realtime/error").annotate({ title: "Thread/realtime/errorNotificationMethod", }), params: ServerNotification__ThreadRealtimeErrorNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/realtime/errorNotification" }), Schema.Struct({ method: Schema.Literal("thread/realtime/closed").annotate({ title: "Thread/realtime/closedNotificationMethod", }), params: ServerNotification__ThreadRealtimeClosedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Thread/realtime/closedNotification" }), Schema.Struct({ method: Schema.Literal("windows/worldWritableWarning").annotate({ title: "Windows/worldWritableWarningNotificationMethod", }), params: ServerNotification__WindowsWorldWritableWarningNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", + title: "Windows/worldWritableWarningNotification", + description: + "Notifies the user of world-writable directories on Windows, which cannot be protected by the sandbox.", }), Schema.Struct({ method: Schema.Literal("windowsSandbox/setupCompleted").annotate({ title: "WindowsSandbox/setupCompletedNotificationMethod", }), params: ServerNotification__WindowsSandboxSetupCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "WindowsSandbox/setupCompletedNotification" }), Schema.Struct({ method: Schema.Literal("account/login/completed").annotate({ title: "Account/login/completedNotificationMethod", }), params: ServerNotification__AccountLoginCompletedNotification, - emittedAtMs: Schema.optionalKey( - Schema.Number.annotate({ - description: - "Unix timestamp (in milliseconds) when app-server emitted this notification.", - format: "int64", - }).check(Schema.isInt()), - ), - }).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", - }), + }).annotate({ title: "Account/login/completedNotification" }), ], { mode: "oneOf" }, -); +).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", +}); export type ServerNotification__ByteRange = { readonly end: number; readonly start: number }; export const ServerNotification__ByteRange = Schema.Struct({ @@ -36005,56 +26888,6 @@ export const ServerNotification__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); -export type ServerNotification__HookSource = - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; -export const ServerNotification__HookSource = Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", -]); - -export type ServerNotification__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const ServerNotification__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - -export type ServerNotification__NetworkAccess = "restricted" | "enabled"; -export const ServerNotification__NetworkAccess = Schema.Literals(["restricted", "enabled"]); - -export type ServerNotification__ProcessOutputStream = "stdout" | "stderr"; -export const ServerNotification__ProcessOutputStream = Schema.Literals([ - "stdout", - "stderr", -]).annotate({ description: "Stream label for `process/outputDelta` notifications." }); - export type ServerNotification__SessionSource = | "cli" | "vscode" @@ -36074,17 +26907,6 @@ export const ServerNotification__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type ServerNotification__ThreadExtra = {}; -export const ServerNotification__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type ServerNotification__ThreadHistoryMode = "legacy" | "paginated"; -export const ServerNotification__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - -export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full"; -export const ServerNotification__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]); - export type ServerRequest = | { readonly id: ServerRequest__RequestId; @@ -36121,11 +26943,6 @@ export type ServerRequest = readonly method: "account/chatgptAuthTokens/refresh"; readonly params: ServerRequest__ChatgptAuthTokensRefreshParams; } - | { - readonly id: ServerRequest__RequestId; - readonly method: "attestation/generate"; - readonly params: ServerRequest__AttestationGenerateParams; - } | { readonly id: ServerRequest__RequestId; readonly method: "applyPatchApproval"; @@ -36205,16 +27022,6 @@ export const ServerRequest = Schema.Union( }), params: ServerRequest__ChatgptAuthTokensRefreshParams, }).annotate({ title: "Account/chatgptAuthTokens/refreshRequest" }), - Schema.Struct({ - id: ServerRequest__RequestId, - method: Schema.Literal("attestation/generate").annotate({ - title: "Attestation/generateRequestMethod", - }), - params: ServerRequest__AttestationGenerateParams, - }).annotate({ - title: "Attestation/generateRequest", - description: "Generate a fresh upstream attestation result on demand.", - }), Schema.Struct({ id: ServerRequest__RequestId, method: Schema.Literal("applyPatchApproval").annotate({ @@ -36253,9 +27060,7 @@ export const ServerRequest__AdditionalPermissionProfile = Schema.Struct({ Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]), ), network: Schema.optionalKey( - Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]).annotate({ - description: "Partial overlay used for per-command permission requests.", - }), + Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]), ), }); @@ -36309,21 +27114,12 @@ export const ServerRequest__CommandExecutionApprovalDecision = Schema.Union( ); export type ToolRequestUserInputParams = { - readonly autoResolutionMs?: number | null; readonly itemId: string; readonly questions: ReadonlyArray; readonly threadId: string; readonly turnId: string; }; export const ToolRequestUserInputParams = Schema.Struct({ - autoResolutionMs: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint64" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), itemId: Schema.String, questions: Schema.Array(ToolRequestUserInputParams__ToolRequestUserInputQuestion), threadId: Schema.String, @@ -36400,11 +27196,7 @@ export type V2AccountRateLimitsUpdatedNotification = { }; export const V2AccountRateLimitsUpdatedNotification = Schema.Struct({ rateLimits: V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot, -}).annotate({ - title: "AccountRateLimitsUpdatedNotification", - description: - "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.", -}); +}).annotate({ title: "AccountRateLimitsUpdatedNotification" }); export type V2AccountUpdatedNotification = { readonly authMode?: V2AccountUpdatedNotification__AuthMode | null; @@ -36438,40 +27230,6 @@ export const V2AppListUpdatedNotification = Schema.Struct({ description: "EXPERIMENTAL - notification emitted when the app list changes.", }); -export type V2AppsInstalledParams = { - readonly forceRefresh?: boolean; - readonly threadId?: string | null; -}; -export const V2AppsInstalledParams = Schema.Struct({ - forceRefresh: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.", - }), - ), - threadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional loaded thread id used to evaluate effective app configuration.", - }), - Schema.Null, - ]), - ), -}).annotate({ - title: "AppsInstalledParams", - description: "Read the committed installed connector runtime snapshot.", -}); - -export type V2AppsInstalledResponse = { - readonly apps: ReadonlyArray; -}; -export const V2AppsInstalledResponse = Schema.Struct({ - apps: Schema.Array(V2AppsInstalledResponse__InstalledApp), -}).annotate({ - title: "AppsInstalledResponse", - description: "The installed connectors in one committed runtime snapshot.", -}); - export type V2AppsListParams = { readonly cursor?: string | null; readonly forceRefetch?: boolean; @@ -36534,35 +27292,6 @@ export const V2AppsListResponse = Schema.Struct({ ), }).annotate({ title: "AppsListResponse", description: "EXPERIMENTAL - app list response." }); -export type V2AppsReadParams = { - readonly appIds: ReadonlyArray; - readonly includeTools?: boolean; -}; -export const V2AppsReadParams = Schema.Struct({ - appIds: Schema.Array(Schema.String).annotate({ - description: - "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.", - }), - includeTools: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "When true, include display-only public tool summaries in the returned metadata.", - }), - ), -}).annotate({ - title: "AppsReadParams", - description: "EXPERIMENTAL - read metadata for specific apps/connectors.", -}); - -export type V2AppsReadResponse = { - readonly apps: ReadonlyArray; - readonly missingAppIds: ReadonlyArray; -}; -export const V2AppsReadResponse = Schema.Struct({ - apps: Schema.Array(V2AppsReadResponse__ConnectorMetadata), - missingAppIds: Schema.Array(Schema.String), -}).annotate({ title: "AppsReadResponse", description: "EXPERIMENTAL - app/read response." }); - export type V2CancelLoginAccountParams = { readonly loginId: string }; export const V2CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String }).annotate({ title: "CancelLoginAccountParams", @@ -36678,7 +27407,7 @@ export const V2CommandExecParams = Schema.Struct({ sandboxPolicy: Schema.optionalKey( Schema.Union([V2CommandExecParams__SandboxPolicy, Schema.Null]).annotate({ description: - "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted. Cannot be combined with `permissionProfile`.", + "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted.", }), ), size: Schema.optionalKey( @@ -36722,6 +27451,29 @@ export const V2CommandExecParams = Schema.Struct({ export type V2CommandExecParams__NetworkAccess = "restricted" | "enabled"; export const V2CommandExecParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]); +export type V2CommandExecParams__ReadOnlyAccess = + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; +export const V2CommandExecParams__ReadOnlyAccess = Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + readableRoots: Schema.optionalKey( + Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, +); + export type V2CommandExecResizeParams = { readonly processId: string; readonly size: { readonly cols: number; readonly rows: number }; @@ -36896,7 +27648,7 @@ export const V2ConfigReadParams = Schema.Struct({ Schema.Null, ]), ), - includeLayers: Schema.optionalKey(Schema.Boolean), + includeLayers: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }).annotate({ title: "ConfigReadParams" }); export type V2ConfigReadResponse = { @@ -36913,7 +27665,6 @@ export const V2ConfigReadResponse = Schema.Struct({ }).annotate({ title: "ConfigReadResponse" }); export type V2ConfigReadResponse__AppConfig = { - readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null; readonly default_tools_approval_mode?: V2ConfigReadResponse__AppToolApproval | null; readonly default_tools_enabled?: boolean | null; readonly destructive_enabled?: boolean | null; @@ -36922,9 +27673,6 @@ export type V2ConfigReadResponse__AppConfig = { readonly tools?: V2ConfigReadResponse__AppToolsConfig | null; }; export const V2ConfigReadResponse__AppConfig = Schema.Struct({ - approvals_reviewer: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__ApprovalsReviewer, Schema.Null]), - ), default_tools_approval_mode: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__AppToolApproval, Schema.Null]), ), @@ -36967,52 +27715,13 @@ export const V2ConfigRequirementsReadResponse = Schema.Struct({ ), }).annotate({ title: "ConfigRequirementsReadResponse" }); -export type V2ConfigRequirementsReadResponse__ApprovalsReviewer = - | "user" - | "auto_review" - | "guardian_subagent"; +export type V2ConfigRequirementsReadResponse__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ConfigRequirementsReadResponse__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", -}); - -export type V2ConfigRequirementsReadResponse__ManagedHooksRequirements = { - readonly PermissionRequest: ReadonlyArray; - readonly PostCompact: ReadonlyArray; - readonly PostToolUse: ReadonlyArray; - readonly PreCompact: ReadonlyArray; - readonly PreToolUse: ReadonlyArray; - readonly SessionEnd?: ReadonlyArray; - readonly SessionStart: ReadonlyArray; - readonly Stop: ReadonlyArray; - readonly SubagentStart: ReadonlyArray; - readonly SubagentStop: ReadonlyArray; - readonly UserPromptSubmit: ReadonlyArray; - readonly managedDir?: string | null; - readonly windowsManagedDir?: string | null; -}; -export const V2ConfigRequirementsReadResponse__ManagedHooksRequirements = Schema.Struct({ - PermissionRequest: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - PostCompact: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - PostToolUse: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - PreCompact: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - PreToolUse: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - SessionEnd: Schema.optionalKey( - Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup).annotate({ - default: [], - }), - ), - SessionStart: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - Stop: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - SubagentStart: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - SubagentStop: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - UserPromptSubmit: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), - managedDir: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - windowsManagedDir: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ConfigRequirementsReadResponse__NetworkRequirements = { @@ -37020,6 +27729,7 @@ export type V2ConfigRequirementsReadResponse__NetworkRequirements = { readonly allowUnixSockets?: ReadonlyArray | null; readonly allowUpstreamProxy?: boolean | null; readonly allowedDomains?: ReadonlyArray | null; + readonly dangerFullAccessDenylistOnly?: boolean | null; readonly dangerouslyAllowAllUnixSockets?: boolean | null; readonly dangerouslyAllowNonLoopbackProxy?: boolean | null; readonly deniedDomains?: ReadonlyArray | null; @@ -37053,6 +27763,7 @@ export const V2ConfigRequirementsReadResponse__NetworkRequirements = Schema.Stru Schema.Null, ]), ), + dangerFullAccessDenylistOnly: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), dangerouslyAllowAllUnixSockets: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), dangerouslyAllowNonLoopbackProxy: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), deniedDomains: Schema.optionalKey( @@ -37181,33 +27892,6 @@ export const V2ConfigWriteResponse = Schema.Struct({ version: Schema.String, }).annotate({ title: "ConfigWriteResponse" }); -export type V2ConsumeAccountRateLimitResetCreditParams = { - readonly creditId?: string | null; - readonly idempotencyKey: string; -}; -export const V2ConsumeAccountRateLimitResetCreditParams = Schema.Struct({ - creditId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.", - }), - Schema.Null, - ]), - ), - idempotencyKey: Schema.String.annotate({ - description: - "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.", - }), -}).annotate({ title: "ConsumeAccountRateLimitResetCreditParams" }); - -export type V2ConsumeAccountRateLimitResetCreditResponse = { - readonly outcome: V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome; -}; -export const V2ConsumeAccountRateLimitResetCreditResponse = Schema.Struct({ - outcome: V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome, -}).annotate({ title: "ConsumeAccountRateLimitResetCreditResponse" }); - export type V2ContextCompactedNotification = { readonly threadId: string; readonly turnId: string }; export const V2ContextCompactedNotification = Schema.Struct({ threadId: Schema.String, @@ -37233,15 +27917,6 @@ export const V2DeprecationNoticeNotification = Schema.Struct({ summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }), }).annotate({ title: "DeprecationNoticeNotification" }); -export type V2EnvironmentConnectionNotification = { - readonly environmentId: string; - readonly threadId: string; -}; -export const V2EnvironmentConnectionNotification = Schema.Struct({ - environmentId: Schema.String, - threadId: Schema.String, -}).annotate({ title: "EnvironmentConnectionNotification" }); - export type V2ErrorNotification = { readonly error: V2ErrorNotification__TurnError; readonly threadId: string; @@ -37277,7 +27952,6 @@ export const V2ExperimentalFeatureEnablementSetResponse = Schema.Struct({ export type V2ExperimentalFeatureListParams = { readonly cursor?: string | null; readonly limit?: number | null; - readonly threadId?: string | null; }; export const V2ExperimentalFeatureListParams = Schema.Struct({ cursor: Schema.optionalKey( @@ -37299,15 +27973,6 @@ export const V2ExperimentalFeatureListParams = Schema.Struct({ Schema.Null, ]), ), - threadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.", - }), - Schema.Null, - ]), - ), }).annotate({ title: "ExperimentalFeatureListParams" }); export type V2ExperimentalFeatureListResponse = { @@ -37344,8 +28009,6 @@ export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schem export type V2ExternalAgentConfigDetectParams = { readonly cwds?: ReadonlyArray | null; readonly includeHome?: boolean; - readonly migrationSource?: string | null; - readonly source?: string | null; }; export const V2ExternalAgentConfigDetectParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -37358,27 +28021,9 @@ export const V2ExternalAgentConfigDetectParams = Schema.Struct({ ), includeHome: Schema.optionalKey( Schema.Boolean.annotate({ - description: "If true, include detection under the user's home directory.", + description: "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", }), ), - migrationSource: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional migration-source selector. Missing or unrecognized values use the default source.", - }), - Schema.Null, - ]), - ), - source: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.", - }), - Schema.Null, - ]), - ), }).annotate({ title: "ExternalAgentConfigDetectParams" }); export type V2ExternalAgentConfigDetectResponse = { @@ -37388,88 +28033,30 @@ export const V2ExternalAgentConfigDetectResponse = Schema.Struct({ items: Schema.Array(V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem), }).annotate({ title: "ExternalAgentConfigDetectResponse" }); -export type V2ExternalAgentConfigImportCompletedNotification = { - readonly importId: string; - readonly itemTypeResults: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportCompletedNotification = Schema.Struct({ - importId: Schema.String, - itemTypeResults: Schema.Array( - V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportTypeResult, - ), -}).annotate({ title: "ExternalAgentConfigImportCompletedNotification" }); - -export type V2ExternalAgentConfigImportHistoriesReadResponse = { - readonly connectors: ReadonlyArray; - readonly data: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportHistoriesReadResponse = Schema.Struct({ - connectors: Schema.Array( - V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate, - ), - data: Schema.Array( - V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory, - ), -}).annotate({ title: "ExternalAgentConfigImportHistoriesReadResponse" }); - export type V2ExternalAgentConfigImportParams = { readonly migrationItems: ReadonlyArray; - readonly migrationSource?: string | null; - readonly source?: string | null; }; export const V2ExternalAgentConfigImportParams = Schema.Struct({ migrationItems: Schema.Array(V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem), - migrationSource: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.", - }), - Schema.Null, - ]), - ), - source: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional identifier for the product that initiated the import.", - }), - Schema.Null, - ]), - ), }).annotate({ title: "ExternalAgentConfigImportParams" }); -export type V2ExternalAgentConfigImportProgressNotification = { - readonly importId: string; - readonly itemTypeResults: ReadonlyArray; -}; -export const V2ExternalAgentConfigImportProgressNotification = Schema.Struct({ - importId: Schema.String, - itemTypeResults: Schema.Array( - V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportTypeResult, - ), -}).annotate({ title: "ExternalAgentConfigImportProgressNotification" }); - -export type V2ExternalAgentConfigImportResponse = { readonly importId: string }; -export const V2ExternalAgentConfigImportResponse = Schema.Struct({ - importId: Schema.String, -}).annotate({ title: "ExternalAgentConfigImportResponse" }); +export type V2ExternalAgentConfigImportResponse = {}; +export const V2ExternalAgentConfigImportResponse = Schema.Struct({}).annotate({ + title: "ExternalAgentConfigImportResponse", +}); export type V2FeedbackUploadParams = { readonly classification: string; readonly extraLogFiles?: ReadonlyArray | null; - readonly includeLogs?: boolean; + readonly includeLogs: boolean; readonly reason?: string | null; - readonly tags?: { readonly [x: string]: string } | null; readonly threadId?: string | null; }; export const V2FeedbackUploadParams = Schema.Struct({ classification: Schema.String, extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), - includeLogs: Schema.optionalKey(Schema.Boolean), + includeLogs: Schema.Boolean, reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - tags: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]), - ), threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "FeedbackUploadParams" }); @@ -37489,24 +28076,7 @@ export const V2FileChangeOutputDeltaNotification = Schema.Struct({ itemId: Schema.String, threadId: Schema.String, turnId: Schema.String, -}).annotate({ - title: "FileChangeOutputDeltaNotification", - description: - "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.", -}); - -export type V2FileChangePatchUpdatedNotification = { - readonly changes: ReadonlyArray; - readonly itemId: string; - readonly threadId: string; - readonly turnId: string; -}; -export const V2FileChangePatchUpdatedNotification = Schema.Struct({ - changes: Schema.Array(V2FileChangePatchUpdatedNotification__FileUpdateChange), - itemId: Schema.String, - threadId: Schema.String, - turnId: Schema.String, -}).annotate({ title: "FileChangePatchUpdatedNotification" }); +}).annotate({ title: "FileChangeOutputDeltaNotification" }); export type V2FsChangedNotification = { readonly changedPaths: ReadonlyArray; @@ -37615,7 +28185,6 @@ export type V2FsGetMetadataResponse = { readonly createdAtMs: number; readonly isDirectory: boolean; readonly isFile: boolean; - readonly isSymlink: boolean; readonly modifiedAtMs: number; }; export const V2FsGetMetadataResponse = Schema.Struct({ @@ -37624,11 +28193,10 @@ export const V2FsGetMetadataResponse = Schema.Struct({ format: "int64", }).check(Schema.isInt()), isDirectory: Schema.Boolean.annotate({ - description: "Whether the path resolves to a directory.", + description: "Whether the path currently resolves to a directory.", }), - isFile: Schema.Boolean.annotate({ description: "Whether the path resolves to a regular file." }), - isSymlink: Schema.Boolean.annotate({ - description: "Whether the path itself is a symbolic link.", + isFile: Schema.Boolean.annotate({ + description: "Whether the path currently resolves to a regular file.", }), modifiedAtMs: Schema.Number.annotate({ description: "File modification time in Unix milliseconds when available, otherwise `0`.", @@ -37810,38 +28378,29 @@ export const V2GetAccountParams = Schema.Struct({ Schema.Boolean.annotate({ description: "When `true`, requests a proactive token refresh before returning.\n\nIn 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`.", + default: false, }), ), }).annotate({ title: "GetAccountParams" }); export type V2GetAccountRateLimitsResponse = { - readonly rateLimitResetCredits?: V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary | null; readonly rateLimits: { readonly credits?: V2GetAccountRateLimitsResponse__CreditsSnapshot | null; - readonly individualLimit?: V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot | null; readonly limitId?: string | null; readonly limitName?: string | null; readonly planType?: V2GetAccountRateLimitsResponse__PlanType | null; readonly primary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; - readonly rateLimitReachedType?: V2GetAccountRateLimitsResponse__RateLimitReachedType | null; readonly secondary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; - readonly spendControlReached?: boolean | null; }; readonly rateLimitsByLimitId?: { readonly [x: string]: V2GetAccountRateLimitsResponse__RateLimitSnapshot; } | null; }; export const V2GetAccountRateLimitsResponse = Schema.Struct({ - rateLimitResetCredits: Schema.optionalKey( - Schema.Union([V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary, Schema.Null]), - ), rateLimits: Schema.Struct({ credits: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__CreditsSnapshot, Schema.Null]), ), - individualLimit: Schema.optionalKey( - Schema.Union([V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot, Schema.Null]), - ), limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), planType: Schema.optionalKey( @@ -37850,21 +28409,9 @@ export const V2GetAccountRateLimitsResponse = Schema.Struct({ primary: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]), ), - rateLimitReachedType: Schema.optionalKey( - Schema.Union([V2GetAccountRateLimitsResponse__RateLimitReachedType, Schema.Null]), - ), secondary: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]), ), - spendControlReached: Schema.optionalKey( - Schema.Union([ - Schema.Boolean.annotate({ - description: - "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", - }), - Schema.Null, - ]), - ), }).annotate({ description: "Backward-compatible single-bucket view; mirrors the historical payload.", }), @@ -37887,41 +28434,6 @@ export const V2GetAccountResponse = Schema.Struct({ requiresOpenaiAuth: Schema.Boolean, }).annotate({ title: "GetAccountResponse" }); -export type V2GetAccountTokenUsageResponse = { - readonly dailyUsageBuckets?: ReadonlyArray | null; - readonly summary: V2GetAccountTokenUsageResponse__AccountTokenUsageSummary; -}; -export const V2GetAccountTokenUsageResponse = Schema.Struct({ - dailyUsageBuckets: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket), - Schema.Null, - ]), - ), - summary: V2GetAccountTokenUsageResponse__AccountTokenUsageSummary, -}).annotate({ title: "GetAccountTokenUsageResponse" }); - -export type V2GetWorkspaceMessagesResponse = { - readonly featureEnabled: boolean; - readonly messages: ReadonlyArray; -}; -export const V2GetWorkspaceMessagesResponse = Schema.Struct({ - featureEnabled: Schema.Boolean.annotate({ - description: "Whether the workspace-message backend route is available for this client.", - }), - messages: Schema.Array(V2GetWorkspaceMessagesResponse__WorkspaceMessage).annotate({ - description: "Active workspace messages returned by the backend.", - }), -}).annotate({ title: "GetWorkspaceMessagesResponse" }); - -export type V2GuardianWarningNotification = { readonly message: string; readonly threadId: string }; -export const V2GuardianWarningNotification = Schema.Struct({ - message: Schema.String.annotate({ - description: "Concise guardian warning message for the user.", - }), - threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }), -}).annotate({ title: "GuardianWarningNotification" }); - export type V2HookCompletedNotification = { readonly run: V2HookCompletedNotification__HookRunSummary; readonly threadId: string; @@ -37933,48 +28445,6 @@ export const V2HookCompletedNotification = Schema.Struct({ turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "HookCompletedNotification" }); -export type V2HookCompletedNotification__HookSource = - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; -export const V2HookCompletedNotification__HookSource = Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", -]); - -export type V2HooksListParams = { readonly cwds?: ReadonlyArray }; -export const V2HooksListParams = Schema.Struct({ - cwds: Schema.optionalKey( - Schema.Array(Schema.String).annotate({ - description: "When empty, defaults to the current session working directory.", - }), - ), -}).annotate({ title: "HooksListParams" }); - -export type V2HooksListResponse = { - readonly data: ReadonlyArray; -}; -export const V2HooksListResponse = Schema.Struct({ - data: Schema.Array(V2HooksListResponse__HooksListEntry), -}).annotate({ title: "HooksListResponse" }); - export type V2HookStartedNotification = { readonly run: V2HookStartedNotification__HookRunSummary; readonly threadId: string; @@ -37986,43 +28456,12 @@ export const V2HookStartedNotification = Schema.Struct({ turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "HookStartedNotification" }); -export type V2HookStartedNotification__HookSource = - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "cloudManagedConfig" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; -export const V2HookStartedNotification__HookSource = Schema.Literals([ - "system", - "user", - "project", - "mdm", - "sessionFlags", - "plugin", - "cloudRequirements", - "cloudManagedConfig", - "legacyManagedConfigFile", - "legacyManagedConfigMdm", - "unknown", -]); - export type V2ItemCompletedNotification = { - readonly completedAtMs: number; readonly item: V2ItemCompletedNotification__ThreadItem; readonly threadId: string; readonly turnId: string; }; export const V2ItemCompletedNotification = Schema.Struct({ - completedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this item lifecycle completed.", - format: "int64", - }).check(Schema.isInt()), item: V2ItemCompletedNotification__ThreadItem, threadId: Schema.String, turnId: Schema.String, @@ -38079,28 +28518,18 @@ export const V2ItemCompletedNotification__CommandExecutionSource = Schema.Litera export type V2ItemGuardianApprovalReviewCompletedNotification = { readonly action: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction; - readonly completedAtMs: number; readonly decisionSource: V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource; readonly review: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview; readonly reviewId: string; - readonly startedAtMs: number; readonly targetItemId?: string | null; readonly threadId: string; readonly turnId: string; }; export const V2ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({ action: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction, - completedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this review completed.", - format: "int64", - }).check(Schema.isInt()), decisionSource: V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource, review: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview, reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this review started.", - format: "int64", - }).check(Schema.isInt()), targetItemId: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ @@ -38115,14 +28544,13 @@ export const V2ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({ }).annotate({ title: "ItemGuardianApprovalReviewCompletedNotification", description: - "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", + "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", }); export type V2ItemGuardianApprovalReviewStartedNotification = { readonly action: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction; readonly review: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview; readonly reviewId: string; - readonly startedAtMs: number; readonly targetItemId?: string | null; readonly threadId: string; readonly turnId: string; @@ -38131,10 +28559,6 @@ export const V2ItemGuardianApprovalReviewStartedNotification = Schema.Struct({ action: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction, review: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview, reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }), - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this review started.", - format: "int64", - }).check(Schema.isInt()), targetItemId: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ @@ -38149,21 +28573,16 @@ export const V2ItemGuardianApprovalReviewStartedNotification = Schema.Struct({ }).annotate({ title: "ItemGuardianApprovalReviewStartedNotification", description: - "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", + "[UNSTABLE] Temporary notification payload for guardian automatic approval review. This shape is expected to change soon.", }); export type V2ItemStartedNotification = { readonly item: V2ItemStartedNotification__ThreadItem; - readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; export const V2ItemStartedNotification = Schema.Struct({ item: V2ItemStartedNotification__ThreadItem, - startedAtMs: Schema.Number.annotate({ - description: "Unix timestamp (in milliseconds) when this item lifecycle started.", - format: "int64", - }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }).annotate({ title: "ItemStartedNotification" }); @@ -38218,7 +28637,6 @@ export type V2ListMcpServerStatusParams = { readonly cursor?: string | null; readonly detail?: V2ListMcpServerStatusParams__McpServerStatusDetail | null; readonly limit?: number | null; - readonly threadId?: string | null; }; export const V2ListMcpServerStatusParams = Schema.Struct({ cursor: Schema.optionalKey( @@ -38246,7 +28664,6 @@ export const V2ListMcpServerStatusParams = Schema.Struct({ Schema.Null, ]), ), - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "ListMcpServerStatusParams" }); export type V2ListMcpServerStatusResponse = { @@ -38268,20 +28685,14 @@ export const V2ListMcpServerStatusResponse = Schema.Struct({ export type V2LoginAccountParams = | { readonly apiKey: string; readonly type: "apiKey" } - | { - readonly appBrand?: V2LoginAccountParams__LoginAppBrand | null; - readonly codexStreamlinedLogin?: boolean; - readonly type: "chatgpt"; - readonly useHostedLoginSuccessPage?: boolean; - } + | { readonly type: "chatgpt" } | { readonly type: "chatgptDeviceCode" } | { readonly accessToken: string; readonly chatgptAccountId: string; readonly chatgptPlanType?: string | null; readonly type: "chatgptAuthTokens"; - } - | { readonly apiKey: string; readonly region: string; readonly type: "amazonBedrock" }; + }; export const V2LoginAccountParams = Schema.Union( [ Schema.Struct({ @@ -38289,12 +28700,7 @@ export const V2LoginAccountParams = Schema.Union( type: Schema.Literal("apiKey").annotate({ title: "ApiKeyv2::LoginAccountParamsType" }), }).annotate({ title: "ApiKeyv2::LoginAccountParams" }), Schema.Struct({ - appBrand: Schema.optionalKey( - Schema.Union([V2LoginAccountParams__LoginAppBrand, Schema.Null]), - ), - codexStreamlinedLogin: Schema.optionalKey(Schema.Boolean), type: Schema.Literal("chatgpt").annotate({ title: "Chatgptv2::LoginAccountParamsType" }), - useHostedLoginSuccessPage: Schema.optionalKey(Schema.Boolean), }).annotate({ title: "Chatgptv2::LoginAccountParams" }), Schema.Struct({ type: Schema.Literal("chatgptDeviceCode").annotate({ @@ -38326,16 +28732,6 @@ export const V2LoginAccountParams = Schema.Union( description: "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.", }), - Schema.Struct({ - apiKey: Schema.String, - region: Schema.String, - type: Schema.Literal("amazonBedrock").annotate({ - title: "AmazonBedrockv2::LoginAccountParamsType", - }), - }).annotate({ - title: "AmazonBedrockv2::LoginAccountParams", - description: "[UNSTABLE] Managed Amazon Bedrock login is experimental.", - }), ], { mode: "oneOf" }, ).annotate({ title: "LoginAccountParams" }); @@ -38349,8 +28745,7 @@ export type V2LoginAccountResponse = readonly userCode: string; readonly verificationUrl: string; } - | { readonly type: "chatgptAuthTokens" } - | { readonly type: "amazonBedrock" }; + | { readonly type: "chatgptAuthTokens" }; export const V2LoginAccountResponse = Schema.Union( [ Schema.Struct({ @@ -38381,11 +28776,6 @@ export const V2LoginAccountResponse = Schema.Union( title: "ChatgptAuthTokensv2::LoginAccountResponseType", }), }).annotate({ title: "ChatgptAuthTokensv2::LoginAccountResponse" }), - Schema.Struct({ - type: Schema.Literal("amazonBedrock").annotate({ - title: "AmazonBedrockv2::LoginAccountResponseType", - }), - }).annotate({ title: "AmazonBedrockv2::LoginAccountResponse" }), ], { mode: "oneOf" }, ).annotate({ title: "LoginAccountResponse" }); @@ -38395,68 +28785,14 @@ export const V2LogoutAccountResponse = Schema.Struct({}).annotate({ title: "LogoutAccountResponse", }); -export type V2MarketplaceAddParams = { - readonly refName?: string | null; - readonly source: string; - readonly sparsePaths?: ReadonlyArray | null; -}; -export const V2MarketplaceAddParams = Schema.Struct({ - refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - source: Schema.String, - sparsePaths: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), -}).annotate({ title: "MarketplaceAddParams" }); - -export type V2MarketplaceAddResponse = { - readonly alreadyAdded: boolean; - readonly installedRoot: V2MarketplaceAddResponse__AbsolutePathBuf; - readonly marketplaceName: string; -}; -export const V2MarketplaceAddResponse = Schema.Struct({ - alreadyAdded: Schema.Boolean, - installedRoot: V2MarketplaceAddResponse__AbsolutePathBuf, - marketplaceName: Schema.String, -}).annotate({ title: "MarketplaceAddResponse" }); - -export type V2MarketplaceRemoveParams = { readonly marketplaceName: string }; -export const V2MarketplaceRemoveParams = Schema.Struct({ marketplaceName: Schema.String }).annotate( - { title: "MarketplaceRemoveParams" }, -); - -export type V2MarketplaceRemoveResponse = { - readonly installedRoot?: V2MarketplaceRemoveResponse__AbsolutePathBuf | null; - readonly marketplaceName: string; -}; -export const V2MarketplaceRemoveResponse = Schema.Struct({ - installedRoot: Schema.optionalKey( - Schema.Union([V2MarketplaceRemoveResponse__AbsolutePathBuf, Schema.Null]), - ), - marketplaceName: Schema.String, -}).annotate({ title: "MarketplaceRemoveResponse" }); - -export type V2MarketplaceUpgradeParams = { readonly marketplaceName?: string | null }; -export const V2MarketplaceUpgradeParams = Schema.Struct({ - marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ title: "MarketplaceUpgradeParams" }); - -export type V2MarketplaceUpgradeResponse = { - readonly errors: ReadonlyArray; - readonly selectedMarketplaces: ReadonlyArray; - readonly upgradedRoots: ReadonlyArray; -}; -export const V2MarketplaceUpgradeResponse = Schema.Struct({ - errors: Schema.Array(V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo), - selectedMarketplaces: Schema.Array(Schema.String), - upgradedRoots: Schema.Array(V2MarketplaceUpgradeResponse__AbsolutePathBuf), -}).annotate({ title: "MarketplaceUpgradeResponse" }); - export type V2McpResourceReadParams = { readonly server: string; - readonly threadId?: string | null; + readonly threadId: string; readonly uri: string; }; export const V2McpResourceReadParams = Schema.Struct({ server: Schema.String, - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + threadId: Schema.String, uri: Schema.String, }).annotate({ title: "McpResourceReadParams" }); @@ -38471,25 +28807,21 @@ export type V2McpServerOauthLoginCompletedNotification = { readonly error?: string | null; readonly name: string; readonly success: boolean; - readonly threadId?: string | null; }; export const V2McpServerOauthLoginCompletedNotification = Schema.Struct({ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), name: Schema.String, success: Schema.Boolean, - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "McpServerOauthLoginCompletedNotification" }); export type V2McpServerOauthLoginParams = { readonly name: string; readonly scopes?: ReadonlyArray | null; - readonly threadId?: string | null; readonly timeoutSecs?: number | null; }; export const V2McpServerOauthLoginParams = Schema.Struct({ name: Schema.String, scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), timeoutSecs: Schema.optionalKey( Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), ), @@ -38507,22 +28839,13 @@ export const V2McpServerRefreshResponse = Schema.Struct({}).annotate({ export type V2McpServerStatusUpdatedNotification = { readonly error?: string | null; - readonly failureReason?: V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason | null; readonly name: string; readonly status: V2McpServerStatusUpdatedNotification__McpServerStartupState; - readonly threadId?: string | null; }; export const V2McpServerStatusUpdatedNotification = Schema.Struct({ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - failureReason: Schema.optionalKey( - Schema.Union([ - V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason, - Schema.Null, - ]), - ), name: Schema.String, status: V2McpServerStatusUpdatedNotification__McpServerStartupState, - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "McpServerStatusUpdatedNotification" }); export type V2McpServerToolCallParams = { @@ -38618,22 +28941,6 @@ export const V2ModelListResponse = Schema.Struct({ ), }).annotate({ title: "ModelListResponse" }); -export type V2ModelProviderCapabilitiesReadParams = {}; -export const V2ModelProviderCapabilitiesReadParams = Schema.Struct({}).annotate({ - title: "ModelProviderCapabilitiesReadParams", -}); - -export type V2ModelProviderCapabilitiesReadResponse = { - readonly imageGeneration: boolean; - readonly namespaceTools: boolean; - readonly webSearch: boolean; -}; -export const V2ModelProviderCapabilitiesReadResponse = Schema.Struct({ - imageGeneration: Schema.Boolean, - namespaceTools: Schema.Boolean, - webSearch: Schema.Boolean, -}).annotate({ title: "ModelProviderCapabilitiesReadResponse" }); - export type V2ModelReroutedNotification = { readonly fromModel: string; readonly reason: V2ModelReroutedNotification__ModelRerouteReason; @@ -38649,88 +28956,6 @@ export const V2ModelReroutedNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "ModelReroutedNotification" }); -export type V2ModelSafetyBufferingUpdatedNotification = { - readonly fasterModel?: string | null; - readonly model: string; - readonly reasons: ReadonlyArray; - readonly showBufferingUi: boolean; - readonly threadId: string; - readonly turnId: string; - readonly useCases: ReadonlyArray; -}; -export const V2ModelSafetyBufferingUpdatedNotification = Schema.Struct({ - fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - model: Schema.String, - reasons: Schema.Array(Schema.String), - showBufferingUi: Schema.Boolean, - threadId: Schema.String, - turnId: Schema.String, - useCases: Schema.Array(Schema.String), -}).annotate({ title: "ModelSafetyBufferingUpdatedNotification" }); - -export type V2ModelVerificationNotification = { - readonly threadId: string; - readonly turnId: string; - readonly verifications: ReadonlyArray; -}; -export const V2ModelVerificationNotification = Schema.Struct({ - threadId: Schema.String, - turnId: Schema.String, - verifications: Schema.Array(V2ModelVerificationNotification__ModelVerification), -}).annotate({ title: "ModelVerificationNotification" }); - -export type V2PermissionProfileListParams = { - readonly cursor?: string | null; - readonly cwd?: string | null; - readonly limit?: number | null; -}; -export const V2PermissionProfileListParams = Schema.Struct({ - cursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Opaque pagination cursor returned by a previous call.", - }), - Schema.Null, - ]), - ), - cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional working directory to resolve project config layers.", - }), - Schema.Null, - ]), - ), - limit: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Optional page size; defaults to the full result set.", - format: "uint32", - }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), -}).annotate({ title: "PermissionProfileListParams" }); - -export type V2PermissionProfileListResponse = { - readonly data: ReadonlyArray; - readonly nextCursor?: string | null; -}; -export const V2PermissionProfileListResponse = Schema.Struct({ - data: Schema.Array(V2PermissionProfileListResponse__PermissionProfileSummary), - nextCursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.", - }), - Schema.Null, - ]), - ), -}).annotate({ title: "PermissionProfileListResponse" }); - export type V2PlanDeltaNotification = { readonly delta: string; readonly itemId: string; @@ -38748,58 +28973,19 @@ export const V2PlanDeltaNotification = Schema.Struct({ "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.", }); -export type V2PluginInstalledParams = { - readonly cwds?: ReadonlyArray | null; - readonly installSuggestionPluginNames?: ReadonlyArray | null; -}; -export const V2PluginInstalledParams = Schema.Struct({ - cwds: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2PluginInstalledParams__AbsolutePathBuf).annotate({ - description: "Optional working directories used to discover repo marketplaces.", - }), - Schema.Null, - ]), - ), - installSuggestionPluginNames: Schema.optionalKey( - Schema.Union([ - Schema.Array(Schema.String).annotate({ - description: - "Additional uninstalled plugin names that should be returned when present locally. This is used by mention surfaces that intentionally expose install entrypoints.", - }), - Schema.Null, - ]), - ), -}).annotate({ title: "PluginInstalledParams" }); - -export type V2PluginInstalledResponse = { - readonly marketplaceLoadErrors?: ReadonlyArray; - readonly marketplaces: ReadonlyArray; -}; -export const V2PluginInstalledResponse = Schema.Struct({ - marketplaceLoadErrors: Schema.optionalKey( - Schema.Array(V2PluginInstalledResponse__MarketplaceLoadErrorInfo).annotate({ default: [] }), - ), - marketplaces: Schema.Array(V2PluginInstalledResponse__PluginMarketplaceEntry), -}).annotate({ title: "PluginInstalledResponse" }); - -export type V2PluginInstalledResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; -export const V2PluginInstalledResponse__PluginAvailability = Schema.Literals([ - "DISABLED_BY_ADMIN", - "AVAILABLE", -]); - export type V2PluginInstallParams = { - readonly marketplacePath?: V2PluginInstallParams__AbsolutePathBuf | null; + readonly forceRemoteSync?: boolean; + readonly marketplacePath: V2PluginInstallParams__AbsolutePathBuf; readonly pluginName: string; - readonly remoteMarketplaceName?: string | null; }; export const V2PluginInstallParams = Schema.Struct({ - marketplacePath: Schema.optionalKey( - Schema.Union([V2PluginInstallParams__AbsolutePathBuf, Schema.Null]), + forceRemoteSync: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "When true, apply the remote plugin change before the local install flow.", + }), ), + marketplacePath: V2PluginInstallParams__AbsolutePathBuf, pluginName: Schema.String, - remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "PluginInstallParams" }); export type V2PluginInstallResponse = { @@ -38813,7 +28999,7 @@ export const V2PluginInstallResponse = Schema.Struct({ export type V2PluginListParams = { readonly cwds?: ReadonlyArray | null; - readonly marketplaceKinds?: ReadonlyArray | null; + readonly forceRemoteSync?: boolean; }; export const V2PluginListParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -38825,14 +29011,11 @@ export const V2PluginListParams = Schema.Struct({ Schema.Null, ]), ), - marketplaceKinds: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2PluginListParams__PluginListMarketplaceKind).annotate({ - description: - "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.", - }), - Schema.Null, - ]), + forceRemoteSync: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, reconcile the official curated marketplace against the remote plugin state before listing marketplaces.", + }), ), }).annotate({ title: "PluginListParams" }); @@ -38840,6 +29023,7 @@ export type V2PluginListResponse = { readonly featuredPluginIds?: ReadonlyArray; readonly marketplaceLoadErrors?: ReadonlyArray; readonly marketplaces: ReadonlyArray; + readonly remoteSyncError?: string | null; }; export const V2PluginListResponse = Schema.Struct({ featuredPluginIds: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), @@ -38847,25 +29031,16 @@ export const V2PluginListResponse = Schema.Struct({ Schema.Array(V2PluginListResponse__MarketplaceLoadErrorInfo).annotate({ default: [] }), ), marketplaces: Schema.Array(V2PluginListResponse__PluginMarketplaceEntry), + remoteSyncError: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "PluginListResponse" }); -export type V2PluginListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; -export const V2PluginListResponse__PluginAvailability = Schema.Literals([ - "DISABLED_BY_ADMIN", - "AVAILABLE", -]); - export type V2PluginReadParams = { - readonly marketplacePath?: V2PluginReadParams__AbsolutePathBuf | null; + readonly marketplacePath: V2PluginReadParams__AbsolutePathBuf; readonly pluginName: string; - readonly remoteMarketplaceName?: string | null; }; export const V2PluginReadParams = Schema.Struct({ - marketplacePath: Schema.optionalKey( - Schema.Union([V2PluginReadParams__AbsolutePathBuf, Schema.Null]), - ), + marketplacePath: V2PluginReadParams__AbsolutePathBuf, pluginName: Schema.String, - remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }).annotate({ title: "PluginReadParams" }); export type V2PluginReadResponse = { readonly plugin: V2PluginReadResponse__PluginDetail }; @@ -38873,220 +29048,24 @@ export const V2PluginReadResponse = Schema.Struct({ plugin: V2PluginReadResponse__PluginDetail, }).annotate({ title: "PluginReadResponse" }); -export type V2PluginReadResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; -export const V2PluginReadResponse__PluginAvailability = Schema.Literals([ - "DISABLED_BY_ADMIN", - "AVAILABLE", -]); - -export type V2PluginShareCheckoutParams = { readonly remotePluginId: string }; -export const V2PluginShareCheckoutParams = Schema.Struct({ - remotePluginId: Schema.String, -}).annotate({ title: "PluginShareCheckoutParams" }); - -export type V2PluginShareCheckoutResponse = { - readonly marketplaceName: string; - readonly marketplacePath: V2PluginShareCheckoutResponse__AbsolutePathBuf; +export type V2PluginUninstallParams = { + readonly forceRemoteSync?: boolean; readonly pluginId: string; - readonly pluginName: string; - readonly pluginPath: V2PluginShareCheckoutResponse__AbsolutePathBuf; - readonly remotePluginId: string; - readonly remoteVersion?: string | null; }; -export const V2PluginShareCheckoutResponse = Schema.Struct({ - marketplaceName: Schema.String, - marketplacePath: V2PluginShareCheckoutResponse__AbsolutePathBuf, +export const V2PluginUninstallParams = Schema.Struct({ + forceRemoteSync: Schema.optionalKey( + Schema.Boolean.annotate({ + description: "When true, apply the remote plugin change before the local uninstall flow.", + }), + ), pluginId: Schema.String, - pluginName: Schema.String, - pluginPath: V2PluginShareCheckoutResponse__AbsolutePathBuf, - remotePluginId: Schema.String, - remoteVersion: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ title: "PluginShareCheckoutResponse" }); - -export type V2PluginShareDeleteParams = { readonly remotePluginId: string }; -export const V2PluginShareDeleteParams = Schema.Struct({ remotePluginId: Schema.String }).annotate({ - title: "PluginShareDeleteParams", -}); - -export type V2PluginShareDeleteResponse = {}; -export const V2PluginShareDeleteResponse = Schema.Struct({}).annotate({ - title: "PluginShareDeleteResponse", -}); - -export type V2PluginShareListParams = {}; -export const V2PluginShareListParams = Schema.Struct({}).annotate({ - title: "PluginShareListParams", -}); - -export type V2PluginShareListResponse = { - readonly data: ReadonlyArray; -}; -export const V2PluginShareListResponse = Schema.Struct({ - data: Schema.Array(V2PluginShareListResponse__PluginShareListItem), -}).annotate({ title: "PluginShareListResponse" }); - -export type V2PluginShareListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; -export const V2PluginShareListResponse__PluginAvailability = Schema.Literals([ - "DISABLED_BY_ADMIN", - "AVAILABLE", -]); - -export type V2PluginShareSaveParams = { - readonly discoverability?: V2PluginShareSaveParams__PluginShareDiscoverability | null; - readonly pluginPath: V2PluginShareSaveParams__AbsolutePathBuf; - readonly remotePluginId?: string | null; - readonly shareTargets?: ReadonlyArray | null; -}; -export const V2PluginShareSaveParams = Schema.Struct({ - discoverability: Schema.optionalKey( - Schema.Union([V2PluginShareSaveParams__PluginShareDiscoverability, Schema.Null]), - ), - pluginPath: V2PluginShareSaveParams__AbsolutePathBuf, - remotePluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - shareTargets: Schema.optionalKey( - Schema.Union([Schema.Array(V2PluginShareSaveParams__PluginShareTarget), Schema.Null]), - ), -}).annotate({ title: "PluginShareSaveParams" }); - -export type V2PluginShareSaveResponse = { - readonly remotePluginId: string; - readonly shareUrl: string; -}; -export const V2PluginShareSaveResponse = Schema.Struct({ - remotePluginId: Schema.String, - shareUrl: Schema.String, -}).annotate({ title: "PluginShareSaveResponse" }); - -export type V2PluginShareUpdateTargetsParams = { - readonly discoverability: V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability; - readonly remotePluginId: string; - readonly shareTargets: ReadonlyArray; -}; -export const V2PluginShareUpdateTargetsParams = Schema.Struct({ - discoverability: V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability, - remotePluginId: Schema.String, - shareTargets: Schema.Array(V2PluginShareUpdateTargetsParams__PluginShareTarget), -}).annotate({ title: "PluginShareUpdateTargetsParams" }); - -export type V2PluginShareUpdateTargetsResponse = { - readonly discoverability: V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability; - readonly principals: ReadonlyArray; -}; -export const V2PluginShareUpdateTargetsResponse = Schema.Struct({ - discoverability: V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability, - principals: Schema.Array(V2PluginShareUpdateTargetsResponse__PluginSharePrincipal), -}).annotate({ title: "PluginShareUpdateTargetsResponse" }); - -export type V2PluginSkillReadParams = { - readonly remoteMarketplaceName: string; - readonly remotePluginId: string; - readonly skillName: string; -}; -export const V2PluginSkillReadParams = Schema.Struct({ - remoteMarketplaceName: Schema.String, - remotePluginId: Schema.String, - skillName: Schema.String, -}).annotate({ title: "PluginSkillReadParams" }); - -export type V2PluginSkillReadResponse = { readonly contents?: string | null }; -export const V2PluginSkillReadResponse = Schema.Struct({ - contents: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ title: "PluginSkillReadResponse" }); - -export type V2PluginUninstallParams = { readonly pluginId: string }; -export const V2PluginUninstallParams = Schema.Struct({ pluginId: Schema.String }).annotate({ - title: "PluginUninstallParams", -}); +}).annotate({ title: "PluginUninstallParams" }); export type V2PluginUninstallResponse = {}; export const V2PluginUninstallResponse = Schema.Struct({}).annotate({ title: "PluginUninstallResponse", }); -export type V2ProcessExitedNotification = { - readonly exitCode: number; - readonly processHandle: string; - readonly stderr: string; - readonly stderrCapReached: boolean; - readonly stdout: string; - readonly stdoutCapReached: boolean; -}; -export const V2ProcessExitedNotification = Schema.Struct({ - exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check( - Schema.isInt(), - ), - processHandle: Schema.String.annotate({ - description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", - }), - stderr: Schema.String.annotate({ - description: - "Buffered stderr capture.\n\nEmpty when stderr was streamed via `process/outputDelta`.", - }), - stderrCapReached: Schema.Boolean.annotate({ - description: - "Whether stderr reached `outputBytesCap`.\n\nIn streaming mode, stderr is empty and cap state is also reported on the final stderr `process/outputDelta` notification.", - }), - stdout: Schema.String.annotate({ - description: - "Buffered stdout capture.\n\nEmpty when stdout was streamed via `process/outputDelta`.", - }), - stdoutCapReached: Schema.Boolean.annotate({ - description: - "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.", - }), -}).annotate({ - title: "ProcessExitedNotification", - description: "Final process exit notification for `process/spawn`.", -}); - -export type V2ProcessOutputDeltaNotification = { - readonly capReached: boolean; - readonly deltaBase64: string; - readonly processHandle: string; - readonly stream: "stdout" | "stderr"; -}; -export const V2ProcessOutputDeltaNotification = Schema.Struct({ - capReached: Schema.Boolean.annotate({ - description: - "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.", - }), - deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }), - processHandle: Schema.String.annotate({ - description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", - }), - stream: Schema.Literals(["stdout", "stderr"]).annotate({ - description: "Stream label for `process/outputDelta` notifications.", - }), -}).annotate({ - title: "ProcessOutputDeltaNotification", - description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.", -}); - -export type V2ProcessOutputDeltaNotification__ProcessOutputStream = "stdout" | "stderr"; -export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Literals([ - "stdout", - "stderr", -]).annotate({ description: "Stream label for `process/outputDelta` notifications." }); - -export type V2RawResponseCompletedNotification = { - readonly responseId: string; - readonly threadId: string; - readonly turnId: string; - readonly usage?: V2RawResponseCompletedNotification__TokenUsageBreakdown | null; -}; -export const V2RawResponseCompletedNotification = Schema.Struct({ - responseId: Schema.String, - threadId: Schema.String, - turnId: Schema.String, - usage: Schema.optionalKey( - Schema.Union([V2RawResponseCompletedNotification__TokenUsageBreakdown, Schema.Null]), - ), -}).annotate({ - title: "RawResponseCompletedNotification", - description: - "Internal-only notification containing the exact usage from one upstream Responses API completion.", -}); - export type V2RawResponseItemCompletedNotification = { readonly item: V2RawResponseItemCompletedNotification__ResponseItem; readonly threadId: string; @@ -39141,22 +29120,6 @@ export const V2ReasoningTextDeltaNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "ReasoningTextDeltaNotification" }); -export type V2RemoteControlStatusChangedNotification = { - readonly environmentId?: string | null; - readonly installationId: string; - readonly serverName: string; - readonly status: V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus; -}; -export const V2RemoteControlStatusChangedNotification = Schema.Struct({ - environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - installationId: Schema.String, - serverName: Schema.String, - status: V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus, -}).annotate({ - title: "RemoteControlStatusChangedNotification", - description: "Current remote-control connection status and remote identity exposed to clients.", -}); - export type V2ReviewStartParams = { readonly delivery?: V2ReviewStartParams__ReviewDelivery | null; readonly target: V2ReviewStartParams__ReviewTarget; @@ -39231,27 +29194,6 @@ export const V2ReviewStartResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); -export type V2ReviewStartResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ReviewStartResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - -export type V2SendAddCreditsNudgeEmailParams = { - readonly creditType: V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType; -}; -export const V2SendAddCreditsNudgeEmailParams = Schema.Struct({ - creditType: V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType, -}).annotate({ title: "SendAddCreditsNudgeEmailParams" }); - -export type V2SendAddCreditsNudgeEmailResponse = { - readonly status: V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus; -}; -export const V2SendAddCreditsNudgeEmailResponse = Schema.Struct({ - status: V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus, -}).annotate({ title: "SendAddCreditsNudgeEmailResponse" }); - export type V2ServerRequestResolvedNotification = { readonly requestId: V2ServerRequestResolvedNotification__RequestId; readonly threadId: string; @@ -39290,21 +29232,10 @@ export const V2SkillsConfigWriteResponse = Schema.Struct({ effectiveEnabled: Schema.Boolean, }).annotate({ title: "SkillsConfigWriteResponse" }); -export type V2SkillsExtraRootsSetParams = { - readonly extraRoots: ReadonlyArray; -}; -export const V2SkillsExtraRootsSetParams = Schema.Struct({ - extraRoots: Schema.Array(V2SkillsExtraRootsSetParams__AbsolutePathBuf), -}).annotate({ title: "SkillsExtraRootsSetParams" }); - -export type V2SkillsExtraRootsSetResponse = {}; -export const V2SkillsExtraRootsSetResponse = Schema.Struct({}).annotate({ - title: "SkillsExtraRootsSetResponse", -}); - export type V2SkillsListParams = { readonly cwds?: ReadonlyArray; readonly forceReload?: boolean; + readonly perCwdExtraUserRoots?: ReadonlyArray | null; }; export const V2SkillsListParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -39317,6 +29248,14 @@ export const V2SkillsListParams = Schema.Struct({ description: "When true, bypass the skills cache and re-scan skills from disk.", }), ), + perCwdExtraUserRoots: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2SkillsListParams__SkillsListExtraRootsForCwd).annotate({ + description: "Optional per-cwd extra roots to scan as user-scoped skills.", + }), + Schema.Null, + ]), + ), }).annotate({ title: "SkillsListParams" }); export type V2SkillsListResponse = { @@ -39341,22 +29280,6 @@ export const V2TerminalInteractionNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "TerminalInteractionNotification" }); -export type V2ThreadApproveGuardianDeniedActionParams = { - readonly event: unknown; - readonly threadId: string; -}; -export const V2ThreadApproveGuardianDeniedActionParams = Schema.Struct({ - event: Schema.Unknown.annotate({ - description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.", - }), - threadId: Schema.String, -}).annotate({ title: "ThreadApproveGuardianDeniedActionParams" }); - -export type V2ThreadApproveGuardianDeniedActionResponse = {}; -export const V2ThreadApproveGuardianDeniedActionResponse = Schema.Struct({}).annotate({ - title: "ThreadApproveGuardianDeniedActionResponse", -}); - export type V2ThreadArchivedNotification = { readonly threadId: string }; export const V2ThreadArchivedNotification = Schema.Struct({ threadId: Schema.String }).annotate({ title: "ThreadArchivedNotification", @@ -39387,19 +29310,6 @@ export const V2ThreadCompactStartResponse = Schema.Struct({}).annotate({ title: "ThreadCompactStartResponse", }); -export type V2ThreadDeletedNotification = { readonly threadId: string }; -export const V2ThreadDeletedNotification = Schema.Struct({ threadId: Schema.String }).annotate({ - title: "ThreadDeletedNotification", -}); - -export type V2ThreadDeleteParams = { readonly threadId: string }; -export const V2ThreadDeleteParams = Schema.Struct({ threadId: Schema.String }).annotate({ - title: "ThreadDeleteParams", -}); - -export type V2ThreadDeleteResponse = {}; -export const V2ThreadDeleteResponse = Schema.Struct({}).annotate({ title: "ThreadDeleteResponse" }); - export type V2ThreadForkParams = { readonly approvalPolicy?: V2ThreadForkParams__AskForApproval | null; readonly approvalsReviewer?: V2ThreadForkParams__ApprovalsReviewer | null; @@ -39408,13 +29318,11 @@ export type V2ThreadForkParams = { readonly cwd?: string | null; readonly developerInstructions?: string | null; readonly ephemeral?: boolean; - readonly lastTurnId?: string | null; readonly model?: string | null; readonly modelProvider?: string | null; readonly sandbox?: V2ThreadForkParams__SandboxMode | null; - readonly serviceTier?: string | null; + readonly serviceTier?: V2ThreadForkParams__ServiceTier | null | null; readonly threadId: string; - readonly threadSource?: V2ThreadForkParams__ThreadSource | null; }; export const V2ThreadForkParams = Schema.Struct({ approvalPolicy: Schema.optionalKey( @@ -39433,15 +29341,6 @@ export const V2ThreadForkParams = Schema.Struct({ cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), ephemeral: Schema.optionalKey(Schema.Boolean), - lastTurnId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional last turn id to fork through, inclusive.\n\nWhen specified, turns after `last_turn_id` are omitted from the fork. The referenced turn cannot be in progress.", - }), - Schema.Null, - ]), - ), model: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ @@ -39452,135 +29351,51 @@ export const V2ThreadForkParams = Schema.Struct({ ), modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([V2ThreadForkParams__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - threadId: Schema.String, - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadForkParams__ThreadSource, Schema.Null]).annotate({ - description: - "Optional client-supplied analytics source classification for this forked thread.", - }), + serviceTier: Schema.optionalKey( + Schema.Union([Schema.Union([V2ThreadForkParams__ServiceTier, Schema.Null]), Schema.Null]), ), + threadId: Schema.String, }).annotate({ title: "ThreadForkParams", description: - "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.", -}); - -export type V2ThreadForkParams__AbsolutePathBuf = string; -export const V2ThreadForkParams__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", + "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", }); export type V2ThreadForkResponse = { readonly approvalPolicy: V2ThreadForkResponse__AskForApproval; - readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent"; - readonly cwd: V2ThreadForkResponse__AbsolutePathBuf; - readonly instructionSources?: ReadonlyArray; + readonly approvalsReviewer: "user" | "guardian_subagent"; + readonly cwd: string; readonly model: string; readonly modelProvider: string; readonly reasoningEffort?: V2ThreadForkResponse__ReasoningEffort | null; - readonly sandbox: - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; - readonly serviceTier?: string | null; + readonly sandbox: V2ThreadForkResponse__SandboxPolicy; + readonly serviceTier?: V2ThreadForkResponse__ServiceTier | null; readonly thread: V2ThreadForkResponse__Thread; }; export const V2ThreadForkResponse = Schema.Struct({ approvalPolicy: V2ThreadForkResponse__AskForApproval, - approvalsReviewer: Schema.Literals(["user", "auto_review", "guardian_subagent"]).annotate({ + approvalsReviewer: Schema.Literals(["user", "guardian_subagent"]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }), - cwd: V2ThreadForkResponse__AbsolutePathBuf, - instructionSources: Schema.optionalKey( - Schema.Array(V2ThreadForkResponse__LegacyAppPathString).annotate({ - description: - "Environment-native paths to instruction source files currently loaded for this thread.", - default: [], - }), - ), + cwd: Schema.String, model: Schema.String, modelProvider: Schema.String, reasoningEffort: Schema.optionalKey( Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]), ), - sandbox: Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ - title: "WorkspaceWriteSandboxPolicyType", - }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, - ).annotate({ - description: - "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", - }), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sandbox: V2ThreadForkResponse__SandboxPolicy, + serviceTier: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ServiceTier, Schema.Null])), thread: V2ThreadForkResponse__Thread, }).annotate({ title: "ThreadForkResponse" }); -export type V2ThreadForkResponse__ActivePermissionProfile = { - readonly extends?: string | null; - readonly id: string; -}; -export const V2ThreadForkResponse__ActivePermissionProfile = Schema.Struct({ - extends: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Parent profile identifier from the selected permissions profile's `extends` setting, when present.", - }), - Schema.Null, - ]), - ), - id: Schema.String.annotate({ - description: - "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", - }), -}); - -export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ThreadForkResponse__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ThreadForkResponse__ByteRange = { readonly end: number; readonly start: number }; @@ -39626,63 +29441,28 @@ export const V2ThreadForkResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); -export type V2ThreadForkResponse__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const V2ThreadForkResponse__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - export type V2ThreadForkResponse__NetworkAccess = "restricted" | "enabled"; export const V2ThreadForkResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2ThreadForkResponse__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } +export type V2ThreadForkResponse__ReadOnlyAccess = | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadForkResponse__SandboxPolicy = Schema.Union( + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; +export const V2ThreadForkResponse__ReadOnlyAccess = Schema.Union( [ Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( + includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + readableRoots: Schema.optionalKey( Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), + type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), ], { mode: "oneOf" }, ); @@ -39706,14 +29486,6 @@ export const V2ThreadForkResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadForkResponse__ThreadExtra = {}; -export const V2ThreadForkResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadForkResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadForkResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - export type V2ThreadForkResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -39741,98 +29513,15 @@ export const V2ThreadForkResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadForkResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadForkResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - -export type V2ThreadGoalClearedNotification = { readonly threadId: string }; -export const V2ThreadGoalClearedNotification = Schema.Struct({ threadId: Schema.String }).annotate({ - title: "ThreadGoalClearedNotification", -}); - -export type V2ThreadGoalClearParams = { readonly threadId: string }; -export const V2ThreadGoalClearParams = Schema.Struct({ threadId: Schema.String }).annotate({ - title: "ThreadGoalClearParams", -}); - -export type V2ThreadGoalClearResponse = { readonly cleared: boolean }; -export const V2ThreadGoalClearResponse = Schema.Struct({ cleared: Schema.Boolean }).annotate({ - title: "ThreadGoalClearResponse", -}); - -export type V2ThreadGoalGetParams = { readonly threadId: string }; -export const V2ThreadGoalGetParams = Schema.Struct({ threadId: Schema.String }).annotate({ - title: "ThreadGoalGetParams", -}); - -export type V2ThreadGoalGetResponse = { - readonly goal?: V2ThreadGoalGetResponse__ThreadGoal | null; -}; -export const V2ThreadGoalGetResponse = Schema.Struct({ - goal: Schema.optionalKey(Schema.Union([V2ThreadGoalGetResponse__ThreadGoal, Schema.Null])), -}).annotate({ title: "ThreadGoalGetResponse" }); - -export type V2ThreadGoalSetParams = { - readonly objective?: string | null; - readonly status?: V2ThreadGoalSetParams__ThreadGoalStatus | null; - readonly threadId: string; - readonly tokenBudget?: number | null; -}; -export const V2ThreadGoalSetParams = Schema.Struct({ - objective: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: Schema.optionalKey(Schema.Union([V2ThreadGoalSetParams__ThreadGoalStatus, Schema.Null])), - threadId: Schema.String, - tokenBudget: Schema.optionalKey( - Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), - ), -}).annotate({ title: "ThreadGoalSetParams" }); - -export type V2ThreadGoalSetResponse = { readonly goal: V2ThreadGoalSetResponse__ThreadGoal }; -export const V2ThreadGoalSetResponse = Schema.Struct({ - goal: V2ThreadGoalSetResponse__ThreadGoal, -}).annotate({ title: "ThreadGoalSetResponse" }); - -export type V2ThreadGoalUpdatedNotification = { - readonly goal: V2ThreadGoalUpdatedNotification__ThreadGoal; - readonly threadId: string; - readonly turnId?: string | null; -}; -export const V2ThreadGoalUpdatedNotification = Schema.Struct({ - goal: V2ThreadGoalUpdatedNotification__ThreadGoal, - threadId: Schema.String, - turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}).annotate({ title: "ThreadGoalUpdatedNotification" }); - -export type V2ThreadInjectItemsParams = { - readonly items: ReadonlyArray; - readonly threadId: string; -}; -export const V2ThreadInjectItemsParams = Schema.Struct({ - items: Schema.Array(Schema.Unknown).annotate({ - description: "Raw Responses API items to append to the thread's model-visible history.", - }), - threadId: Schema.String, -}).annotate({ title: "ThreadInjectItemsParams" }); - -export type V2ThreadInjectItemsResponse = {}; -export const V2ThreadInjectItemsResponse = Schema.Struct({}).annotate({ - title: "ThreadInjectItemsResponse", -}); - export type V2ThreadListParams = { readonly archived?: boolean | null; readonly cursor?: string | null; - readonly cwd?: V2ThreadListParams__ThreadListCwdFilter | null; + readonly cwd?: string | null; readonly limit?: number | null; readonly modelProviders?: ReadonlyArray | null; readonly searchTerm?: string | null; - readonly sortDirection?: V2ThreadListParams__SortDirection | null; readonly sortKey?: V2ThreadListParams__ThreadSortKey | null; readonly sourceKinds?: ReadonlyArray | null; - readonly useStateDbOnly?: boolean; }; export const V2ThreadListParams = Schema.Struct({ archived: Schema.optionalKey( @@ -39853,10 +29542,13 @@ export const V2ThreadListParams = Schema.Struct({ ]), ), cwd: Schema.optionalKey( - Schema.Union([V2ThreadListParams__ThreadListCwdFilter, Schema.Null]).annotate({ - description: - "Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.", - }), + Schema.Union([ + Schema.String.annotate({ + description: + "Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.", + }), + Schema.Null, + ]), ), limit: Schema.optionalKey( Schema.Union([ @@ -39886,11 +29578,6 @@ export const V2ThreadListParams = Schema.Struct({ Schema.Null, ]), ), - sortDirection: Schema.optionalKey( - Schema.Union([V2ThreadListParams__SortDirection, Schema.Null]).annotate({ - description: "Optional sort direction; defaults to descending (newest first).", - }), - ), sortKey: Schema.optionalKey( Schema.Union([V2ThreadListParams__ThreadSortKey, Schema.Null]).annotate({ description: "Optional sort key; defaults to created_at.", @@ -39905,29 +29592,13 @@ export const V2ThreadListParams = Schema.Struct({ Schema.Null, ]), ), - useStateDbOnly: Schema.optionalKey( - Schema.Boolean.annotate({ - description: - "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.", - }), - ), }).annotate({ title: "ThreadListParams" }); export type V2ThreadListResponse = { - readonly backwardsCursor?: string | null; readonly data: ReadonlyArray; readonly nextCursor?: string | null; }; export const V2ThreadListResponse = Schema.Struct({ - backwardsCursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Opaque cursor to pass as `cursor` when reversing `sortDirection`. This is only populated when the page contains at least one thread. Use it with the opposite `sortDirection`; for timestamp sorts it anchors at the start of the page timestamp so same-second updates are not skipped.", - }), - Schema.Null, - ]), - ), data: Schema.Array(V2ThreadListResponse__Thread), nextCursor: Schema.optionalKey( Schema.Union([ @@ -40002,14 +29673,6 @@ export const V2ThreadListResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadListResponse__ThreadExtra = {}; -export const V2ThreadListResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadListResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadListResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - export type V2ThreadListResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -40037,13 +29700,6 @@ export const V2ThreadListResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadListResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadListResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadLoadedListParams = { readonly cursor?: string | null; readonly limit?: number | null; @@ -40181,17 +29837,6 @@ export const V2ThreadMetadataUpdateResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadMetadataUpdateResponse__ThreadExtra = {}; -export const V2ThreadMetadataUpdateResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadMetadataUpdateResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadMetadataUpdateResponse__ThreadHistoryMode = Schema.Literals([ - "legacy", - "paginated", -]); - export type V2ThreadMetadataUpdateResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -40219,13 +29864,6 @@ export const V2ThreadMetadataUpdateResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadMetadataUpdateResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadNameUpdatedNotification = { readonly threadId: string; readonly threadName?: string | null; @@ -40240,6 +29878,7 @@ export const V2ThreadReadParams = Schema.Struct({ includeTurns: Schema.optionalKey( Schema.Boolean.annotate({ description: "When true, include turns and their items from rollout history.", + default: false, }), ), threadId: Schema.String, @@ -40312,14 +29951,6 @@ export const V2ThreadReadResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadReadResponse__ThreadExtra = {}; -export const V2ThreadReadResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadReadResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadReadResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - export type V2ThreadReadResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -40347,13 +29978,6 @@ export const V2ThreadReadResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadReadResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadReadResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadRealtimeClosedNotification = { readonly reason?: string | null; readonly threadId: string; @@ -40412,12 +30036,12 @@ export const V2ThreadRealtimeSdpNotification = Schema.Struct({ }); export type V2ThreadRealtimeStartedNotification = { - readonly realtimeSessionId?: string | null; + readonly sessionId?: string | null; readonly threadId: string; readonly version: V2ThreadRealtimeStartedNotification__RealtimeConversationVersion; }; export const V2ThreadRealtimeStartedNotification = Schema.Struct({ - realtimeSessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, version: V2ThreadRealtimeStartedNotification__RealtimeConversationVersion, }).annotate({ @@ -40425,34 +30049,19 @@ export const V2ThreadRealtimeStartedNotification = Schema.Struct({ description: "EXPERIMENTAL - emitted when thread realtime startup is accepted.", }); -export type V2ThreadRealtimeTranscriptDeltaNotification = { - readonly delta: string; - readonly role: string; - readonly threadId: string; -}; -export const V2ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({ - delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }), - role: Schema.String, - threadId: Schema.String, -}).annotate({ - title: "ThreadRealtimeTranscriptDeltaNotification", - description: - "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.", -}); - -export type V2ThreadRealtimeTranscriptDoneNotification = { +export type V2ThreadRealtimeTranscriptUpdatedNotification = { readonly role: string; readonly text: string; readonly threadId: string; }; -export const V2ThreadRealtimeTranscriptDoneNotification = Schema.Struct({ +export const V2ThreadRealtimeTranscriptUpdatedNotification = Schema.Struct({ role: Schema.String, - text: Schema.String.annotate({ description: "Final complete text for the transcript part." }), + text: Schema.String, threadId: Schema.String, }).annotate({ - title: "ThreadRealtimeTranscriptDoneNotification", + title: "ThreadRealtimeTranscriptUpdatedNotification", description: - "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.", + "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.", }); export type V2ThreadResumeParams = { @@ -40466,7 +30075,7 @@ export type V2ThreadResumeParams = { readonly modelProvider?: string | null; readonly personality?: V2ThreadResumeParams__Personality | null; readonly sandbox?: V2ThreadResumeParams__SandboxMode | null; - readonly serviceTier?: string | null; + readonly serviceTier?: V2ThreadResumeParams__ServiceTier | null | null; readonly threadId: string; }; export const V2ThreadResumeParams = Schema.Struct({ @@ -40496,42 +30105,28 @@ export const V2ThreadResumeParams = Schema.Struct({ modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), personality: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + serviceTier: Schema.optionalKey( + Schema.Union([Schema.Union([V2ThreadResumeParams__ServiceTier, Schema.Null]), Schema.Null]), + ), threadId: Schema.String, }).annotate({ title: "ThreadResumeParams", description: - "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.", -}); - -export type V2ThreadResumeParams__AbsolutePathBuf = string; -export const V2ThreadResumeParams__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", + "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", }); export type V2ThreadResumeParams__ResponseItem = | { readonly content: ReadonlyArray; + readonly end_turn?: boolean | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly phase?: V2ThreadResumeParams__MessagePhase | null; readonly role: string; readonly type: "message"; } - | { - readonly author: string; - readonly content: ReadonlyArray; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; - readonly recipient: string; - readonly type: "agent_message"; - } | { readonly content?: ReadonlyArray | null; readonly encrypted_content?: string | null; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly summary: ReadonlyArray; readonly type: "reasoning"; } @@ -40539,7 +30134,6 @@ export type V2ThreadResumeParams__ResponseItem = readonly action: V2ThreadResumeParams__LocalShellAction; readonly call_id?: string | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly status: V2ThreadResumeParams__LocalShellStatus; readonly type: "local_shell_call"; } @@ -40547,7 +30141,6 @@ export type V2ThreadResumeParams__ResponseItem = readonly arguments: string; readonly call_id: string; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly name: string; readonly namespace?: string | null; readonly type: "function_call"; @@ -40557,14 +30150,11 @@ export type V2ThreadResumeParams__ResponseItem = readonly call_id?: string | null; readonly execution: string; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly status?: string | null; readonly type: "tool_search_call"; } | { readonly call_id: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly output: V2ThreadResumeParams__FunctionCallOutputBody; readonly type: "function_call_output"; } @@ -40572,16 +30162,12 @@ export type V2ThreadResumeParams__ResponseItem = readonly call_id: string; readonly id?: string | null; readonly input: string; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly name: string; - readonly namespace?: string | null; readonly status?: string | null; readonly type: "custom_tool_call"; } | { readonly call_id: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly name?: string | null; readonly output: V2ThreadResumeParams__FunctionCallOutputBody; readonly type: "custom_tool_call_output"; @@ -40589,8 +30175,6 @@ export type V2ThreadResumeParams__ResponseItem = | { readonly call_id?: string | null; readonly execution: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly status: string; readonly tools: ReadonlyArray; readonly type: "tool_search_output"; @@ -40598,63 +30182,36 @@ export type V2ThreadResumeParams__ResponseItem = | { readonly action?: V2ThreadResumeParams__ResponsesApiWebSearchAction | null; readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; readonly status?: string | null; readonly type: "web_search_call"; } | { - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; + readonly id: string; readonly result: string; readonly revised_prompt?: string | null; readonly status: string; readonly type: "image_generation_call"; } - | { - readonly encrypted_content: string; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; - readonly type: "compaction"; - } - | { readonly type: "compaction_trigger" } - | { - readonly encrypted_content?: string | null; - readonly id?: string | null; - readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null; - readonly type: "context_compaction"; - } + | { readonly ghost_commit: V2ThreadResumeParams__GhostCommit; readonly type: "ghost_snapshot" } + | { readonly encrypted_content: string; readonly type: "compaction" } | { readonly type: "other" }; export const V2ThreadResumeParams__ResponseItem = Schema.Union( [ Schema.Struct({ content: Schema.Array(V2ThreadResumeParams__ContentItem), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), + end_turn: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), phase: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__MessagePhase, Schema.Null])), role: Schema.String, type: Schema.Literal("message").annotate({ title: "MessageResponseItemType" }), }).annotate({ title: "MessageResponseItem" }), - Schema.Struct({ - author: Schema.String, - content: Schema.Array(V2ThreadResumeParams__AgentMessageInputContent), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), - recipient: Schema.String, - type: Schema.Literal("agent_message").annotate({ title: "AgentMessageResponseItemType" }), - }).annotate({ title: "AgentMessageResponseItem" }), Schema.Struct({ content: Schema.optionalKey( Schema.Union([Schema.Array(V2ThreadResumeParams__ReasoningItemContent), Schema.Null]), ), encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), summary: Schema.Array(V2ThreadResumeParams__ReasoningItemReasoningSummary), type: Schema.Literal("reasoning").annotate({ title: "ReasoningResponseItemType" }), }).annotate({ title: "ReasoningResponseItem" }), @@ -40670,13 +30227,11 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( Schema.Union([ Schema.String.annotate({ description: "Legacy id field retained for compatibility with older payloads.", + writeOnly: true, }), Schema.Null, ]), ), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), status: V2ThreadResumeParams__LocalShellStatus, type: Schema.Literal("local_shell_call").annotate({ title: "LocalShellCallResponseItemType", @@ -40685,9 +30240,8 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( Schema.Struct({ arguments: Schema.String, call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), name: Schema.String, namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -40697,9 +30251,8 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( arguments: Schema.Unknown, call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), execution: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("tool_search_call").annotate({ @@ -40708,10 +30261,6 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( }).annotate({ title: "ToolSearchCallResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), output: V2ThreadResumeParams__FunctionCallOutputBody, type: Schema.Literal("function_call_output").annotate({ title: "FunctionCallOutputResponseItemType", @@ -40719,13 +30268,11 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( }).annotate({ title: "FunctionCallOutputResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - input: Schema.String, - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), + input: Schema.String, name: Schema.String, - namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("custom_tool_call").annotate({ title: "CustomToolCallResponseItemType", @@ -40733,10 +30280,6 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( }).annotate({ title: "CustomToolCallResponseItem" }), Schema.Struct({ call_id: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), output: V2ThreadResumeParams__FunctionCallOutputBody, type: Schema.Literal("custom_tool_call_output").annotate({ @@ -40746,10 +30289,6 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( Schema.Struct({ call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), execution: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), status: Schema.String, tools: Schema.Array(Schema.Unknown), type: Schema.Literal("tool_search_output").annotate({ @@ -40760,18 +30299,14 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( action: Schema.optionalKey( Schema.Union([V2ThreadResumeParams__ResponsesApiWebSearchAction, Schema.Null]), ), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), + id: Schema.optionalKey( + Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), type: Schema.Literal("web_search_call").annotate({ title: "WebSearchCallResponseItemType" }), }).annotate({ title: "WebSearchCallResponseItem" }), Schema.Struct({ - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), + id: Schema.String, result: Schema.String, revised_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), status: Schema.String, @@ -40779,29 +30314,14 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( title: "ImageGenerationCallResponseItemType", }), }).annotate({ title: "ImageGenerationCallResponseItem" }), + Schema.Struct({ + ghost_commit: V2ThreadResumeParams__GhostCommit, + type: Schema.Literal("ghost_snapshot").annotate({ title: "GhostSnapshotResponseItemType" }), + }).annotate({ title: "GhostSnapshotResponseItem" }), Schema.Struct({ encrypted_content: Schema.String, - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }), }).annotate({ title: "CompactionResponseItem" }), - Schema.Struct({ - type: Schema.Literal("compaction_trigger").annotate({ - title: "CompactionTriggerResponseItemType", - }), - }).annotate({ title: "CompactionTriggerResponseItem" }), - Schema.Struct({ - encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - internal_chat_message_metadata_passthrough: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]), - ), - type: Schema.Literal("context_compaction").annotate({ - title: "ContextCompactionResponseItemType", - }), - }).annotate({ title: "ContextCompactionResponseItem" }), Schema.Struct({ type: Schema.Literal("other").annotate({ title: "OtherResponseItemType" }), }).annotate({ title: "OtherResponseItem" }), @@ -40809,144 +30329,41 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeParams__ThreadResumeInitialTurnsPageParams = { - readonly itemsView?: V2ThreadResumeParams__TurnItemsView | null; - readonly limit?: number | null; - readonly sortDirection?: V2ThreadResumeParams__SortDirection | null; -}; -export const V2ThreadResumeParams__ThreadResumeInitialTurnsPageParams = Schema.Struct({ - itemsView: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__TurnItemsView, Schema.Null]).annotate({ - description: "How much item detail to include for each returned turn; defaults to summary.", - }), - ), - limit: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ description: "Optional turn page size.", format: "uint32" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), - ), - sortDirection: Schema.optionalKey( - Schema.Union([V2ThreadResumeParams__SortDirection, Schema.Null]).annotate({ - description: "Optional turn pagination direction; defaults to descending.", - }), - ), -}); - export type V2ThreadResumeResponse = { readonly approvalPolicy: V2ThreadResumeResponse__AskForApproval; - readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent"; - readonly cwd: V2ThreadResumeResponse__AbsolutePathBuf; - readonly instructionSources?: ReadonlyArray; + readonly approvalsReviewer: "user" | "guardian_subagent"; + readonly cwd: string; readonly model: string; readonly modelProvider: string; readonly reasoningEffort?: V2ThreadResumeResponse__ReasoningEffort | null; - readonly sandbox: - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; - readonly serviceTier?: string | null; + readonly sandbox: V2ThreadResumeResponse__SandboxPolicy; + readonly serviceTier?: V2ThreadResumeResponse__ServiceTier | null; readonly thread: V2ThreadResumeResponse__Thread; }; export const V2ThreadResumeResponse = Schema.Struct({ approvalPolicy: V2ThreadResumeResponse__AskForApproval, - approvalsReviewer: Schema.Literals(["user", "auto_review", "guardian_subagent"]).annotate({ + approvalsReviewer: Schema.Literals(["user", "guardian_subagent"]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }), - cwd: V2ThreadResumeResponse__AbsolutePathBuf, - instructionSources: Schema.optionalKey( - Schema.Array(V2ThreadResumeResponse__LegacyAppPathString).annotate({ - description: - "Environment-native paths to instruction source files currently loaded for this thread.", - default: [], - }), - ), + cwd: Schema.String, model: Schema.String, modelProvider: Schema.String, reasoningEffort: Schema.optionalKey( Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]), ), - sandbox: Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ - title: "WorkspaceWriteSandboxPolicyType", - }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, - ).annotate({ - description: - "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", - }), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sandbox: V2ThreadResumeResponse__SandboxPolicy, + serviceTier: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ServiceTier, Schema.Null])), thread: V2ThreadResumeResponse__Thread, }).annotate({ title: "ThreadResumeResponse" }); -export type V2ThreadResumeResponse__ActivePermissionProfile = { - readonly extends?: string | null; - readonly id: string; -}; -export const V2ThreadResumeResponse__ActivePermissionProfile = Schema.Struct({ - extends: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Parent profile identifier from the selected permissions profile's `extends` setting, when present.", - }), - Schema.Null, - ]), - ), - id: Schema.String.annotate({ - description: - "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", - }), -}); - -export type V2ThreadResumeResponse__ApprovalsReviewer = - | "user" - | "auto_review" - | "guardian_subagent"; +export type V2ThreadResumeResponse__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ThreadResumeResponse__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ThreadResumeResponse__ByteRange = { readonly end: number; readonly start: number }; @@ -40995,63 +30412,28 @@ export const V2ThreadResumeResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); -export type V2ThreadResumeResponse__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const V2ThreadResumeResponse__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - export type V2ThreadResumeResponse__NetworkAccess = "restricted" | "enabled"; export const V2ThreadResumeResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2ThreadResumeResponse__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } +export type V2ThreadResumeResponse__ReadOnlyAccess = | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadResumeResponse__SandboxPolicy = Schema.Union( + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; +export const V2ThreadResumeResponse__ReadOnlyAccess = Schema.Union( [ Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( + includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + readableRoots: Schema.optionalKey( Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), + type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), ], { mode: "oneOf" }, ); @@ -41075,14 +30457,6 @@ export const V2ThreadResumeResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeResponse__ThreadExtra = {}; -export const V2ThreadResumeResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadResumeResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadResumeResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - export type V2ThreadResumeResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -41110,24 +30484,6 @@ export const V2ThreadResumeResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadResumeResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - -export type V2ThreadResumeResponse__TurnsPage = { - readonly backwardsCursor?: string | null; - readonly data: ReadonlyArray; - readonly nextCursor?: string | null; -}; -export const V2ThreadResumeResponse__TurnsPage = Schema.Struct({ - backwardsCursor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - data: Schema.Array(V2ThreadResumeResponse__Turn), - nextCursor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), -}); - export type V2ThreadRollbackParams = { readonly numTurns: number; readonly threadId: string }; export const V2ThreadRollbackParams = Schema.Struct({ numTurns: Schema.Number.annotate({ @@ -41138,10 +30494,7 @@ export const V2ThreadRollbackParams = Schema.Struct({ .check(Schema.isInt()) .check(Schema.isGreaterThanOrEqualTo(0)), threadId: Schema.String, -}).annotate({ - title: "ThreadRollbackParams", - description: "DEPRECATED: `thread/rollback` will be removed soon.", -}); +}).annotate({ title: "ThreadRollbackParams" }); export type V2ThreadRollbackResponse = { readonly thread: { @@ -41156,11 +30509,8 @@ export type V2ThreadRollbackResponse = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -41177,7 +30527,6 @@ export type V2ThreadRollbackResponse = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -41208,10 +30557,7 @@ export const V2ThreadRollbackResponse = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -41228,9 +30574,7 @@ export const V2ThreadRollbackResponse = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -41240,15 +30584,6 @@ export const V2ThreadRollbackResponse = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -41258,18 +30593,6 @@ export const V2ThreadRollbackResponse = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -41300,11 +30623,6 @@ export const V2ThreadRollbackResponse = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -41396,11 +30714,8 @@ export type V2ThreadRollbackResponse__Thread = { readonly id: string; readonly modelProvider: string; readonly name?: string | null; - readonly parentThreadId?: string | null; readonly path?: string | null; readonly preview: string; - readonly recencyAt?: number | null; - readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -41417,7 +30732,6 @@ export type V2ThreadRollbackResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; - readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -41446,10 +30760,7 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ description: "Unix timestamp (in seconds) when the thread was created.", format: "int64", }).check(Schema.isInt()), - cwd: Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", - }), + cwd: Schema.String.annotate({ description: "Working directory captured for the thread." }), ephemeral: Schema.Boolean.annotate({ description: "Whether the thread is ephemeral and should not be materialized on disk.", }), @@ -41466,9 +30777,7 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ description: "Optional Git metadata captured when the thread was created.", }), ), - id: Schema.String.annotate({ - description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", - }), + id: Schema.String, modelProvider: Schema.String.annotate({ description: "Model provider used for this thread (for example, 'openai').", }), @@ -41478,15 +30787,6 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ Schema.Null, ]), ), - parentThreadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "The ID of the parent thread. This will only be set if this thread is a subagent.", - }), - Schema.Null, - ]), - ), path: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }), @@ -41496,18 +30796,6 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), - recencyAt: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ - description: "Unix timestamp (in seconds) used for thread recency ordering.", - format: "int64", - }).check(Schema.isInt()), - Schema.Null, - ]), - ), - sessionId: Schema.String.annotate({ - description: "Session id shared by threads that belong to the same session tree.", - }), source: Schema.Union( [ Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), @@ -41538,11 +30826,6 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({ - description: "Optional analytics source classification for this thread.", - }), - ), turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -41553,14 +30836,6 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ }).check(Schema.isInt()), }); -export type V2ThreadRollbackResponse__ThreadExtra = {}; -export const V2ThreadRollbackResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadRollbackResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadRollbackResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - export type V2ThreadRollbackResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -41588,13 +30863,6 @@ export const V2ThreadRollbackResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadRollbackResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadRollbackResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadSetNameParams = { readonly name: string; readonly threadId: string }; export const V2ThreadSetNameParams = Schema.Struct({ name: Schema.String, @@ -41606,36 +30874,6 @@ export const V2ThreadSetNameResponse = Schema.Struct({}).annotate({ title: "ThreadSetNameResponse", }); -export type V2ThreadSettingsUpdatedNotification = { - readonly threadId: string; - readonly threadSettings: V2ThreadSettingsUpdatedNotification__ThreadSettings; -}; -export const V2ThreadSettingsUpdatedNotification = Schema.Struct({ - threadId: Schema.String, - threadSettings: V2ThreadSettingsUpdatedNotification__ThreadSettings, -}).annotate({ title: "ThreadSettingsUpdatedNotification" }); - -export type V2ThreadSettingsUpdatedNotification__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const V2ThreadSettingsUpdatedNotification__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - -export type V2ThreadSettingsUpdatedNotification__NetworkAccess = "restricted" | "enabled"; -export const V2ThreadSettingsUpdatedNotification__NetworkAccess = Schema.Literals([ - "restricted", - "enabled", -]); - export type V2ThreadShellCommandParams = { readonly command: string; readonly threadId: string }; export const V2ThreadShellCommandParams = Schema.Struct({ command: Schema.String.annotate({ @@ -41723,17 +30961,6 @@ export const V2ThreadStartedNotification__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartedNotification__ThreadExtra = {}; -export const V2ThreadStartedNotification__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadStartedNotification__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadStartedNotification__ThreadHistoryMode = Schema.Literals([ - "legacy", - "paginated", -]); - export type V2ThreadStartedNotification__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -41761,13 +30988,6 @@ export const V2ThreadStartedNotification__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadStartedNotification__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadStartParams = { readonly approvalPolicy?: V2ThreadStartParams__AskForApproval | null; readonly approvalsReviewer?: V2ThreadStartParams__ApprovalsReviewer | null; @@ -41781,9 +31001,8 @@ export type V2ThreadStartParams = { readonly personality?: V2ThreadStartParams__Personality | null; readonly sandbox?: V2ThreadStartParams__SandboxMode | null; readonly serviceName?: string | null; - readonly serviceTier?: string | null; + readonly serviceTier?: V2ThreadStartParams__ServiceTier | null | null; readonly sessionStartSource?: V2ThreadStartParams__ThreadStartSource | null; - readonly threadSource?: V2ThreadStartParams__ThreadSource | null; }; export const V2ThreadStartParams = Schema.Struct({ approvalPolicy: Schema.optionalKey( @@ -41807,257 +31026,62 @@ export const V2ThreadStartParams = Schema.Struct({ personality: Schema.optionalKey(Schema.Union([V2ThreadStartParams__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([V2ThreadStartParams__SandboxMode, Schema.Null])), serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + serviceTier: Schema.optionalKey( + Schema.Union([Schema.Union([V2ThreadStartParams__ServiceTier, Schema.Null]), Schema.Null]), + ), sessionStartSource: Schema.optionalKey( Schema.Union([V2ThreadStartParams__ThreadStartSource, Schema.Null]), ), - threadSource: Schema.optionalKey( - Schema.Union([V2ThreadStartParams__ThreadSource, Schema.Null]).annotate({ - description: "Optional client-supplied analytics source classification for this thread.", - }), - ), }).annotate({ title: "ThreadStartParams" }); -export type V2ThreadStartParams__AbsolutePathBuf = string; -export const V2ThreadStartParams__AbsolutePathBuf = Schema.String.annotate({ - description: - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", -}); - -export type V2ThreadStartParams__CapabilityRootLocation = { - readonly environmentId: string; - readonly path: string; - readonly type: "environment"; +export type V2ThreadStartParams__DynamicToolSpec = { + readonly deferLoading?: boolean; + readonly description: string; + readonly inputSchema: unknown; + readonly name: string; }; -export const V2ThreadStartParams__CapabilityRootLocation = Schema.Union( - [ - Schema.Struct({ - environmentId: Schema.String, - path: Schema.String.annotate({ - description: "Absolute path for the root in the selected environment.", - }), - type: Schema.Literal("environment").annotate({ - title: "EnvironmentCapabilityRootLocationType", - }), - }).annotate({ - title: "EnvironmentCapabilityRootLocation", - description: "A path owned by an execution environment.", - }), - ], - { mode: "oneOf" }, -).annotate({ description: "Location used to resolve a selected capability root." }); - -export type V2ThreadStartParams__DynamicToolSpec = - | { - readonly deferLoading?: boolean; - readonly description: string; - readonly inputSchema: unknown; - readonly name: string; - readonly type: "function"; - } - | { - readonly description: string; - readonly name: string; - readonly tools: ReadonlyArray; - readonly type: "namespace"; - }; -export const V2ThreadStartParams__DynamicToolSpec = Schema.Union( - [ - Schema.Struct({ - deferLoading: Schema.optionalKey(Schema.Boolean), - description: Schema.String, - inputSchema: Schema.Unknown, - name: Schema.String, - type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolSpecType" }), - }).annotate({ title: "FunctionDynamicToolSpec" }), - Schema.Struct({ - description: Schema.String, - name: Schema.String, - tools: Schema.Array(V2ThreadStartParams__DynamicToolNamespaceTool), - type: Schema.Literal("namespace").annotate({ title: "NamespaceDynamicToolSpecType" }), - }).annotate({ title: "NamespaceDynamicToolSpec" }), - ], - { mode: "oneOf" }, -); - -export type V2ThreadStartParams__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const V2ThreadStartParams__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - -export type V2ThreadStartParams__SelectedCapabilityRoot = { - readonly id: string; - readonly location: { - readonly environmentId: string; - readonly path: string; - readonly type: "environment"; - }; -}; -export const V2ThreadStartParams__SelectedCapabilityRoot = Schema.Struct({ - id: Schema.String.annotate({ - description: "Stable identifier supplied by the capability selection platform.", - }), - location: Schema.Union( - [ - Schema.Struct({ - environmentId: Schema.String, - path: Schema.String.annotate({ - description: "Absolute path for the root in the selected environment.", - }), - type: Schema.Literal("environment").annotate({ - title: "EnvironmentCapabilityRootLocationType", - }), - }).annotate({ - title: "EnvironmentCapabilityRootLocation", - description: "A path owned by an execution environment.", - }), - ], - { mode: "oneOf" }, - ).annotate({ description: "Location used to resolve a selected capability root." }), -}).annotate({ - description: "A user-selected root that can expose one or more runtime capabilities.", -}); - -export type V2ThreadStartParams__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadStartParams__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - -export type V2ThreadStartParams__TurnEnvironmentParams = { - readonly cwd: V2ThreadStartParams__LegacyAppPathString; - readonly environmentId: string; - readonly runtimeWorkspaceRoots?: ReadonlyArray | null; -}; -export const V2ThreadStartParams__TurnEnvironmentParams = Schema.Struct({ - cwd: V2ThreadStartParams__LegacyAppPathString, - environmentId: Schema.String, - runtimeWorkspaceRoots: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ThreadStartParams__LegacyAppPathString).annotate({ - description: "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", - }), - Schema.Null, - ]), - ), +export const V2ThreadStartParams__DynamicToolSpec = Schema.Struct({ + deferLoading: Schema.optionalKey(Schema.Boolean), + description: Schema.String, + inputSchema: Schema.Unknown, + name: Schema.String, }); export type V2ThreadStartResponse = { readonly approvalPolicy: V2ThreadStartResponse__AskForApproval; - readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent"; - readonly cwd: V2ThreadStartResponse__AbsolutePathBuf; - readonly instructionSources?: ReadonlyArray; + readonly approvalsReviewer: "user" | "guardian_subagent"; + readonly cwd: string; readonly model: string; readonly modelProvider: string; readonly reasoningEffort?: V2ThreadStartResponse__ReasoningEffort | null; - readonly sandbox: - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; - readonly serviceTier?: string | null; + readonly sandbox: V2ThreadStartResponse__SandboxPolicy; + readonly serviceTier?: V2ThreadStartResponse__ServiceTier | null; readonly thread: V2ThreadStartResponse__Thread; }; export const V2ThreadStartResponse = Schema.Struct({ approvalPolicy: V2ThreadStartResponse__AskForApproval, - approvalsReviewer: Schema.Literals(["user", "auto_review", "guardian_subagent"]).annotate({ + approvalsReviewer: Schema.Literals(["user", "guardian_subagent"]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }), - cwd: V2ThreadStartResponse__AbsolutePathBuf, - instructionSources: Schema.optionalKey( - Schema.Array(V2ThreadStartResponse__LegacyAppPathString).annotate({ - description: - "Environment-native paths to instruction source files currently loaded for this thread.", - default: [], - }), - ), + cwd: Schema.String, model: Schema.String, modelProvider: Schema.String, reasoningEffort: Schema.optionalKey( Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]), ), - sandbox: Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ - title: "WorkspaceWriteSandboxPolicyType", - }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, - ).annotate({ - description: - "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", - }), - serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sandbox: V2ThreadStartResponse__SandboxPolicy, + serviceTier: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ServiceTier, Schema.Null])), thread: V2ThreadStartResponse__Thread, }).annotate({ title: "ThreadStartResponse" }); -export type V2ThreadStartResponse__ActivePermissionProfile = { - readonly extends?: string | null; - readonly id: string; -}; -export const V2ThreadStartResponse__ActivePermissionProfile = Schema.Struct({ - extends: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Parent profile identifier from the selected permissions profile's `extends` setting, when present.", - }), - Schema.Null, - ]), - ), - id: Schema.String.annotate({ - description: - "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", - }), -}); - -export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; +export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "guardian_subagent"; export const V2ThreadStartResponse__ApprovalsReviewer = Schema.Literals([ "user", - "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", }); export type V2ThreadStartResponse__ByteRange = { readonly end: number; readonly start: number }; @@ -42106,63 +31130,28 @@ export const V2ThreadStartResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); -export type V2ThreadStartResponse__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const V2ThreadStartResponse__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - export type V2ThreadStartResponse__NetworkAccess = "restricted" | "enabled"; export const V2ThreadStartResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2ThreadStartResponse__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { readonly networkAccess?: boolean; readonly type: "readOnly" } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } +export type V2ThreadStartResponse__ReadOnlyAccess = | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadStartResponse__SandboxPolicy = Schema.Union( + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; +export const V2ThreadStartResponse__ReadOnlyAccess = Schema.Union( [ Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - networkAccess: Schema.optionalKey( - Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), - ), - type: Schema.Literal("externalSandbox").annotate({ - title: "ExternalSandboxSandboxPolicyType", - }), - }).annotate({ title: "ExternalSandboxSandboxPolicy" }), - Schema.Struct({ - excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( + includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + readableRoots: Schema.optionalKey( Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), + type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), ], { mode: "oneOf" }, ); @@ -42186,14 +31175,6 @@ export const V2ThreadStartResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartResponse__ThreadExtra = {}; -export const V2ThreadStartResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadStartResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadStartResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]); - export type V2ThreadStartResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -42221,13 +31202,6 @@ export const V2ThreadStartResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadStartResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadStatusChangedNotification = { readonly status: V2ThreadStatusChangedNotification__ThreadStatus; readonly threadId: string; @@ -42328,17 +31302,6 @@ export const V2ThreadUnarchiveResponse__SessionSource = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadUnarchiveResponse__ThreadExtra = {}; -export const V2ThreadUnarchiveResponse__ThreadExtra = Schema.Struct({}).annotate({ - description: "Extra app-server data for a thread.", -}); - -export type V2ThreadUnarchiveResponse__ThreadHistoryMode = "legacy" | "paginated"; -export const V2ThreadUnarchiveResponse__ThreadHistoryMode = Schema.Literals([ - "legacy", - "paginated", -]); - export type V2ThreadUnarchiveResponse__ThreadStatus = | { readonly type: "notLoaded" } | { readonly type: "idle" } @@ -42366,13 +31329,6 @@ export const V2ThreadUnarchiveResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadUnarchiveResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2ThreadUnsubscribeParams = { readonly threadId: string }; export const V2ThreadUnsubscribeParams = Schema.Struct({ threadId: Schema.String }).annotate({ title: "ThreadUnsubscribeParams", @@ -42443,13 +31399,6 @@ export const V2TurnCompletedNotification__CommandExecutionSource = Schema.Litera "unifiedExecInteraction", ]); -export type V2TurnCompletedNotification__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2TurnCompletedNotification__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2TurnDiffUpdatedNotification = { readonly diff: string; readonly threadId: string; @@ -42476,17 +31425,6 @@ export const V2TurnInterruptResponse = Schema.Struct({}).annotate({ title: "TurnInterruptResponse", }); -export type V2TurnModerationMetadataNotification = { - readonly metadata: unknown; - readonly threadId: string; - readonly turnId: string; -}; -export const V2TurnModerationMetadataNotification = Schema.Struct({ - metadata: Schema.Unknown, - threadId: Schema.String, - turnId: Schema.String, -}).annotate({ title: "TurnModerationMetadataNotification" }); - export type V2TurnPlanUpdatedNotification = { readonly explanation?: string | null; readonly plan: ReadonlyArray; @@ -42555,17 +31493,9 @@ export const V2TurnStartedNotification__CommandExecutionSource = Schema.Literals "unifiedExecInteraction", ]); -export type V2TurnStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2TurnStartedNotification__TurnItemsView = Schema.Literals([ - "notLoaded", - "summary", - "full", -]); - export type V2TurnStartParams = { readonly approvalPolicy?: V2TurnStartParams__AskForApproval | null; readonly approvalsReviewer?: V2TurnStartParams__ApprovalsReviewer | null; - readonly clientUserMessageId?: string | null; readonly cwd?: string | null; readonly effort?: V2TurnStartParams__ReasoningEffort | null; readonly input: ReadonlyArray; @@ -42573,7 +31503,7 @@ export type V2TurnStartParams = { readonly outputSchema?: unknown; readonly personality?: V2TurnStartParams__Personality | null; readonly sandboxPolicy?: V2TurnStartParams__SandboxPolicy | null; - readonly serviceTier?: string | null; + readonly serviceTier?: V2TurnStartParams__ServiceTier | null | null; readonly summary?: V2TurnStartParams__ReasoningSummary | null; readonly threadId: string; }; @@ -42589,7 +31519,6 @@ export const V2TurnStartParams = Schema.Struct({ "Override where approval requests are routed for review on this turn and subsequent turns.", }), ), - clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), cwd: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ @@ -42630,11 +31559,9 @@ export const V2TurnStartParams = Schema.Struct({ ), serviceTier: Schema.optionalKey( Schema.Union([ - Schema.String.annotate({ - description: "Override the service tier for this turn and subsequent turns.", - }), + Schema.Union([V2TurnStartParams__ServiceTier, Schema.Null]), Schema.Null, - ]), + ]).annotate({ description: "Override the service tier for this turn and subsequent turns." }), ), summary: Schema.optionalKey( Schema.Union([V2TurnStartParams__ReasoningSummary, Schema.Null]).annotate({ @@ -42644,15 +31571,6 @@ export const V2TurnStartParams = Schema.Struct({ threadId: Schema.String, }).annotate({ title: "TurnStartParams" }); -export type V2TurnStartParams__AdditionalContextEntry = { - readonly kind: V2TurnStartParams__AdditionalContextKind; - readonly value: string; -}; -export const V2TurnStartParams__AdditionalContextEntry = Schema.Struct({ - kind: V2TurnStartParams__AdditionalContextKind, - value: Schema.String, -}); - export type V2TurnStartParams__ByteRange = { readonly end: number; readonly start: number }; export const V2TurnStartParams__ByteRange = Schema.Struct({ end: Schema.Number.annotate({ format: "uint" }) @@ -42672,41 +31590,31 @@ export const V2TurnStartParams__CollaborationMode = Schema.Struct({ settings: V2TurnStartParams__Settings, }).annotate({ description: "Collaboration mode for a Codex session." }); -export type V2TurnStartParams__MultiAgentMode = - | "explicitRequestOnly" - | "proactive" - | { readonly custom: string }; -export const V2TurnStartParams__MultiAgentMode = Schema.Union( - [ - Schema.Literals(["explicitRequestOnly", "proactive"]), - Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }), - ], - { mode: "oneOf" }, -).annotate({ - description: - "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", -}); - export type V2TurnStartParams__NetworkAccess = "restricted" | "enabled"; export const V2TurnStartParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2TurnStartParams__TurnEnvironmentParams = { - readonly cwd: V2TurnStartParams__LegacyAppPathString; - readonly environmentId: string; - readonly runtimeWorkspaceRoots?: ReadonlyArray | null; -}; -export const V2TurnStartParams__TurnEnvironmentParams = Schema.Struct({ - cwd: V2TurnStartParams__LegacyAppPathString, - environmentId: Schema.String, - runtimeWorkspaceRoots: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2TurnStartParams__LegacyAppPathString).annotate({ - description: "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", - }), - Schema.Null, - ]), - ), -}); +export type V2TurnStartParams__ReadOnlyAccess = + | { + readonly includePlatformDefaults?: boolean; + readonly readableRoots?: ReadonlyArray; + readonly type: "restricted"; + } + | { readonly type: "fullAccess" }; +export const V2TurnStartParams__ReadOnlyAccess = Schema.Union( + [ + Schema.Struct({ + includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), + readableRoots: Schema.optionalKey( + Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), + ), + type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), + }).annotate({ title: "RestrictedReadOnlyAccess" }), + Schema.Struct({ + type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), + }).annotate({ title: "FullAccessReadOnlyAccess" }), + ], + { mode: "oneOf" }, +); export type V2TurnStartResponse = { readonly turn: V2TurnStartResponse__Turn }; export const V2TurnStartResponse = Schema.Struct({ turn: V2TurnStartResponse__Turn }).annotate({ @@ -42756,17 +31664,12 @@ export const V2TurnStartResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); -export type V2TurnStartResponse__TurnItemsView = "notLoaded" | "summary" | "full"; -export const V2TurnStartResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]); - export type V2TurnSteerParams = { - readonly clientUserMessageId?: string | null; readonly expectedTurnId: string; readonly input: ReadonlyArray; readonly threadId: string; }; export const V2TurnSteerParams = Schema.Struct({ - clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), expectedTurnId: Schema.String.annotate({ description: "Required active turn id precondition. The request fails when it does not match the currently active turn.", @@ -42775,15 +31678,6 @@ export const V2TurnSteerParams = Schema.Struct({ threadId: Schema.String, }).annotate({ title: "TurnSteerParams" }); -export type V2TurnSteerParams__AdditionalContextEntry = { - readonly kind: V2TurnSteerParams__AdditionalContextKind; - readonly value: string; -}; -export const V2TurnSteerParams__AdditionalContextEntry = Schema.Struct({ - kind: V2TurnSteerParams__AdditionalContextKind, - value: Schema.String, -}); - export type V2TurnSteerParams__ByteRange = { readonly end: number; readonly start: number }; export const V2TurnSteerParams__ByteRange = Schema.Struct({ end: Schema.Number.annotate({ format: "uint" }) @@ -42799,26 +31693,6 @@ export const V2TurnSteerResponse = Schema.Struct({ turnId: Schema.String }).anno title: "TurnSteerResponse", }); -export type V2WarningNotification = { readonly message: string; readonly threadId?: string | null }; -export const V2WarningNotification = Schema.Struct({ - message: Schema.String.annotate({ description: "Concise warning message for the user." }), - threadId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Optional thread target when the warning applies to a specific thread.", - }), - Schema.Null, - ]), - ), -}).annotate({ title: "WarningNotification" }); - -export type V2WindowsSandboxReadinessResponse = { - readonly status: V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness; -}; -export const V2WindowsSandboxReadinessResponse = Schema.Struct({ - status: V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness, -}).annotate({ title: "WindowsSandboxReadinessResponse" }); - export type V2WindowsSandboxSetupCompletedNotification = { readonly error?: string | null; readonly mode: V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode; diff --git a/packages/effect-codex-app-server/src/_internal/shared.ts b/packages/effect-codex-app-server/src/_internal/shared.ts index 34155348ab..99fe8e5360 100644 --- a/packages/effect-codex-app-server/src/_internal/shared.ts +++ b/packages/effect-codex-app-server/src/_internal/shared.ts @@ -1,8 +1,11 @@ import * as Effect from "effect/Effect"; import * as Schema from "effect/Schema"; +import * as SchemaIssue from "effect/SchemaIssue"; import * as CodexError from "../errors.ts"; +const formatSchemaIssue = SchemaIssue.makeFormatterDefault(); + export const JsonRpcId = Schema.Union([Schema.Number, Schema.String]); export const JsonRpcError = Schema.Struct({ @@ -27,13 +30,16 @@ export const decodeOptionalPayload = ( return Effect.sync(() => undefined as A); } return Effect.fail( - CodexError.CodexAppServerRequestError.unexpectedPayload(method, "decode-payload", raw), + CodexError.CodexAppServerRequestError.invalidParams(`${method} does not accept params`, raw), ); } return Schema.decodeUnknownEffect(schema)(raw).pipe( Effect.mapError((error) => - CodexError.CodexAppServerRequestError.invalidPayload(method, "decode-payload", error), + CodexError.CodexAppServerRequestError.invalidParams( + `Invalid ${method} payload: ${formatSchemaIssue(error.issue)}`, + { issue: error.issue }, + ), ), ); }; @@ -48,13 +54,19 @@ export const encodeOptionalPayload = ( return Effect.sync(() => undefined); } return Effect.fail( - CodexError.CodexAppServerRequestError.unexpectedPayload(method, "encode-payload", payload), + CodexError.CodexAppServerRequestError.invalidParams( + `${method} does not accept params`, + payload, + ), ); } return Schema.encodeEffect(schema)(payload).pipe( Effect.mapError((error) => - CodexError.CodexAppServerRequestError.invalidPayload(method, "encode-payload", error), + CodexError.CodexAppServerRequestError.invalidParams( + `Invalid ${method} payload: ${formatSchemaIssue(error.issue)}`, + { issue: error.issue }, + ), ), ); }; @@ -65,12 +77,12 @@ export const decodeNotificationPayload = ( raw: unknown, ): Effect.Effect => decodeOptionalPayload(method, schema, raw).pipe( - Effect.mapError((error) => - CodexError.CodexAppServerProtocolParseError.fromRequestError( - "decode-notification-payload", - method, - error, - ), + Effect.mapError( + (error) => + new CodexError.CodexAppServerProtocolParseError({ + detail: error.message, + cause: error, + }), ), ); @@ -84,8 +96,6 @@ export const runHandler = Effect.fnUntraced(function* ( } return yield* handler(payload).pipe( - Effect.mapError((error) => - CodexError.CodexAppServerRequestError.fromAppServerError(error, method), - ), + Effect.mapError((error) => CodexError.normalizeToRequestError(error)), ); }); diff --git a/packages/effect-codex-app-server/src/_internal/stdio.ts b/packages/effect-codex-app-server/src/_internal/stdio.ts index 312022824c..84a03e3a74 100644 --- a/packages/effect-codex-app-server/src/_internal/stdio.ts +++ b/packages/effect-codex-app-server/src/_internal/stdio.ts @@ -9,6 +9,7 @@ import { ChildProcessSpawner } from "effect/unstable/process"; import * as CodexError from "../errors.ts"; const encoder = new TextEncoder(); +const decoder = new TextDecoder(); export const makeChildStdio = (handle: ChildProcessSpawner.ChildProcessHandle) => Stdio.make({ @@ -24,7 +25,6 @@ export const makeChildStdio = (handle: ChildProcessSpawner.ChildProcessHandle) = export const makeInMemoryStdio = Effect.fn("makeInMemoryStdio")(function* () { const input = yield* Queue.unbounded>(); const output = yield* Queue.unbounded(); - const decoder = new TextDecoder(); return { stdio: Stdio.make({ @@ -32,10 +32,7 @@ export const makeInMemoryStdio = Effect.fn("makeInMemoryStdio")(function* () { stdin: Stream.fromQueue(input), stdout: () => Sink.forEach((chunk: string | Uint8Array) => - Queue.offer( - output, - typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true }), - ), + Queue.offer(output, typeof chunk === "string" ? chunk : decoder.decode(chunk)), ), stderr: () => Sink.drain, }), @@ -44,20 +41,14 @@ export const makeInMemoryStdio = Effect.fn("makeInMemoryStdio")(function* () { }; }); -type ChildProcessTerminationHandle = Pick< - ChildProcessSpawner.ChildProcessHandle, - "exitCode" | "pid" ->; - export const makeTerminationError = ( - handle: ChildProcessTerminationHandle, + handle: ChildProcessSpawner.ChildProcessHandle, ): Effect.Effect => Effect.match(handle.exitCode, { onFailure: (cause) => new CodexError.CodexAppServerTransportError({ - operation: "read-process-exit-status", - pid: handle.pid, + detail: "Failed to determine Codex App Server process exit status", cause, }), - onSuccess: (code) => new CodexError.CodexAppServerProcessExitedError({ code, pid: handle.pid }), + onSuccess: (code) => new CodexError.CodexAppServerProcessExitedError({ code }), }); diff --git a/packages/effect-codex-app-server/src/client.test.ts b/packages/effect-codex-app-server/src/client.test.ts index 3830c5fc5f..bfdc64a546 100644 --- a/packages/effect-codex-app-server/src/client.test.ts +++ b/packages/effect-codex-app-server/src/client.test.ts @@ -14,17 +14,15 @@ import * as CodexClient from "./client.ts"; const mockPeerPath = Effect.map(Effect.service(Path.Path), (path) => path.join(import.meta.dirname, "../test/fixtures/codex-app-server-mock-peer.ts"), ); -const mockPeerArgs = (path: string) => [path]; it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => { - const makeHandle = (env?: Record) => + const makeHandle = () => Effect.gen(function* () { const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; const path = yield* Path.Path; - const peerCwd = path.join(import.meta.dirname, ".."); - const command = ChildProcess.make(process.execPath, mockPeerArgs(yield* mockPeerPath), { - cwd: peerCwd, - ...(env ? { env: { ...process.env, ...env } } : {}), + const command = ChildProcess.make("bun", ["run", yield* mockPeerPath], { + cwd: path.join(import.meta.dirname, ".."), + shell: process.platform === "win32", }); return yield* spawner.spawn(command); }); @@ -80,11 +78,11 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => { planType: "plus", }); - const path = yield* Path.Path; - const peerCwd = path.join(import.meta.dirname, ".."); - const skills = yield* client.request("skills/list", { cwds: [peerCwd] }); + const skills = yield* client.request("skills/list", { + cwds: [process.cwd()], + }); assert.equal(skills.data.length, 1); - assert.equal(skills.data[0]?.cwd, peerCwd); + assert.equal(skills.data[0]?.cwd, process.cwd()); return { account, @@ -123,35 +121,4 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => { ]); }), ); - it.effect("drains child stderr so large diagnostics cannot block protocol responses", () => - Effect.gen(function* () { - const handle = yield* makeHandle({ - CODEX_APP_SERVER_TEST_STDERR_BYTES: String(512 * 1024), - }); - const scope = yield* Scope.make(); - const clientLayer = CodexClient.layerChildProcess(handle); - const context = yield* Layer.buildWithScope(clientLayer, scope); - - const initialized = yield* Effect.gen(function* () { - const client = yield* CodexClient.CodexAppServerClient; - return yield* client.request("initialize", { - clientInfo: { - name: "effect-codex-app-server-test", - title: "Effect Codex App Server Test", - version: "0.0.0", - }, - capabilities: { - experimentalApi: true, - optOutNotificationMethods: null, - }, - }); - }).pipe( - Effect.timeout("5 seconds"), - Effect.provide(context), - Effect.ensuring(Scope.close(scope, Exit.void)), - ); - - assert.equal(initialized.userAgent, "mock-codex-app-server"); - }), - ); }); diff --git a/packages/effect-codex-app-server/src/client.ts b/packages/effect-codex-app-server/src/client.ts index c0cb5b1dc2..d021521c7c 100644 --- a/packages/effect-codex-app-server/src/client.ts +++ b/packages/effect-codex-app-server/src/client.ts @@ -4,8 +4,7 @@ import * as Layer from "effect/Layer"; import * as Schema from "effect/Schema"; import * as Scope from "effect/Scope"; import * as Stdio from "effect/Stdio"; -import * as Stream from "effect/Stream"; -import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; +import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; import * as CodexRpc from "./_generated/meta.gen.ts"; import * as CodexError from "./errors.ts"; @@ -35,47 +34,46 @@ interface CodexAppServerClientRaw { readonly respondError: CodexProtocol.CodexAppServerPatchedProtocol["respondError"]; } +export interface CodexAppServerClientShape { + readonly raw: CodexAppServerClientRaw; + readonly request: ( + method: M, + payload: CodexRpc.ClientRequestParamsByMethod[M], + ) => Effect.Effect; + readonly notify: ( + method: M, + payload: CodexRpc.ClientNotificationParamsByMethod[M], + ) => Effect.Effect; + readonly handleServerRequest: ( + method: M, + handler: ( + payload: CodexRpc.ServerRequestParamsByMethod[M], + ) => Effect.Effect, + ) => Effect.Effect; + readonly handleServerNotification: ( + method: M, + handler: ( + payload: CodexRpc.ServerNotificationParamsByMethod[M], + ) => Effect.Effect, + ) => Effect.Effect; + readonly handleUnknownServerRequest: ( + handler: ( + method: string, + params: unknown, + ) => Effect.Effect, + ) => Effect.Effect; + readonly handleUnknownServerNotification: ( + handler: ( + method: string, + params: unknown, + ) => Effect.Effect, + ) => Effect.Effect; +} + export class CodexAppServerClient extends Context.Service< CodexAppServerClient, - { - readonly raw: CodexAppServerClientRaw; - readonly request: ( - method: M, - payload: CodexRpc.ClientRequestParamsByMethod[M], - ) => Effect.Effect; - readonly notify: ( - method: M, - payload: CodexRpc.ClientNotificationParamsByMethod[M], - ) => Effect.Effect; - readonly handleServerRequest: ( - method: M, - handler: ( - payload: CodexRpc.ServerRequestParamsByMethod[M], - ) => Effect.Effect< - CodexRpc.ServerRequestResponsesByMethod[M], - CodexError.CodexAppServerError - >, - ) => Effect.Effect; - readonly handleServerNotification: ( - method: M, - handler: ( - payload: CodexRpc.ServerNotificationParamsByMethod[M], - ) => Effect.Effect, - ) => Effect.Effect; - readonly handleUnknownServerRequest: ( - handler: ( - method: string, - params: unknown, - ) => Effect.Effect, - ) => Effect.Effect; - readonly handleUnknownServerNotification: ( - handler: ( - method: string, - params: unknown, - ) => Effect.Effect, - ) => Effect.Effect; - } ->()("effect-codex-app-server/client/CodexAppServerClient") {} + CodexAppServerClientShape +>()("effect-codex-app-server/CodexAppServerClient") {} type ServerRequestHandler = ( payload: unknown, @@ -88,7 +86,7 @@ export const make = Effect.fn("effect-codex-app-server/CodexAppServerClient.make stdio: Stdio.Stdio, options: CodexAppServerClientOptions = {}, terminationError?: Effect.Effect, -): Effect.fn.Return { +): Effect.fn.Return { const requestHandlers = new Map(); const notificationHandlers = new Map>(); let unknownRequestHandler: @@ -250,20 +248,51 @@ export const make = Effect.fn("effect-codex-app-server/CodexAppServerClient.make }); }); -export const layer = ( - stdio: Stdio.Stdio, - options: CodexAppServerClientOptions = {}, -): Layer.Layer => Layer.effect(CodexAppServerClient, make(stdio, options)); - export const layerChildProcess = ( handle: ChildProcessSpawner.ChildProcessHandle, options: CodexAppServerClientOptions = {}, -): Layer.Layer => - Layer.effect(CodexAppServerClient, makeChildProcessClient(handle, options)); +): Layer.Layer => { + const stdio = makeChildStdio(handle); + const terminationError = makeTerminationError(handle); + return Layer.effect(CodexAppServerClient, make(stdio, options, terminationError)); +}; -const makeChildProcessClient = Effect.fn( - "effect-codex-app-server/CodexAppServerClient.makeChildProcessClient", -)(function* (handle: ChildProcessSpawner.ChildProcessHandle, options: CodexAppServerClientOptions) { - yield* Stream.runDrain(handle.stderr).pipe(Effect.ignore, Effect.forkScoped); - return yield* make(makeChildStdio(handle), options, makeTerminationError(handle)); -}); +export interface CodexAppServerCommandLayerOptions extends CodexAppServerClientOptions { + readonly command: string; + readonly args?: ReadonlyArray; + readonly cwd?: string; + readonly env?: Record; +} + +export const layerCommand = ( + options: CodexAppServerCommandLayerOptions, +): Layer.Layer< + CodexAppServerClient, + CodexError.CodexAppServerSpawnError, + ChildProcessSpawner.ChildProcessSpawner +> => + Layer.effect( + CodexAppServerClient, + Effect.acquireRelease( + Effect.gen(function* () { + const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; + const command = ChildProcess.make(options.command, [...(options.args ?? [])], { + ...(options.cwd ? { cwd: options.cwd } : {}), + ...(options.env ? { env: { ...process.env, ...options.env } } : {}), + shell: process.platform === "win32", + }); + const handle = yield* spawner.spawn(command).pipe( + Effect.mapError( + (cause) => + new CodexError.CodexAppServerSpawnError({ + command: [options.command, ...(options.args ?? [])].join(" "), + cause, + }), + ), + ); + const client = yield* make(makeChildStdio(handle), options, makeTerminationError(handle)); + return { client, handle }; + }), + ({ handle }) => handle.kill().pipe(Effect.orDie), + ).pipe(Effect.map(({ client }) => client)), + ); diff --git a/packages/effect-codex-app-server/src/errors.ts b/packages/effect-codex-app-server/src/errors.ts index f0e0945d35..ff206c2e36 100644 --- a/packages/effect-codex-app-server/src/errors.ts +++ b/packages/effect-codex-app-server/src/errors.ts @@ -1,126 +1,4 @@ import * as Schema from "effect/Schema"; -import type * as SchemaIssue from "effect/SchemaIssue"; - -export const CodexAppServerRequestOperation = Schema.Literals([ - "decode-payload", - "encode-payload", - "handle-request", - "receive-response", -]); -export type CodexAppServerRequestOperation = typeof CodexAppServerRequestOperation.Type; - -export const CodexAppServerSchemaIssueKind = Schema.Literals([ - "Filter", - "Encoding", - "Pointer", - "Composite", - "AnyOf", - "InvalidType", - "InvalidValue", - "MissingKey", - "UnexpectedKey", - "Forbidden", - "OneOf", -]); -export type CodexAppServerSchemaIssueKind = typeof CodexAppServerSchemaIssueKind.Type; - -export interface CodexAppServerSchemaIssueDiagnostics { - readonly issueCount: number; - readonly issueKinds: ReadonlyArray; - readonly maximumPathDepth: number; -} - -const schemaIssueDiagnostics = (root: SchemaIssue.Issue): CodexAppServerSchemaIssueDiagnostics => { - let issueCount = 0; - let maximumPathDepth = 0; - const issueKinds = new Set(); - - const visit = (issue: SchemaIssue.Issue, pathDepth: number): void => { - issueCount += 1; - issueKinds.add(issue._tag); - maximumPathDepth = Math.max(maximumPathDepth, pathDepth); - switch (issue._tag) { - case "Filter": - case "Encoding": - visit(issue.issue, pathDepth); - break; - case "Pointer": - visit(issue.issue, pathDepth + issue.path.length); - break; - case "Composite": - case "AnyOf": - for (const child of issue.issues) visit(child, pathDepth); - break; - } - }; - - visit(root, 0); - return { - issueCount, - issueKinds: [...issueKinds], - maximumPathDepth, - }; -}; - -export const CodexAppServerPayloadKind = Schema.Literals([ - "null", - "array", - "string", - "number", - "boolean", - "bigint", - "object", - "symbol", - "function", - "undefined", -]); -export type CodexAppServerPayloadKind = typeof CodexAppServerPayloadKind.Type; - -const payloadKind = (payload: unknown): CodexAppServerPayloadKind => { - if (payload === null) return "null"; - if (Array.isArray(payload)) return "array"; - return typeof payload; -}; - -const protocolMessageFields = ["id", "method", "params", "result", "error"] as const; - -export const CodexAppServerProtocolMessageField = Schema.Literals(protocolMessageFields); -export type CodexAppServerProtocolMessageField = typeof CodexAppServerProtocolMessageField.Type; - -export interface CodexAppServerRequestDiagnostics { - readonly method?: string; - readonly requestId?: string; - readonly operation?: CodexAppServerRequestOperation; - readonly cause?: unknown; - readonly issueCount?: number; - readonly issueKinds?: ReadonlyArray; - readonly maximumPathDepth?: number; - readonly payloadKind?: CodexAppServerPayloadKind; -} - -export const CodexAppServerProtocolParseOperation = Schema.Literals([ - "encode-wire-message", - "decode-wire-message", - "route-wire-message", - "decode-notification-payload", - "decode-request-payload", - "decode-response-payload", -]); -export type CodexAppServerProtocolParseOperation = typeof CodexAppServerProtocolParseOperation.Type; - -export const CodexAppServerTransportOperation = Schema.Literals([ - "read-input-stream", - "read-process-exit-status", -]); -export type CodexAppServerTransportOperation = typeof CodexAppServerTransportOperation.Type; - -export const CodexAppServerIdentifierPurpose = Schema.Literals([ - "provider-event", - "command-approval-request", - "file-change-approval-request", - "user-input-request", -]); -export type CodexAppServerIdentifierPurpose = typeof CodexAppServerIdentifierPurpose.Type; export interface CodexAppServerProtocolErrorShape { readonly code: number; @@ -132,7 +10,7 @@ export class CodexAppServerSpawnError extends Schema.TaggedErrorClass()( "CodexAppServerProtocolParseError", { - operation: CodexAppServerProtocolParseOperation, - method: Schema.optionalKey(Schema.String), - requestId: Schema.optionalKey(Schema.String), - payloadKind: Schema.optionalKey(CodexAppServerPayloadKind), - presentFields: Schema.optionalKey(Schema.Array(CodexAppServerProtocolMessageField)), - issueCount: Schema.optionalKey(Schema.Number), - issueKinds: Schema.optionalKey(Schema.Array(CodexAppServerSchemaIssueKind)), - maximumPathDepth: Schema.optionalKey(Schema.Number), - cause: Schema.optional(Schema.Defect()), + detail: Schema.String, + cause: Schema.optional(Schema.Defect), }, ) { override get message() { - const method = this.method === undefined ? "" : ` for method '${this.method}'`; - return `Codex App Server protocol operation '${this.operation}' failed${method}.`; - } - - static fromSchemaError( - operation: CodexAppServerProtocolParseOperation, - cause: Schema.SchemaError, - context: { readonly method?: string; readonly requestId?: string } = {}, - ) { - return new CodexAppServerProtocolParseError({ - operation, - ...context, - ...schemaIssueDiagnostics(cause.issue), - cause, - }); - } - - static fromRequestError( - operation: CodexAppServerProtocolParseOperation, - method: string, - cause: CodexAppServerRequestError, - ) { - return new CodexAppServerProtocolParseError({ - operation, - method, - ...(cause.issueCount === undefined ? {} : { issueCount: cause.issueCount }), - ...(cause.issueKinds === undefined ? {} : { issueKinds: cause.issueKinds }), - ...(cause.maximumPathDepth === undefined ? {} : { maximumPathDepth: cause.maximumPathDepth }), - cause, - }); - } - - static fromUnroutableMessage(message: unknown) { - const diagnostics = { payloadKind: payloadKind(message) }; - if (typeof message !== "object" || message === null || Array.isArray(message)) { - return new CodexAppServerProtocolParseError({ - operation: "route-wire-message", - ...diagnostics, - }); - } - - const presentFields = protocolMessageFields.filter((field) => field in message); - const method = - "method" in message && typeof message.method === "string" ? message.method : undefined; - const requestId = - "id" in message && (typeof message.id === "string" || typeof message.id === "number") - ? String(message.id) - : undefined; - return new CodexAppServerProtocolParseError({ - operation: "route-wire-message", - ...diagnostics, - presentFields, - ...(method === undefined ? {} : { method }), - ...(requestId === undefined ? {} : { requestId }), - }); + return `Failed to parse Codex App Server protocol message: ${this.detail}`; } } export class CodexAppServerTransportError extends Schema.TaggedErrorClass()( "CodexAppServerTransportError", { - operation: CodexAppServerTransportOperation, - pid: Schema.optionalKey(Schema.Int), - cause: Schema.Defect(), + detail: Schema.String, + cause: Schema.Defect, }, ) { override get message() { - return `Codex App Server transport operation '${this.operation}' failed.`; - } -} - -export class CodexAppServerIdentifierGenerationError extends Schema.TaggedErrorClass()( - "CodexAppServerIdentifierGenerationError", - { - purpose: CodexAppServerIdentifierPurpose, - cause: Schema.Defect(), - }, -) { - override get message() { - return `Failed to generate Codex App Server identifier for ${this.purpose}.`; - } -} - -export class CodexAppServerInputStreamEndedError extends Schema.TaggedErrorClass()( - "CodexAppServerInputStreamEndedError", - {}, -) { - override get message() { - return "Codex App Server input stream ended."; + return this.detail; } } @@ -270,51 +64,20 @@ export class CodexAppServerRequestError extends Schema.TaggedErrorClass encoder.encode(`${encodeUnknownJsonString(value)}\n`); - -const decodeJson = Schema.decodeEffect(Schema.fromJsonString(Schema.Unknown)); -const decodeAccountTokenUsageResponse = Schema.decodeUnknownEffect( - CodexRpc.CLIENT_REQUEST_RESPONSES["account/usage/read"], -); -const decodeAccountRateLimitsResponse = Schema.decodeUnknownEffect( - CodexRpc.CLIENT_REQUEST_RESPONSES["account/rateLimits/read"], -); -const decodeConsumeRateLimitResetCreditParams = Schema.decodeUnknownEffect( - CodexRpc.CLIENT_REQUEST_PARAMS["account/rateLimitResetCredit/consume"], -); -const decodeConsumeRateLimitResetCreditResponse = Schema.decodeUnknownEffect( - CodexRpc.CLIENT_REQUEST_RESPONSES["account/rateLimitResetCredit/consume"], -); +const encodeJsonl = (value: unknown) => encoder.encode(`${JSON.stringify(value)}\n`); it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => { - it.effect("maps account usage responses to the upstream token usage schema", () => - Effect.gen(function* () { - assert.strictEqual( - CodexRpc.CLIENT_REQUEST_RESPONSES["account/usage/read"], - CodexSchema.V2GetAccountTokenUsageResponse, - ); - const decoded = yield* decodeAccountTokenUsageResponse({ - dailyUsageBuckets: [{ startDate: "2026-06-10", tokens: 42 }], - summary: { lifetimeTokens: 42 }, - }); - assert.deepEqual(decoded, { - dailyUsageBuckets: [{ startDate: "2026-06-10", tokens: 42 }], - summary: { lifetimeTokens: 42 }, - }); - }), - ); - - it.effect("maps earned rate-limit reset credits from account rate-limit snapshots", () => - Effect.gen(function* () { - assert.strictEqual( - CodexRpc.CLIENT_REQUEST_RESPONSES["account/rateLimits/read"], - CodexSchema.V2GetAccountRateLimitsResponse, - ); - - const response = { - rateLimits: {}, - rateLimitResetCredits: { - availableCount: 2, - credits: [ - { - id: "RateLimitResetCredit_1", - resetType: "codexRateLimits", - status: "available", - grantedAt: 1_781_654_400, - expiresAt: 1_784_246_400, - title: "Full reset", - description: "Ready to redeem", - }, - { - id: "RateLimitResetCredit_2", - resetType: "unknown", - status: "unknown", - grantedAt: 1_781_654_401, - expiresAt: null, - }, - ], - }, - } as const; - - assert.deepEqual(yield* decodeAccountRateLimitsResponse(response), response); - assert.deepEqual( - yield* decodeAccountRateLimitsResponse({ - rateLimits: {}, - rateLimitResetCredits: { availableCount: 2, credits: null }, - }), - { - rateLimits: {}, - rateLimitResetCredits: { availableCount: 2, credits: null }, - }, - ); - }), - ); - - it.effect("maps the earned rate-limit reset consume request and response", () => - Effect.gen(function* () { - assert.equal( - CodexRpc.CLIENT_REQUEST_METHODS["account/rateLimitResetCredit/consume"], - "account/rateLimitResetCredit/consume", - ); - assert.strictEqual( - CodexRpc.CLIENT_REQUEST_PARAMS["account/rateLimitResetCredit/consume"], - CodexSchema.V2ConsumeAccountRateLimitResetCreditParams, - ); - assert.strictEqual( - CodexRpc.CLIENT_REQUEST_RESPONSES["account/rateLimitResetCredit/consume"], - CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse, - ); - - assert.deepEqual( - yield* decodeConsumeRateLimitResetCreditParams({ - idempotencyKey: "8ae96ff3-3425-4f4c-8772-b6fd61502868", - creditId: "RateLimitResetCredit_1", - }), - { - idempotencyKey: "8ae96ff3-3425-4f4c-8772-b6fd61502868", - creditId: "RateLimitResetCredit_1", - }, - ); - assert.deepEqual(yield* decodeConsumeRateLimitResetCreditResponse({ outcome: "reset" }), { - outcome: "reset", - }); - }), - ); - it.effect( "encodes requests without a jsonrpc field and routes inbound requests and notifications", () => @@ -172,7 +60,7 @@ it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => { const pendingInitialize = yield* transport .request("initialize", initializeParams) .pipe(Effect.forkScoped); - assert.deepEqual(yield* decodeJson(yield* Queue.take(output)), { + assert.deepEqual(JSON.parse(yield* Queue.take(output)), { id: 1, method: "initialize", params: initializeParams, @@ -265,7 +153,7 @@ it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => { }, }, }); - assert.deepEqual(yield* decodeJson(yield* Queue.take(output)), { + assert.deepEqual(JSON.parse(yield* Queue.take(output)), { id: 77, result: { answers: { @@ -280,7 +168,7 @@ it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => { 78, CodexError.CodexAppServerRequestError.methodNotFound("x/test"), ); - assert.deepEqual(yield* decodeJson(yield* Queue.take(output)), { + assert.deepEqual(JSON.parse(yield* Queue.take(output)), { id: 78, error: { code: -32601, @@ -297,151 +185,13 @@ it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => { const bigintError = yield* transport.notify("x/test", 1n).pipe(Effect.flip); assert.instanceOf(bigintError, CodexError.CodexAppServerProtocolParseError); - assert.equal(bigintError.operation, "encode-wire-message"); - assert.equal(bigintError.method, "x/test"); - assert.exists(bigintError.cause); - assert.equal( - bigintError.message, - "Codex App Server protocol operation 'encode-wire-message' failed for method 'x/test'.", - ); + assert.equal(bigintError.detail, "Failed to encode Codex App Server message"); const circular: Record = {}; circular.self = circular; const circularError = yield* transport.notify("x/test", circular).pipe(Effect.flip); assert.instanceOf(circularError, CodexError.CodexAppServerProtocolParseError); - assert.equal(circularError.operation, "encode-wire-message"); - assert.equal(circularError.method, "x/test"); - assert.exists(circularError.cause); - - const requestError = yield* transport.request("x/request", 1n).pipe( - Effect.match({ - onFailure: (error) => error, - onSuccess: () => assert.fail("Expected request encoding to fail"), - }), - ); - assert.instanceOf(requestError, CodexError.CodexAppServerProtocolParseError); - assert.deepInclude(requestError, { - operation: "encode-wire-message", - method: "x/request", - requestId: "1", - }); - }), - ); - - it.effect("correlates response errors with the originating request", () => - Effect.gen(function* () { - const { stdio, input, output } = yield* makeInMemoryStdio(); - const transport = yield* CodexProtocol.makeCodexAppServerPatchedProtocol({ stdio }); - - const response = yield* transport.request("thread/start", {}).pipe(Effect.forkScoped); - yield* Queue.take(output); - yield* Queue.offer( - input, - encodeJsonl({ - id: 1, - error: { - code: -32602, - message: "Invalid params", - data: { field: "cwd" }, - }, - }), - ); - - const error = yield* Fiber.join(response).pipe( - Effect.match({ - onFailure: (error) => error, - onSuccess: () => assert.fail("Expected Codex App Server request to fail"), - }), - ); - assert.instanceOf(error, CodexError.CodexAppServerRequestError); - assert.deepInclude(error, { - code: -32602, - errorMessage: "Invalid params", - method: "thread/start", - requestId: "1", - operation: "receive-response", - }); - }), - ); - - it.effect("logs decode failures without copying the cause or wire payload", () => - Effect.gen(function* () { - const secret = "codex-wire-secret-sentinel"; - const { stdio, input } = yield* makeInMemoryStdio(); - const events: Array = []; - const termination = yield* Deferred.make(); - yield* CodexProtocol.makeCodexAppServerPatchedProtocol({ - stdio, - logIncoming: true, - logger: (event) => - Effect.sync(() => { - events.push(event); - }), - onTermination: (error) => Deferred.succeed(termination, error).pipe(Effect.asVoid), - }); - - yield* Queue.offer(input, encoder.encode(`{"secret":"${secret}"\n`)); - yield* Deferred.await(termination); - - const event = events.find(({ stage }) => stage === "decode_failed"); - assert.exists(event); - assert.equal(event.direction, "incoming"); - const payload = event.payload as Record; - assert.equal(payload.operation, "decode-wire-message"); - assert.isNumber(payload.issueCount); - assert.isArray(payload.issueKinds); - assert.isNumber(payload.maximumPathDepth); - assert.equal("cause" in payload, false); - assert.equal("detail" in payload, false); - assert.notInclude(encodeUnknownJsonString(event), secret); - }), - ); - - it.effect("describes unroutable messages with safe structural diagnostics", () => - Effect.gen(function* () { - const secret = "codex-unroutable-secret-sentinel"; - const { stdio, input } = yield* makeInMemoryStdio(); - const termination = yield* Deferred.make(); - yield* CodexProtocol.makeCodexAppServerPatchedProtocol({ - stdio, - onTermination: (error) => Deferred.succeed(termination, error).pipe(Effect.asVoid), - }); - - yield* Queue.offer( - input, - encodeJsonl({ id: true, method: "thread/start", params: { token: secret } }), - ); - - const error = yield* Deferred.await(termination); - assert.instanceOf(error, CodexError.CodexAppServerProtocolParseError); - assert.deepInclude(error, { - operation: "route-wire-message", - method: "thread/start", - payloadKind: "object", - presentFields: ["id", "method", "params"], - }); - assert.isUndefined(error.requestId); - assert.notProperty(error, "detail"); - assert.notProperty(error, "cause"); - assert.notInclude(error.message, secret); - }), - ); - - it.effect("classifies an input stream ending without inventing a cause", () => - Effect.gen(function* () { - const { stdio, input } = yield* makeInMemoryStdio(); - const termination = yield* Deferred.make(); - yield* CodexProtocol.makeCodexAppServerPatchedProtocol({ - stdio, - onTermination: (error) => Deferred.succeed(termination, error).pipe(Effect.asVoid), - }); - - yield* Queue.end(input); - - const error = yield* Deferred.await(termination); - assert.instanceOf(error, CodexError.CodexAppServerInputStreamEndedError); - assert.equal(error.message, "Codex App Server input stream ended."); - assert.equal("cause" in error, false); + assert.equal(circularError.detail, "Failed to encode Codex App Server message"); }), ); }); diff --git a/packages/effect-codex-app-server/src/protocol.ts b/packages/effect-codex-app-server/src/protocol.ts index 17bfaed2b6..0b730aa988 100644 --- a/packages/effect-codex-app-server/src/protocol.ts +++ b/packages/effect-codex-app-server/src/protocol.ts @@ -10,9 +10,6 @@ import * as Stream from "effect/Stream"; import * as CodexError from "./errors.ts"; import { JsonRpcId, JsonRpcResponseEnvelope } from "./_internal/shared.ts"; -const isJsonRpcId = Schema.is(JsonRpcId); -const isJsonRpcResponseEnvelope = Schema.is(JsonRpcResponseEnvelope); -const isCodexAppServerError = Schema.is(CodexError.CodexAppServerError); export interface CodexAppServerProtocolLogEvent { readonly direction: "incoming" | "outgoing"; @@ -67,11 +64,6 @@ export interface CodexAppServerPatchedProtocol { ) => Effect.Effect; } -interface CodexAppServerPendingRequest { - readonly deferred: Deferred.Deferred; - readonly method: string; -} - function isObject(value: unknown): value is Record { return typeof value === "object" && value !== null; } @@ -80,7 +72,7 @@ function isIncomingRequest(value: unknown): value is CodexAppServerIncomingReque if (!isObject(value) || typeof value.method !== "string") { return false; } - return isJsonRpcId(value.id); + return Schema.is(JsonRpcId)(value.id); } function isIncomingNotification(value: unknown): value is CodexAppServerIncomingNotification { @@ -88,51 +80,26 @@ function isIncomingNotification(value: unknown): value is CodexAppServerIncoming } function isIncomingResponse(value: unknown): value is typeof JsonRpcResponseEnvelope.Type { - return isJsonRpcResponseEnvelope(value); + return Schema.is(JsonRpcResponseEnvelope)(value); } -const encodeJsonString = Schema.encodeUnknownEffect(Schema.fromJsonString(Schema.Unknown)); -const decodeJsonString = Schema.decodeUnknownEffect(Schema.fromJsonString(Schema.Unknown)); - const encodeWireMessage = ( message: Record, ): Effect.Effect => - encodeJsonString(message).pipe( - Effect.map((encoded) => `${encoded}\n`), - Effect.mapError((cause) => { - const method = typeof message.method === "string" ? message.method : undefined; - const requestId = - typeof message.id === "string" || typeof message.id === "number" - ? String(message.id) - : undefined; - return CodexError.CodexAppServerProtocolParseError.fromSchemaError( - "encode-wire-message", + Effect.try({ + try: () => `${JSON.stringify(message)}\n`, + catch: (cause) => + new CodexError.CodexAppServerProtocolParseError({ + detail: "Failed to encode Codex App Server message", cause, - { - ...(method === undefined ? {} : { method }), - ...(requestId === undefined ? {} : { requestId }), - }, - ); - }), - ); + }), + }); -const decodeWireMessage = ( - line: string, -): Effect.Effect => - decodeJsonString(line).pipe( - Effect.mapError((cause) => - CodexError.CodexAppServerProtocolParseError.fromSchemaError("decode-wire-message", cause), - ), - ); - -const normalizeIncomingError = ( - error: unknown, - operation: CodexError.CodexAppServerTransportOperation, -): CodexError.CodexAppServerError => - isCodexAppServerError(error) +const normalizeIncomingError = (error: unknown, detail: string): CodexError.CodexAppServerError => + Schema.is(CodexError.CodexAppServerError)(error) ? error : new CodexError.CodexAppServerTransportError({ - operation, + detail, cause: error, }); @@ -155,7 +122,9 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa const outgoing = yield* Queue.unbounded>(); const incomingNotifications = yield* Queue.unbounded(); const incomingRequests = yield* Queue.unbounded(); - const pending = yield* Ref.make(new Map()); + const pending = yield* Ref.make( + new Map>(), + ); const nextRequestId = yield* Ref.make(1); const remainder = yield* Ref.make(""); const terminationHandled = yield* Ref.make(false); @@ -176,7 +145,7 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa const failAllPending = (error: CodexError.CodexAppServerError) => Ref.get(pending).pipe( Effect.flatMap((current) => - Effect.forEach([...current.values()], ({ deferred }) => Deferred.fail(deferred, error), { + Effect.forEach([...current.values()], (deferred) => Deferred.fail(deferred, error), { discard: true, }), ), @@ -229,16 +198,18 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa const resolvePending = ( requestId: string, - handler: (pendingRequest: CodexAppServerPendingRequest) => Effect.Effect, + handler: ( + deferred: Deferred.Deferred, + ) => Effect.Effect, ) => Ref.modify(pending, (current) => { - const pendingRequest = current.get(requestId); - if (!pendingRequest) { + const deferred = current.get(requestId); + if (!deferred) { return [Effect.void, current] as const; } const next = new Map(current); next.delete(requestId); - return [handler(pendingRequest), next] as const; + return [handler(deferred), next] as const; }).pipe(Effect.flatten); const respond = (requestId: string | number, result: unknown) => @@ -253,20 +224,14 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa const requestId = String(response.id); const protocolError = response.error; if (protocolError !== undefined) { - return resolvePending(requestId, ({ deferred, method }) => + return resolvePending(requestId, (deferred) => Deferred.fail( deferred, - CodexError.CodexAppServerRequestError.fromProtocolError( - protocolError, - method, - requestId, - ), + CodexError.CodexAppServerRequestError.fromProtocolError(protocolError), ), ); } - return resolvePending(requestId, ({ deferred }) => - Deferred.succeed(deferred, response.result), - ); + return resolvePending(requestId, (deferred) => Deferred.succeed(deferred, response.result)); }; const handleRequest = (request: CodexAppServerIncomingRequest) => @@ -276,13 +241,7 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa ? options.onRequest(request).pipe( Effect.matchEffect({ onFailure: (error) => - respondError( - request.id, - CodexError.CodexAppServerRequestError.fromAppServerError( - error, - request.method, - ), - ), + respondError(request.id, CodexError.normalizeToRequestError(error)), onSuccess: (result) => respond(request.id, result), }), ) @@ -310,7 +269,9 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa return handleResponse(message); } return Effect.fail( - CodexError.CodexAppServerProtocolParseError.fromUnroutableMessage(message), + new CodexError.CodexAppServerProtocolParseError({ + detail: "Received protocol message in an unknown shape", + }), ); }; @@ -323,7 +284,16 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa stage: "raw", payload: line, }).pipe( - Effect.flatMap(() => decodeWireMessage(line)), + Effect.flatMap(() => + Effect.try({ + try: () => JSON.parse(line), + catch: (cause) => + new CodexError.CodexAppServerProtocolParseError({ + detail: "Failed to decode Codex App Server wire message", + cause, + }), + }), + ), Effect.tap((decoded) => logProtocol({ direction: "incoming", @@ -336,14 +306,8 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa direction: "incoming", stage: "decode_failed", payload: { - operation: error.operation, - ...(error.method === undefined ? {} : { method: error.method }), - ...(error.requestId === undefined ? {} : { requestId: error.requestId }), - ...(error.issueCount === undefined ? {} : { issueCount: error.issueCount }), - ...(error.issueKinds === undefined ? {} : { issueKinds: error.issueKinds }), - ...(error.maximumPathDepth === undefined - ? {} - : { maximumPathDepth: error.maximumPathDepth }), + detail: error.detail, + cause: error.cause, }, }), ), @@ -364,7 +328,7 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa Effect.matchEffect({ onFailure: (error) => handleTermination(() => - Effect.succeed(normalizeIncomingError(error, "read-input-stream")), + Effect.succeed(normalizeIncomingError(error, "Codex App Server input stream failed")), ), onSuccess: () => Ref.get(remainder).pipe( @@ -375,7 +339,12 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa handleTermination( () => options.terminationError ?? - Effect.succeed(new CodexError.CodexAppServerInputStreamEndedError({})), + Effect.succeed( + new CodexError.CodexAppServerTransportError({ + detail: "Codex App Server input stream ended", + cause: new Error("Codex App Server input stream ended"), + }), + ), ), }), ), @@ -392,14 +361,16 @@ export const makeCodexAppServerPatchedProtocol = Effect.fn("makeCodexAppServerPa (current) => [current, current + 1] as const, ); const deferred = yield* Deferred.make(); - yield* Ref.update(pending, (current) => - new Map(current).set(String(requestId), { deferred, method }), - ); + yield* Ref.update(pending, (current) => new Map(current).set(String(requestId), deferred)); yield* offerOutgoing({ id: requestId, method, ...(payload !== undefined ? { params: payload } : {}), - }).pipe(Effect.tapError(() => removePending(String(requestId)))); + }).pipe( + Effect.catch((error) => + removePending(String(requestId)).pipe(Effect.andThen(Effect.fail(error))), + ), + ); return yield* Deferred.await(deferred).pipe( Effect.onInterrupt(() => removePending(String(requestId))), ); diff --git a/packages/effect-codex-app-server/test/examples/codex-app-server-probe.ts b/packages/effect-codex-app-server/test/examples/codex-app-server-probe.ts index fff994dc2c..a727c2ab03 100644 --- a/packages/effect-codex-app-server/test/examples/codex-app-server-probe.ts +++ b/packages/effect-codex-app-server/test/examples/codex-app-server-probe.ts @@ -1,6 +1,5 @@ import * as Console from "effect/Console"; import * as Effect from "effect/Effect"; -import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; import * as NodeRuntime from "@effect/platform-node/NodeRuntime"; import * as NodeServices from "@effect/platform-node/NodeServices"; @@ -8,14 +7,10 @@ import * as NodeServices from "@effect/platform-node/NodeServices"; import * as CodexClient from "../../src/client.ts"; const program = Effect.gen(function* () { - const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const handle = yield* spawner.spawn( - ChildProcess.make(process.env.CODEX_BIN ?? "codex", ["app-server"], { - cwd: process.cwd(), - shell: false, - }), - ); - const codexLayer = CodexClient.layerChildProcess(handle, { + const codexLayer = CodexClient.layerCommand({ + command: process.env.CODEX_BIN ?? "codex", + args: ["app-server"], + cwd: process.cwd(), logIncoming: true, logOutgoing: true, }); @@ -50,17 +45,17 @@ const program = Effect.gen(function* () { optOutNotificationMethods: null, }, }); - yield* Console.log("initialize", initialized); + yield* Console.log("initialize", JSON.stringify(initialized, null, 2)); yield* client.notify("initialized", undefined); const account = yield* client.request("account/read", {}); - yield* Console.log("account/read", account); + yield* Console.log("account/read", JSON.stringify(account, null, 2)); const skills = yield* client.request("skills/list", { cwds: [process.cwd()], }); - yield* Console.log("skills/list", skills); + yield* Console.log("skills/list", JSON.stringify(skills, null, 2)); }).pipe(Effect.provide(codexLayer)); }); diff --git a/packages/effect-codex-app-server/test/fixtures/codex-app-server-mock-peer.ts b/packages/effect-codex-app-server/test/fixtures/codex-app-server-mock-peer.ts index 3f2a213d38..51668b5e24 100644 --- a/packages/effect-codex-app-server/test/fixtures/codex-app-server-mock-peer.ts +++ b/packages/effect-codex-app-server/test/fixtures/codex-app-server-mock-peer.ts @@ -1,5 +1,3 @@ -import * as NodeOS from "node:os"; - let nextServerRequestId = 10_000; let pendingSkillsListRequestId: number | string | null = null; let pendingUserInputRequestId: number | null = null; @@ -36,25 +34,11 @@ const handleMethod = (message: Record) => { switch (method) { case "initialize": { - // oxlint-disable-next-line t3code/no-global-process-runtime -- Standalone mock peer process has no Effect runtime. - const platform = NodeOS.platform(); - const stderrBytes = Number(process.env.CODEX_APP_SERVER_TEST_STDERR_BYTES ?? 0); - if (Number.isFinite(stderrBytes) && stderrBytes > 0) { - process.stderr.write("x".repeat(stderrBytes), () => { - respond(message.id as number | string, { - userAgent: "mock-codex-app-server", - codexHome: process.cwd(), - platformFamily: platform === "win32" ? "windows" : "unix", - platformOs: platform === "darwin" ? "macos" : platform, - }); - }); - return; - } respond(message.id as number | string, { userAgent: "mock-codex-app-server", codexHome: process.cwd(), - platformFamily: platform === "win32" ? "windows" : "unix", - platformOs: platform === "darwin" ? "macos" : platform, + platformFamily: process.platform === "win32" ? "windows" : "unix", + platformOs: process.platform === "darwin" ? "macos" : process.platform, }); return; } diff --git a/packages/effect-codex-app-server/tsconfig.json b/packages/effect-codex-app-server/tsconfig.json index 8891950e04..61162f9454 100644 --- a/packages/effect-codex-app-server/tsconfig.json +++ b/packages/effect-codex-app-server/tsconfig.json @@ -1,7 +1,18 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "types": ["node"] + "plugins": [ + { + "name": "@effect/language-service", + "namespaceImportPackages": ["@effect/platform-node"], + "diagnosticSeverity": { + "importFromBarrel": "error", + "anyUnknownInErrorContext": "warning", + "instanceOfSchema": "warning", + "deterministicKeys": "warning" + } + } + ] }, "include": ["src", "scripts", "test"] } diff --git a/packages/shared/src/model.ts b/packages/shared/src/model.ts index bdc0c0cc8e..f59823c251 100644 --- a/packages/shared/src/model.ts +++ b/packages/shared/src/model.ts @@ -312,10 +312,27 @@ export function trimOrNull(value: T | null | undefined): T | n return trimmed || null; } -function cloneSelections( - selections: ReadonlyArray, -): Array { - return selections.map(cloneSelection); +/** + * Resolve the actual API model identifier from a model selection. + * + * Provider-aware: each provider can map `contextWindow` (or other options) + * to whatever the API requires. The canonical slug stored in the selection + * stays unchanged so the capabilities system keeps working. + */ +export function resolveApiModelId(modelSelection: ModelSelection): string { + switch (modelSelection.provider) { + case "claudeAgent": { + switch (modelSelection.options?.contextWindow) { + case "1m": + return `${modelSelection.model}[1m]`; + default: + return modelSelection.model; + } + } + default: { + return modelSelection.model; + } + } } export function createModelSelection(