diff --git a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts index e25f5542e..fc7d3609b 100644 --- a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts +++ b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts @@ -1042,6 +1042,8 @@ describe("ProviderRuntimeIngestion", () => { // provider accidentally repeats an id in its array. { taskId: "background-task-snapshot-1", taskType: "local_agent" }, { taskId: "background-task-snapshot-2", taskType: "local_bash" }, + // Ambient housekeeping is listed but is not work the user waits on. + { taskId: "background-task-snapshot-ambient", taskType: "local_bash", ambient: true }, ], }, }); diff --git a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts index e9a05e9d1..06ba92e8f 100644 --- a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts +++ b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts @@ -2614,7 +2614,11 @@ const make = Effect.gen(function* () { // absolute count so missed or reordered task edges cannot wedge the // session in a stale background-work state. if (event.type === "task.snapshot.updated" && thread.session != null) { - const nextPendingCount = new Set(event.payload.tasks.map((task) => task.taskId)).size; + // Ambient housekeeping (e.g. live-update watchers) is not work the + // user is waiting on, so it never holds the thread in "Background". + const nextPendingCount = new Set( + event.payload.tasks.filter((task) => task.ambient !== true).map((task) => task.taskId), + ).size; if (nextPendingCount !== (thread.session.pendingBackgroundTaskCount ?? 0)) { yield* orchestrationEngine.dispatch({ type: "thread.session.set", diff --git a/apps/server/src/provider/Layers/ClaudeAdapter.test.ts b/apps/server/src/provider/Layers/ClaudeAdapter.test.ts index db6936c0e..603dec18b 100644 --- a/apps/server/src/provider/Layers/ClaudeAdapter.test.ts +++ b/apps/server/src/provider/Layers/ClaudeAdapter.test.ts @@ -3354,10 +3354,39 @@ describe("ClaudeAdapterLive", () => { description: "Run dev server", tool_use_id: "toolu-main-bash", task_type: "local_bash", + is_backgrounded: true, session_id: "sdk-session-owned-task", uuid: "main-task-started", } as unknown as SDKMessage); + // The agent's own task states its nesting depth; that is the only + // place the SDK does, and the spawn call keys the roster row. + harness.query.emit({ + type: "system", + subtype: "task_started", + task_id: "task-agent", + description: "Fix the reactor", + tool_use_id: "tool-task-owner", + task_type: "local_agent", + subagent_type: "claude", + is_backgrounded: false, + spawn_depth: 1, + session_id: "sdk-session-owned-task", + uuid: "agent-task-started", + } as unknown as SDKMessage); + + // Ambient housekeeping is reported but never counts as pending work. + harness.query.emit({ + type: "system", + subtype: "task_started", + task_id: "task-watch", + description: "Live update watcher", + task_type: "local_bash", + ambient: true, + session_id: "sdk-session-owned-task", + uuid: "watch-task-started", + } as unknown as SDKMessage); + harness.query.emit({ type: "system", subtype: "task_notification", @@ -3394,6 +3423,34 @@ describe("ClaudeAdapterLive", () => { assert.equal(mainStarted?.type, "task.started"); if (mainStarted?.type === "task.started") { assert.isUndefined(mainStarted.payload.ownerAgentToolUseId); + assert.equal(mainStarted.payload.isBackgrounded, true); + } + const agentStarted = startedEvents.find( + (event) => event.type === "task.started" && String(event.payload.taskId) === "task-agent", + ); + assert.equal(agentStarted?.type, "task.started"); + if (agentStarted?.type === "task.started") { + assert.equal(agentStarted.payload.isBackgrounded, false); + assert.equal(agentStarted.payload.spawnDepth, 1); + assert.isUndefined(agentStarted.payload.ambient); + } + const depthMetadata = runtimeEvents.find( + (event) => + event.type === "subagent.metadata.updated" && + event.payload.callId === "tool-task-owner" && + event.payload.treeDepth !== undefined, + ); + assert.equal(depthMetadata?.type, "subagent.metadata.updated"); + if (depthMetadata?.type === "subagent.metadata.updated") { + assert.equal(depthMetadata.payload.treeDepth, 1); + } + const watchStarted = startedEvents.find( + (event) => event.type === "task.started" && String(event.payload.taskId) === "task-watch", + ); + assert.equal(watchStarted?.type, "task.started"); + if (watchStarted?.type === "task.started") { + assert.equal(watchStarted.payload.ambient, true); + assert.equal(watchStarted.payload.pendingCountManagedBySnapshot, true); } const ownedCompleted = runtimeEvents.find( (event) => diff --git a/apps/server/src/provider/Layers/ClaudeAdapter.ts b/apps/server/src/provider/Layers/ClaudeAdapter.ts index 2a873aa65..f95f99056 100644 --- a/apps/server/src/provider/Layers/ClaudeAdapter.ts +++ b/apps/server/src/provider/Layers/ClaudeAdapter.ts @@ -328,6 +328,9 @@ interface ClaudeTaskSnapshot { * by the main model. Learned at task_started and replayed on later task * events, which do not restate the originating tool. */ readonly ownerAgentToolUseId?: string; + /** Housekeeping the SDK does not count as user work (task_started.ambient). + * Remembered so the completion edge stays out of the pending count too. */ + readonly ambient?: boolean; } type ClaudeStructuredAgentToolResult = @@ -4028,6 +4031,9 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( readonly subagentType?: string; readonly taskType?: string; readonly ownerAgentToolUseId?: string; + readonly isBackgrounded?: boolean; + readonly spawnDepth?: number; + readonly ambient?: boolean; }, message: SDKMessage, ) { @@ -4042,6 +4048,7 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( ...(task.subagentType ? { subagentType: task.subagentType } : {}), ...(task.taskType ? { taskType: task.taskType } : {}), ...(task.ownerAgentToolUseId ? { ownerAgentToolUseId: task.ownerAgentToolUseId } : {}), + ...(task.ambient === true ? { ambient: true } : {}), status: "running", }); if (context.startedTaskIds.has(task.taskId)) { @@ -4064,7 +4071,13 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( ...(task.toolUseId ? { toolUseId: task.toolUseId } : {}), ...(task.subagentType ? { subagentType: task.subagentType } : {}), ...(task.ownerAgentToolUseId ? { ownerAgentToolUseId: task.ownerAgentToolUseId } : {}), - ...(context.backgroundTaskSnapshotObserved ? { pendingCountManagedBySnapshot: true } : {}), + ...(task.isBackgrounded !== undefined ? { isBackgrounded: task.isBackgrounded } : {}), + ...(task.spawnDepth !== undefined ? { spawnDepth: task.spawnDepth } : {}), + ...(task.ambient === true ? { ambient: true } : {}), + // Ambient housekeeping never counts as pending background work. + ...(context.backgroundTaskSnapshotObserved || task.ambient === true + ? { pendingCountManagedBySnapshot: true } + : {}), }, providerRefs: nativeProviderRefs(context), raw: { @@ -4120,7 +4133,9 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( ...(task.usage !== undefined ? { usage: task.usage } : {}), ...(task.toolUseId ? { toolUseId: task.toolUseId } : {}), ...(ownerAgentToolUseId ? { ownerAgentToolUseId } : {}), - ...(context.backgroundTaskSnapshotObserved ? { pendingCountManagedBySnapshot: true } : {}), + ...(context.backgroundTaskSnapshotObserved || previous?.ambient === true + ? { pendingCountManagedBySnapshot: true } + : {}), }, providerRefs: nativeProviderRefs(context), raw: { @@ -5108,6 +5123,7 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( readonly taskId: RuntimeTaskId; readonly taskType?: string; readonly description?: string; + readonly ambient?: boolean; } >(); for (const task of message.tasks) { @@ -5117,6 +5133,7 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( taskId: RuntimeTaskId.make(task.task_id), ...(description ? { description } : {}), ...(taskType ? { taskType } : {}), + ...(task.ambient === true ? { ambient: true } : {}), }); } yield* offerRuntimeEvent({ @@ -5136,6 +5153,13 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( const ownerAgentToolUseId = toolUseId ? context.subagentToolUseOwners.get(toolUseId) : undefined; + const isBackgrounded = + typeof message.is_backgrounded === "boolean" ? message.is_backgrounded : undefined; + const spawnDepth = + typeof message.spawn_depth === "number" && Number.isInteger(message.spawn_depth) + ? Math.max(0, message.spawn_depth) + : undefined; + const ambient = message.ambient === true; yield* emitTaskStartedOnce( context, { @@ -5145,9 +5169,17 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( ...(subagentType ? { subagentType } : {}), ...(taskType ? { taskType } : {}), ...(ownerAgentToolUseId ? { ownerAgentToolUseId } : {}), + ...(isBackgrounded !== undefined ? { isBackgrounded } : {}), + ...(spawnDepth !== undefined ? { spawnDepth } : {}), + ...(ambient ? { ambient } : {}), }, message, ); + // The SDK states an agent's nesting depth only here; the spawn call + // is what the roster row is keyed by until the agent id is known. + if (spawnDepth !== undefined && toolUseId) { + yield* emitSubagentMetadata(context, { callId: toolUseId, treeDepth: spawnDepth }); + } return; } case "task_progress": { @@ -6474,6 +6506,10 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( // and streams them into the collab tool item instead. Travels via the // control-protocol initConfig, so older CLIs just ignore it. forwardSubagentText: true, + // Stop ends the current turn only; background agents and workflows + // keep running and are stopped one at a time from the Agents tab. + // Without this the CLI fails closed and an interrupt kills them all. + perTaskStopAffordance: true, canUseTool, hooks: { PostToolUse: [ diff --git a/apps/server/src/provider/Layers/CodexAdapter.mapping.test.ts b/apps/server/src/provider/Layers/CodexAdapter.mapping.test.ts index 3554bf713..bb6204b75 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.mapping.test.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.mapping.test.ts @@ -151,6 +151,7 @@ describe("CodexAdapter item mapping", () => { agentNickname: "Mercury", agentRole: "explorer", cliVersion: "1.0.0", + projectId: null, createdAt: 1_786_650_001, cwd: "C:/repo", ephemeral: false, diff --git a/apps/server/src/provider/Layers/CodexAdapter.test.ts b/apps/server/src/provider/Layers/CodexAdapter.test.ts index 10816965b..ed623e944 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.test.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.test.ts @@ -69,6 +69,7 @@ it.effect("discovers compatible root Codex conversations without exposing subage preview: `Preview for ${id}`, cwd: "/tmp/project", cliVersion: "0.145.0", + projectId: null, modelProvider: "openai", createdAt: 1_760_000_000, updatedAt: 1_760_000_100, @@ -2334,6 +2335,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { itemId: "item-user-input-1", threadId: "thread-1", turnId: "turn-1", + isBlocking: true, questions: [ { id: "sandbox_mode", diff --git a/apps/server/src/provider/Layers/CodexProvider.ts b/apps/server/src/provider/Layers/CodexProvider.ts index 95f187f01..c9c869bd2 100644 --- a/apps/server/src/provider/Layers/CodexProvider.ts +++ b/apps/server/src/provider/Layers/CodexProvider.ts @@ -108,13 +108,17 @@ function codexAccountAuthLabel(account: CodexSchema.V2GetAccountResponse["accoun case "team": return "ChatGPT Team Subscription"; case "self_serve_business_usage_based": + case "self_serve_business_prolite": case "business": return "ChatGPT Business Subscription"; case "ent26": case "enterprise_cbp_usage_based": + case "enterprise_cbp_automation": case "enterprise": return "ChatGPT Enterprise Subscription"; case "edu": + case "edu_plus": + case "edu_pro": return "ChatGPT Edu Subscription"; case "unknown": return "ChatGPT Subscription"; @@ -761,7 +765,7 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun client .request("account/rateLimits/read", undefined) .pipe(Effect.orElseSucceed(() => undefined)), - client.request("account/usage/read", undefined).pipe(Effect.orElseSucceed(() => undefined)), + client.request("account/usage/read", {}).pipe(Effect.orElseSucceed(() => undefined)), ], { concurrency: "unbounded" }, ); diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts index 3040cdb09..4587e633d 100644 --- a/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts +++ b/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts @@ -977,6 +977,7 @@ describe("openCodexThread", () => { preview: "", cwd: "/tmp/project", cliVersion: "0.145.0", + projectId: null, modelProvider: "openai", createdAt: 1_760_000_000, updatedAt: 1_760_000_001, diff --git a/apps/server/src/provider/providerExtensions.ts b/apps/server/src/provider/providerExtensions.ts index 5730bc0fb..e1517fe10 100644 --- a/apps/server/src/provider/providerExtensions.ts +++ b/apps/server/src/provider/providerExtensions.ts @@ -878,6 +878,8 @@ function codexMcpAuthStatusLabel( authStatus: CodexSchema.V2ListMcpServerStatusResponse__McpAuthStatus, ): string { switch (authStatus) { + case "unknown": + return "Auth status unknown"; case "unsupported": return "No auth required"; case "notLoggedIn": diff --git a/packages/contracts/src/providerRuntime.ts b/packages/contracts/src/providerRuntime.ts index c5dc74dfc..87d1d4d3d 100644 --- a/packages/contracts/src/providerRuntime.ts +++ b/packages/contracts/src/providerRuntime.ts @@ -350,6 +350,9 @@ export const SubagentMetadataUpdatedPayload = Schema.Struct({ * from `agentThreadId`. */ transcriptAgentId: Schema.optional(TrimmedNonEmptyStringSchema), agentPath: Schema.optional(TrimmedNonEmptyStringSchema), + /** Nesting depth (1 = spawned by the main agent), for providers that report + * it directly instead of through an agent path. */ + treeDepth: Schema.optional(NonNegativeInt), agentNickname: Schema.optional(TrimmedNonEmptyStringSchema), agentRole: Schema.optional(TrimmedNonEmptyStringSchema), taskName: Schema.optional(TrimmedNonEmptyStringSchema), @@ -604,6 +607,15 @@ const TaskStartedPayload = Schema.Struct({ * run the agent kicked off). Lets consumers attribute the task's rows to * the agent instead of narrating them as the conversation's own work. */ ownerAgentToolUseId: Schema.optional(TrimmedNonEmptyStringSchema), + /** The task runs in the background (its spawning tool call returned at + * once) rather than blocking the turn. */ + isBackgrounded: Schema.optional(Schema.Boolean), + /** Nesting depth of a spawned agent task: 1 for a top-level spawn, N+1 + * when spawned from inside a depth-N agent. */ + spawnDepth: Schema.optional(NonNegativeInt), + /** Housekeeping the provider does not count as user work (e.g. live-update + * watchers). Never counts toward pending background work. */ + ambient: Schema.optional(Schema.Boolean), }); export type TaskStartedPayload = typeof TaskStartedPayload.Type; @@ -615,6 +627,9 @@ const TaskSnapshotUpdatedPayload = Schema.Struct({ taskId: RuntimeTaskId, taskType: Schema.optional(TrimmedNonEmptyStringSchema), description: Schema.optional(TrimmedNonEmptyStringSchema), + /** See TaskStartedPayload.ambient. Ambient tasks stay in the snapshot + * for task panels but do not count as pending background work. */ + ambient: Schema.optional(Schema.Boolean), }), ), }); diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts index 030c54abf..0b1c84e9b 100644 --- a/packages/effect-codex-app-server/scripts/generate.ts +++ b/packages/effect-codex-app-server/scripts/generate.ts @@ -12,7 +12,7 @@ import * as Schema from "effect/Schema"; import * as Stream from "effect/Stream"; import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; -const CODEX_PROTOCOL_VERSION = "0.146.0"; +const CODEX_PROTOCOL_VERSION = "0.150.1"; const UPSTREAM_REF = `rust-v${CODEX_PROTOCOL_VERSION}`; const CODEX_SCHEMA_BINARY_ENV = "THREADLINES_CODEX_SCHEMA_BINARY"; @@ -133,37 +133,6 @@ const ManualSchemas: Record = { }, }; -// Codex 0.150 added these multi-agent values ahead of our next full protocol -// refresh (which pulls unrelated changes and can break older Codex releases). -// Widening the definitions here keeps every generated response namespace -// compatible: a persisted `subAgentActivity` with `kind: "completed"` would -// otherwise reject `thread/resume`, and the new collab tools would drop live -// events during decoding. -const Codex0150DefinitionSchemas: Record = { - CollabAgentTool: { - type: "string", - enum: [ - "spawnAgent", - "sendInput", - "resumeAgent", - "wait", - "closeAgent", - "sendMessage", - "followupTask", - "interruptAgent", - "listAgents", - ], - }, - CollabAgentToolCallStatus: { - type: "string", - enum: ["inProgress", "completed", "failed", "interrupted"], - }, - SubAgentActivityKind: { - type: "string", - enum: ["started", "interacted", "interrupted", "completed"], - }, -}; - const getGeneratedPaths = Effect.fn("getGeneratedPaths")(function* () { const path = yield* Path.Path; const generatedDir = path.join(import.meta.dirname, "..", "src", "_generated"); @@ -365,16 +334,22 @@ function toPascalCaseMethod(method: string) { } function parseRequestEntries(fileContents: string): ReadonlyArray { - const entryPattern = /\{\s*"method":\s*"([^"]+)",\s*id:\s*RequestId,\s*params:\s*([^,}]+)/g; + // `params?:` marks a request whose params may be omitted (0.150+, e.g. + // account/usage/read). The generated client still sends the object form. + const entryPattern = /\{\s*"method":\s*"([^"]+)",\s*id:\s*RequestId,\s*params\??:\s*([^,}]+)/g; const entries: Array = []; let match: RegExpExecArray | null; while ((match = entryPattern.exec(fileContents)) !== null) { entries.push({ method: match[1]!, // Some compatibility endpoints accept either their ordinary params object - // or null. The generated client always sends the object form, so retain - // the concrete schema name used for request validation and inference. - paramsType: match[2]!.trim().replace(/\s*\|\s*null$/, ""), + // or null/undefined. The generated client always sends the object form, + // so retain the concrete schema name used for request validation and + // inference. + paramsType: match[2]! + .trim() + .replace(/\s*\|\s*undefined$/, "") + .replace(/\s*\|\s*null$/, ""), }); } return entries; @@ -619,12 +594,10 @@ const generateFiles = Effect.fn("generateFiles")(function* () { ); for (const [definitionName, definitionSchema] of Object.entries(parsed.definitions ?? {})) { - const compatibleDefinitionSchema = - Codex0150DefinitionSchemas[definitionName] ?? definitionSchema; aggregateSchemas[localDefinitionNames.get(definitionName)!] = stripNullDefaults( normalizeNullableTypes( rewriteExternalRefs( - compatibleDefinitionSchema, + definitionSchema, localDefinitionNames, file.namespace, exportNameByQualifiedName, 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 1807e208e..5d9270fc9 100644 --- a/packages/effect-codex-app-server/src/_generated/meta.gen.ts +++ b/packages/effect-codex-app-server/src/_generated/meta.gen.ts @@ -1,10 +1,11 @@ // This file is generated by the effect-codex-app-server package. Do not edit manually. -// Upstream protocol ref: rust-v0.146.0 +// Upstream protocol ref: rust-v0.150.1 import * as CodexSchema from "./schema.gen.ts"; export const CLIENT_REQUEST_METHODS = { initialize: "initialize", + "server/diagnostics": "server/diagnostics", "thread/start": "thread/start", "thread/resume": "thread/resume", "thread/fork": "thread/fork", @@ -17,7 +18,14 @@ export const CLIENT_REQUEST_METHODS = { "thread/goal/set": "thread/goal/set", "thread/goal/get": "thread/goal/get", "thread/goal/clear": "thread/goal/clear", + "thread/queue/add": "thread/queue/add", + "thread/queue/list": "thread/queue/list", + "thread/queue/update": "thread/queue/update", + "thread/queue/delete": "thread/queue/delete", + "thread/queue/reorder": "thread/queue/reorder", + "thread/queue/start": "thread/queue/start", "thread/metadata/update": "thread/metadata/update", + "thread/section/move": "thread/section/move", "thread/settings/update": "thread/settings/update", "thread/memoryMode/set": "thread/memoryMode/set", "memory/reset": "memory/reset", @@ -29,7 +37,19 @@ export const CLIENT_REQUEST_METHODS = { "thread/backgroundTerminals/list": "thread/backgroundTerminals/list", "thread/backgroundTerminals/terminate": "thread/backgroundTerminals/terminate", "thread/rollback": "thread/rollback", + "thread/revert": "thread/revert", "thread/list": "thread/list", + "project/list": "project/list", + "project/read": "project/read", + "project/create": "project/create", + "project/import": "project/import", + "project/update": "project/update", + "project/move": "project/move", + "project/delete": "project/delete", + "threadSection/list": "threadSection/list", + "threadSection/create": "threadSection/create", + "threadSection/update": "threadSection/update", + "threadSection/delete": "threadSection/delete", "thread/search": "thread/search", "thread/searchOccurrences": "thread/searchOccurrences", "thread/loaded/list": "thread/loaded/list", @@ -44,6 +64,7 @@ export const CLIENT_REQUEST_METHODS = { "marketplace/remove": "marketplace/remove", "marketplace/upgrade": "marketplace/upgrade", "plugin/list": "plugin/list", + "plugin/search": "plugin/search", "plugin/installed": "plugin/installed", "plugin/read": "plugin/read", "plugin/skill/read": "plugin/skill/read", @@ -75,6 +96,7 @@ export const CLIENT_REQUEST_METHODS = { "thread/realtime/appendText": "thread/realtime/appendText", "thread/realtime/appendSpeech": "thread/realtime/appendSpeech", "thread/realtime/stop": "thread/realtime/stop", + "thread/timeline/list": "thread/timeline/list", "thread/realtime/listVoices": "thread/realtime/listVoices", "review/start": "review/start", "model/list": "model/list", @@ -98,10 +120,14 @@ export const CLIENT_REQUEST_METHODS = { "config/mcpServer/reload": "config/mcpServer/reload", "mcpServerStatus/list": "mcpServerStatus/list", "mcpServer/resource/read": "mcpServer/resource/read", + "mcpServer/event/stream/start": "mcpServer/event/stream/start", + "mcpServer/event/stream/stop": "mcpServer/event/stream/stop", "mcpServer/tool/call": "mcpServer/tool/call", "windowsSandbox/setupStart": "windowsSandbox/setupStart", "windowsSandbox/readiness": "windowsSandbox/readiness", "account/login/start": "account/login/start", + "account/bedrock/discover": "account/bedrock/discover", + "account/bedrock/setup": "account/bedrock/setup", "account/login/cancel": "account/login/cancel", "account/logout": "account/logout", "account/rateLimits/read": "account/rateLimits/read", @@ -162,10 +188,14 @@ export const SERVER_NOTIFICATION_METHODS = { "thread/deleted": "thread/deleted", "thread/unarchived": "thread/unarchived", "thread/closed": "thread/closed", + "thread/reverted": "thread/reverted", "skills/changed": "skills/changed", "thread/name/updated": "thread/name/updated", "thread/goal/updated": "thread/goal/updated", "thread/goal/cleared": "thread/goal/cleared", + "thread/queue/changed": "thread/queue/changed", + "project/changed": "project/changed", + "thread/project/updated": "thread/project/updated", "thread/environment/connected": "thread/environment/connected", "thread/environment/disconnected": "thread/environment/disconnected", "thread/settings/updated": "thread/settings/updated", @@ -179,6 +209,7 @@ export const SERVER_NOTIFICATION_METHODS = { "item/started": "item/started", "item/autoApprovalReview/started": "item/autoApprovalReview/started", "item/autoApprovalReview/completed": "item/autoApprovalReview/completed", + "autoApprovalReview/strictReviewRequired": "autoApprovalReview/strictReviewRequired", "item/completed": "item/completed", "rawResponseItem/completed": "rawResponseItem/completed", "rawResponse/completed": "rawResponse/completed", @@ -195,6 +226,7 @@ export const SERVER_NOTIFICATION_METHODS = { "item/mcpToolCall/progress": "item/mcpToolCall/progress", "mcpServer/oauthLogin/completed": "mcpServer/oauthLogin/completed", "mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated", + "mcpServer/event/stream/notification": "mcpServer/event/stream/notification", "account/updated": "account/updated", "account/rateLimits/updated": "account/rateLimits/updated", "app/list/updated": "app/list/updated", @@ -218,6 +250,9 @@ export const SERVER_NOTIFICATION_METHODS = { "fuzzyFileSearch/sessionCompleted": "fuzzyFileSearch/sessionCompleted", "thread/realtime/started": "thread/realtime/started", "thread/realtime/itemAdded": "thread/realtime/itemAdded", + "thread/realtime/item/started": "thread/realtime/item/started", + "thread/realtime/item/transcript/delta": "thread/realtime/item/transcript/delta", + "thread/realtime/item/completed": "thread/realtime/item/completed", "thread/realtime/transcript/delta": "thread/realtime/transcript/delta", "thread/realtime/transcript/done": "thread/realtime/transcript/done", "thread/realtime/outputAudio/delta": "thread/realtime/outputAudio/delta", @@ -236,6 +271,7 @@ export type ServerNotificationMethod = keyof typeof SERVER_NOTIFICATION_METHODS; export interface ClientRequestParamsByMethod { readonly initialize: typeof CodexSchema.V1InitializeParams.Type; + readonly "server/diagnostics": typeof CodexSchema.V2ServerDiagnosticsParams.Type; readonly "thread/start": typeof CodexSchema.V2ThreadStartParams.Type; readonly "thread/resume": typeof CodexSchema.V2ThreadResumeParams.Type; readonly "thread/fork": typeof CodexSchema.V2ThreadForkParams.Type; @@ -248,7 +284,14 @@ export interface ClientRequestParamsByMethod { readonly "thread/goal/set": typeof CodexSchema.V2ThreadGoalSetParams.Type; readonly "thread/goal/get": typeof CodexSchema.V2ThreadGoalGetParams.Type; readonly "thread/goal/clear": typeof CodexSchema.V2ThreadGoalClearParams.Type; + readonly "thread/queue/add": typeof CodexSchema.V2ThreadQueueAddParams.Type; + readonly "thread/queue/list": typeof CodexSchema.V2ThreadQueueListParams.Type; + readonly "thread/queue/update": typeof CodexSchema.V2ThreadQueueUpdateParams.Type; + readonly "thread/queue/delete": typeof CodexSchema.V2ThreadQueueDeleteParams.Type; + readonly "thread/queue/reorder": typeof CodexSchema.V2ThreadQueueReorderParams.Type; + readonly "thread/queue/start": typeof CodexSchema.V2ThreadQueueStartParams.Type; readonly "thread/metadata/update": typeof CodexSchema.V2ThreadMetadataUpdateParams.Type; + readonly "thread/section/move": typeof CodexSchema.V2ThreadSectionMoveParams.Type; readonly "thread/settings/update": typeof CodexSchema.V2ThreadSettingsUpdateParams.Type; readonly "thread/memoryMode/set": typeof CodexSchema.V2ThreadMemoryModeSetParams.Type; readonly "memory/reset": undefined; @@ -260,7 +303,19 @@ export interface ClientRequestParamsByMethod { readonly "thread/backgroundTerminals/list": typeof CodexSchema.V2ThreadBackgroundTerminalsListParams.Type; readonly "thread/backgroundTerminals/terminate": typeof CodexSchema.V2ThreadBackgroundTerminalsTerminateParams.Type; readonly "thread/rollback": typeof CodexSchema.V2ThreadRollbackParams.Type; + readonly "thread/revert": typeof CodexSchema.V2ThreadRevertParams.Type; readonly "thread/list": typeof CodexSchema.V2ThreadListParams.Type; + readonly "project/list": typeof CodexSchema.V2ProjectListParams.Type; + readonly "project/read": typeof CodexSchema.V2ProjectReadParams.Type; + readonly "project/create": typeof CodexSchema.V2ProjectCreateParams.Type; + readonly "project/import": typeof CodexSchema.V2ProjectImportParams.Type; + readonly "project/update": typeof CodexSchema.V2ProjectUpdateParams.Type; + readonly "project/move": typeof CodexSchema.V2ProjectMoveParams.Type; + readonly "project/delete": typeof CodexSchema.V2ProjectDeleteParams.Type; + readonly "threadSection/list": typeof CodexSchema.V2ThreadSectionListParams.Type; + readonly "threadSection/create": typeof CodexSchema.V2ThreadSectionCreateParams.Type; + readonly "threadSection/update": typeof CodexSchema.V2ThreadSectionUpdateParams.Type; + readonly "threadSection/delete": typeof CodexSchema.V2ThreadSectionDeleteParams.Type; readonly "thread/search": typeof CodexSchema.V2ThreadSearchParams.Type; readonly "thread/searchOccurrences": typeof CodexSchema.V2ThreadSearchOccurrencesParams.Type; readonly "thread/loaded/list": typeof CodexSchema.V2ThreadLoadedListParams.Type; @@ -275,6 +330,7 @@ export interface ClientRequestParamsByMethod { readonly "marketplace/remove": typeof CodexSchema.V2MarketplaceRemoveParams.Type; readonly "marketplace/upgrade": typeof CodexSchema.V2MarketplaceUpgradeParams.Type; readonly "plugin/list": typeof CodexSchema.V2PluginListParams.Type; + readonly "plugin/search": typeof CodexSchema.V2PluginSearchParams.Type; readonly "plugin/installed": typeof CodexSchema.V2PluginInstalledParams.Type; readonly "plugin/read": typeof CodexSchema.V2PluginReadParams.Type; readonly "plugin/skill/read": typeof CodexSchema.V2PluginSkillReadParams.Type; @@ -306,6 +362,7 @@ export interface ClientRequestParamsByMethod { readonly "thread/realtime/appendText": typeof CodexSchema.V2ThreadRealtimeAppendTextParams.Type; readonly "thread/realtime/appendSpeech": typeof CodexSchema.V2ThreadRealtimeAppendSpeechParams.Type; readonly "thread/realtime/stop": typeof CodexSchema.V2ThreadRealtimeStopParams.Type; + readonly "thread/timeline/list": typeof CodexSchema.V2ThreadTimelineListParams.Type; readonly "thread/realtime/listVoices": typeof CodexSchema.V2ThreadRealtimeListVoicesParams.Type; readonly "review/start": typeof CodexSchema.V2ReviewStartParams.Type; readonly "model/list": typeof CodexSchema.V2ModelListParams.Type; @@ -329,15 +386,19 @@ export interface ClientRequestParamsByMethod { readonly "config/mcpServer/reload": undefined; readonly "mcpServerStatus/list": typeof CodexSchema.V2ListMcpServerStatusParams.Type; readonly "mcpServer/resource/read": typeof CodexSchema.V2McpResourceReadParams.Type; + readonly "mcpServer/event/stream/start": typeof CodexSchema.V2McpServerEventStreamStartParams.Type; + readonly "mcpServer/event/stream/stop": typeof CodexSchema.V2McpServerEventStreamStopParams.Type; readonly "mcpServer/tool/call": typeof CodexSchema.V2McpServerToolCallParams.Type; readonly "windowsSandbox/setupStart": typeof CodexSchema.V2WindowsSandboxSetupStartParams.Type; readonly "windowsSandbox/readiness": undefined; readonly "account/login/start": typeof CodexSchema.V2LoginAccountParams.Type; + readonly "account/bedrock/discover": typeof CodexSchema.V2BedrockDiscoverParams.Type; + readonly "account/bedrock/setup": typeof CodexSchema.V2BedrockSetupParams.Type; readonly "account/login/cancel": typeof CodexSchema.V2CancelLoginAccountParams.Type; readonly "account/logout": undefined; readonly "account/rateLimits/read": undefined; readonly "account/rateLimitResetCredit/consume": typeof CodexSchema.V2ConsumeAccountRateLimitResetCreditParams.Type; - readonly "account/usage/read": undefined; + readonly "account/usage/read": typeof CodexSchema.V2NullableGetAccountTokenUsageParams.Type; readonly "account/workspaceMessages/read": undefined; readonly "account/sendAddCreditsNudgeEmail": typeof CodexSchema.V2SendAddCreditsNudgeEmailParams.Type; readonly "feedback/upload": typeof CodexSchema.V2FeedbackUploadParams.Type; @@ -369,6 +430,7 @@ export interface ClientRequestParamsByMethod { export interface ClientRequestResponsesByMethod { readonly initialize: typeof CodexSchema.V1InitializeResponse.Type; + readonly "server/diagnostics": typeof CodexSchema.V2ServerDiagnosticsResponse.Type; readonly "thread/start": typeof CodexSchema.V2ThreadStartResponse.Type; readonly "thread/resume": typeof CodexSchema.V2ThreadResumeResponse.Type; readonly "thread/fork": typeof CodexSchema.V2ThreadForkResponse.Type; @@ -381,7 +443,14 @@ export interface ClientRequestResponsesByMethod { readonly "thread/goal/set": typeof CodexSchema.V2ThreadGoalSetResponse.Type; readonly "thread/goal/get": typeof CodexSchema.V2ThreadGoalGetResponse.Type; readonly "thread/goal/clear": typeof CodexSchema.V2ThreadGoalClearResponse.Type; + readonly "thread/queue/add": typeof CodexSchema.V2ThreadQueueAddResponse.Type; + readonly "thread/queue/list": typeof CodexSchema.V2ThreadQueueListResponse.Type; + readonly "thread/queue/update": typeof CodexSchema.V2ThreadQueueUpdateResponse.Type; + readonly "thread/queue/delete": typeof CodexSchema.V2ThreadQueueDeleteResponse.Type; + readonly "thread/queue/reorder": typeof CodexSchema.V2ThreadQueueReorderResponse.Type; + readonly "thread/queue/start": typeof CodexSchema.V2ThreadQueueStartResponse.Type; readonly "thread/metadata/update": typeof CodexSchema.V2ThreadMetadataUpdateResponse.Type; + readonly "thread/section/move": typeof CodexSchema.V2ThreadSectionMoveResponse.Type; readonly "thread/settings/update": typeof CodexSchema.V2ThreadSettingsUpdateResponse.Type; readonly "thread/memoryMode/set": typeof CodexSchema.V2ThreadMemoryModeSetResponse.Type; readonly "memory/reset": typeof CodexSchema.V2MemoryResetResponse.Type; @@ -393,7 +462,19 @@ export interface ClientRequestResponsesByMethod { readonly "thread/backgroundTerminals/list": typeof CodexSchema.V2ThreadBackgroundTerminalsListResponse.Type; readonly "thread/backgroundTerminals/terminate": typeof CodexSchema.V2ThreadBackgroundTerminalsTerminateResponse.Type; readonly "thread/rollback": typeof CodexSchema.V2ThreadRollbackResponse.Type; + readonly "thread/revert": typeof CodexSchema.V2ThreadRevertResponse.Type; readonly "thread/list": typeof CodexSchema.V2ThreadListResponse.Type; + readonly "project/list": typeof CodexSchema.V2ProjectListResponse.Type; + readonly "project/read": typeof CodexSchema.V2ProjectReadResponse.Type; + readonly "project/create": typeof CodexSchema.V2ProjectCreateResponse.Type; + readonly "project/import": typeof CodexSchema.V2ProjectImportResponse.Type; + readonly "project/update": typeof CodexSchema.V2ProjectUpdateResponse.Type; + readonly "project/move": typeof CodexSchema.V2ProjectMoveResponse.Type; + readonly "project/delete": typeof CodexSchema.V2ProjectDeleteResponse.Type; + readonly "threadSection/list": typeof CodexSchema.V2ThreadSectionListResponse.Type; + readonly "threadSection/create": typeof CodexSchema.V2ThreadSectionCreateResponse.Type; + readonly "threadSection/update": typeof CodexSchema.V2ThreadSectionUpdateResponse.Type; + readonly "threadSection/delete": typeof CodexSchema.V2ThreadSectionDeleteResponse.Type; readonly "thread/search": typeof CodexSchema.V2ThreadSearchResponse.Type; readonly "thread/searchOccurrences": typeof CodexSchema.V2ThreadSearchOccurrencesResponse.Type; readonly "thread/loaded/list": typeof CodexSchema.V2ThreadLoadedListResponse.Type; @@ -408,6 +489,7 @@ export interface ClientRequestResponsesByMethod { readonly "marketplace/remove": typeof CodexSchema.V2MarketplaceRemoveResponse.Type; readonly "marketplace/upgrade": typeof CodexSchema.V2MarketplaceUpgradeResponse.Type; readonly "plugin/list": typeof CodexSchema.V2PluginListResponse.Type; + readonly "plugin/search": typeof CodexSchema.V2PluginSearchResponse.Type; readonly "plugin/installed": typeof CodexSchema.V2PluginInstalledResponse.Type; readonly "plugin/read": typeof CodexSchema.V2PluginReadResponse.Type; readonly "plugin/skill/read": typeof CodexSchema.V2PluginSkillReadResponse.Type; @@ -439,6 +521,7 @@ export interface ClientRequestResponsesByMethod { readonly "thread/realtime/appendText": typeof CodexSchema.V2ThreadRealtimeAppendTextResponse.Type; readonly "thread/realtime/appendSpeech": typeof CodexSchema.V2ThreadRealtimeAppendSpeechResponse.Type; readonly "thread/realtime/stop": typeof CodexSchema.V2ThreadRealtimeStopResponse.Type; + readonly "thread/timeline/list": typeof CodexSchema.V2ThreadTimelineListResponse.Type; readonly "thread/realtime/listVoices": typeof CodexSchema.V2ThreadRealtimeListVoicesResponse.Type; readonly "review/start": typeof CodexSchema.V2ReviewStartResponse.Type; readonly "model/list": typeof CodexSchema.V2ModelListResponse.Type; @@ -462,10 +545,14 @@ export interface ClientRequestResponsesByMethod { 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/event/stream/start": typeof CodexSchema.V2McpServerEventStreamStartResponse.Type; + readonly "mcpServer/event/stream/stop": typeof CodexSchema.V2McpServerEventStreamStopResponse.Type; readonly "mcpServer/tool/call": typeof CodexSchema.V2McpServerToolCallResponse.Type; readonly "windowsSandbox/setupStart": typeof CodexSchema.V2WindowsSandboxSetupStartResponse.Type; readonly "windowsSandbox/readiness": typeof CodexSchema.V2WindowsSandboxReadinessResponse.Type; readonly "account/login/start": typeof CodexSchema.V2LoginAccountResponse.Type; + readonly "account/bedrock/discover": typeof CodexSchema.V2BedrockDiscoverResponse.Type; + readonly "account/bedrock/setup": typeof CodexSchema.V2BedrockSetupResponse.Type; readonly "account/login/cancel": typeof CodexSchema.V2CancelLoginAccountResponse.Type; readonly "account/logout": typeof CodexSchema.V2LogoutAccountResponse.Type; readonly "account/rateLimits/read": typeof CodexSchema.V2GetAccountRateLimitsResponse.Type; @@ -540,10 +627,14 @@ export interface ServerNotificationParamsByMethod { readonly "thread/deleted": typeof CodexSchema.V2ThreadDeletedNotification.Type; readonly "thread/unarchived": typeof CodexSchema.V2ThreadUnarchivedNotification.Type; readonly "thread/closed": typeof CodexSchema.V2ThreadClosedNotification.Type; + readonly "thread/reverted": typeof CodexSchema.V2ThreadRevertedNotification.Type; readonly "skills/changed": typeof CodexSchema.V2SkillsChangedNotification.Type; readonly "thread/name/updated": typeof CodexSchema.V2ThreadNameUpdatedNotification.Type; readonly "thread/goal/updated": typeof CodexSchema.V2ThreadGoalUpdatedNotification.Type; readonly "thread/goal/cleared": typeof CodexSchema.V2ThreadGoalClearedNotification.Type; + readonly "thread/queue/changed": typeof CodexSchema.V2ThreadQueueChangedNotification.Type; + readonly "project/changed": typeof CodexSchema.V2ProjectChangedNotification.Type; + readonly "thread/project/updated": typeof CodexSchema.V2ThreadProjectUpdatedNotification.Type; readonly "thread/environment/connected": typeof CodexSchema.V2EnvironmentConnectionNotification.Type; readonly "thread/environment/disconnected": typeof CodexSchema.V2EnvironmentConnectionNotification.Type; readonly "thread/settings/updated": typeof CodexSchema.V2ThreadSettingsUpdatedNotification.Type; @@ -557,6 +648,7 @@ export interface ServerNotificationParamsByMethod { readonly "item/started": typeof CodexSchema.V2ItemStartedNotification.Type; readonly "item/autoApprovalReview/started": typeof CodexSchema.V2ItemGuardianApprovalReviewStartedNotification.Type; readonly "item/autoApprovalReview/completed": typeof CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification.Type; + readonly "autoApprovalReview/strictReviewRequired": typeof CodexSchema.V2StrictReviewRequiredNotification.Type; readonly "item/completed": typeof CodexSchema.V2ItemCompletedNotification.Type; readonly "rawResponseItem/completed": typeof CodexSchema.V2RawResponseItemCompletedNotification.Type; readonly "rawResponse/completed": typeof CodexSchema.V2RawResponseCompletedNotification.Type; @@ -573,6 +665,7 @@ export interface ServerNotificationParamsByMethod { 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 "mcpServer/event/stream/notification": typeof CodexSchema.V2McpServerEventStreamNotification.Type; readonly "account/updated": typeof CodexSchema.V2AccountUpdatedNotification.Type; readonly "account/rateLimits/updated": typeof CodexSchema.V2AccountRateLimitsUpdatedNotification.Type; readonly "app/list/updated": typeof CodexSchema.V2AppListUpdatedNotification.Type; @@ -596,6 +689,9 @@ export interface ServerNotificationParamsByMethod { 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/item/started": typeof CodexSchema.V2ThreadRealtimeItemStartedNotification.Type; + readonly "thread/realtime/item/transcript/delta": typeof CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification.Type; + readonly "thread/realtime/item/completed": typeof CodexSchema.V2ThreadRealtimeItemCompletedNotification.Type; readonly "thread/realtime/transcript/delta": typeof CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification.Type; readonly "thread/realtime/transcript/done": typeof CodexSchema.V2ThreadRealtimeTranscriptDoneNotification.Type; readonly "thread/realtime/outputAudio/delta": typeof CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification.Type; @@ -609,6 +705,7 @@ export interface ServerNotificationParamsByMethod { export const CLIENT_REQUEST_PARAMS = { initialize: CodexSchema.V1InitializeParams, + "server/diagnostics": CodexSchema.V2ServerDiagnosticsParams, "thread/start": CodexSchema.V2ThreadStartParams, "thread/resume": CodexSchema.V2ThreadResumeParams, "thread/fork": CodexSchema.V2ThreadForkParams, @@ -621,7 +718,14 @@ export const CLIENT_REQUEST_PARAMS = { "thread/goal/set": CodexSchema.V2ThreadGoalSetParams, "thread/goal/get": CodexSchema.V2ThreadGoalGetParams, "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams, + "thread/queue/add": CodexSchema.V2ThreadQueueAddParams, + "thread/queue/list": CodexSchema.V2ThreadQueueListParams, + "thread/queue/update": CodexSchema.V2ThreadQueueUpdateParams, + "thread/queue/delete": CodexSchema.V2ThreadQueueDeleteParams, + "thread/queue/reorder": CodexSchema.V2ThreadQueueReorderParams, + "thread/queue/start": CodexSchema.V2ThreadQueueStartParams, "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams, + "thread/section/move": CodexSchema.V2ThreadSectionMoveParams, "thread/settings/update": CodexSchema.V2ThreadSettingsUpdateParams, "thread/memoryMode/set": CodexSchema.V2ThreadMemoryModeSetParams, "memory/reset": undefined, @@ -633,7 +737,19 @@ export const CLIENT_REQUEST_PARAMS = { "thread/backgroundTerminals/list": CodexSchema.V2ThreadBackgroundTerminalsListParams, "thread/backgroundTerminals/terminate": CodexSchema.V2ThreadBackgroundTerminalsTerminateParams, "thread/rollback": CodexSchema.V2ThreadRollbackParams, + "thread/revert": CodexSchema.V2ThreadRevertParams, "thread/list": CodexSchema.V2ThreadListParams, + "project/list": CodexSchema.V2ProjectListParams, + "project/read": CodexSchema.V2ProjectReadParams, + "project/create": CodexSchema.V2ProjectCreateParams, + "project/import": CodexSchema.V2ProjectImportParams, + "project/update": CodexSchema.V2ProjectUpdateParams, + "project/move": CodexSchema.V2ProjectMoveParams, + "project/delete": CodexSchema.V2ProjectDeleteParams, + "threadSection/list": CodexSchema.V2ThreadSectionListParams, + "threadSection/create": CodexSchema.V2ThreadSectionCreateParams, + "threadSection/update": CodexSchema.V2ThreadSectionUpdateParams, + "threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams, "thread/search": CodexSchema.V2ThreadSearchParams, "thread/searchOccurrences": CodexSchema.V2ThreadSearchOccurrencesParams, "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams, @@ -648,6 +764,7 @@ export const CLIENT_REQUEST_PARAMS = { "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams, "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams, "plugin/list": CodexSchema.V2PluginListParams, + "plugin/search": CodexSchema.V2PluginSearchParams, "plugin/installed": CodexSchema.V2PluginInstalledParams, "plugin/read": CodexSchema.V2PluginReadParams, "plugin/skill/read": CodexSchema.V2PluginSkillReadParams, @@ -679,6 +796,7 @@ export const CLIENT_REQUEST_PARAMS = { "thread/realtime/appendText": CodexSchema.V2ThreadRealtimeAppendTextParams, "thread/realtime/appendSpeech": CodexSchema.V2ThreadRealtimeAppendSpeechParams, "thread/realtime/stop": CodexSchema.V2ThreadRealtimeStopParams, + "thread/timeline/list": CodexSchema.V2ThreadTimelineListParams, "thread/realtime/listVoices": CodexSchema.V2ThreadRealtimeListVoicesParams, "review/start": CodexSchema.V2ReviewStartParams, "model/list": CodexSchema.V2ModelListParams, @@ -702,15 +820,19 @@ export const CLIENT_REQUEST_PARAMS = { "config/mcpServer/reload": undefined, "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusParams, "mcpServer/resource/read": CodexSchema.V2McpResourceReadParams, + "mcpServer/event/stream/start": CodexSchema.V2McpServerEventStreamStartParams, + "mcpServer/event/stream/stop": CodexSchema.V2McpServerEventStreamStopParams, "mcpServer/tool/call": CodexSchema.V2McpServerToolCallParams, "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartParams, "windowsSandbox/readiness": undefined, "account/login/start": CodexSchema.V2LoginAccountParams, + "account/bedrock/discover": CodexSchema.V2BedrockDiscoverParams, + "account/bedrock/setup": CodexSchema.V2BedrockSetupParams, "account/login/cancel": CodexSchema.V2CancelLoginAccountParams, "account/logout": undefined, "account/rateLimits/read": undefined, "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams, - "account/usage/read": undefined, + "account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams, "account/workspaceMessages/read": undefined, "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams, "feedback/upload": CodexSchema.V2FeedbackUploadParams, @@ -743,6 +865,7 @@ export const CLIENT_REQUEST_PARAMS = { export const CLIENT_REQUEST_RESPONSES = { initialize: CodexSchema.V1InitializeResponse, + "server/diagnostics": CodexSchema.V2ServerDiagnosticsResponse, "thread/start": CodexSchema.V2ThreadStartResponse, "thread/resume": CodexSchema.V2ThreadResumeResponse, "thread/fork": CodexSchema.V2ThreadForkResponse, @@ -755,7 +878,14 @@ export const CLIENT_REQUEST_RESPONSES = { "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse, "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse, "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse, + "thread/queue/add": CodexSchema.V2ThreadQueueAddResponse, + "thread/queue/list": CodexSchema.V2ThreadQueueListResponse, + "thread/queue/update": CodexSchema.V2ThreadQueueUpdateResponse, + "thread/queue/delete": CodexSchema.V2ThreadQueueDeleteResponse, + "thread/queue/reorder": CodexSchema.V2ThreadQueueReorderResponse, + "thread/queue/start": CodexSchema.V2ThreadQueueStartResponse, "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse, + "thread/section/move": CodexSchema.V2ThreadSectionMoveResponse, "thread/settings/update": CodexSchema.V2ThreadSettingsUpdateResponse, "thread/memoryMode/set": CodexSchema.V2ThreadMemoryModeSetResponse, "memory/reset": CodexSchema.V2MemoryResetResponse, @@ -767,7 +897,19 @@ export const CLIENT_REQUEST_RESPONSES = { "thread/backgroundTerminals/list": CodexSchema.V2ThreadBackgroundTerminalsListResponse, "thread/backgroundTerminals/terminate": CodexSchema.V2ThreadBackgroundTerminalsTerminateResponse, "thread/rollback": CodexSchema.V2ThreadRollbackResponse, + "thread/revert": CodexSchema.V2ThreadRevertResponse, "thread/list": CodexSchema.V2ThreadListResponse, + "project/list": CodexSchema.V2ProjectListResponse, + "project/read": CodexSchema.V2ProjectReadResponse, + "project/create": CodexSchema.V2ProjectCreateResponse, + "project/import": CodexSchema.V2ProjectImportResponse, + "project/update": CodexSchema.V2ProjectUpdateResponse, + "project/move": CodexSchema.V2ProjectMoveResponse, + "project/delete": CodexSchema.V2ProjectDeleteResponse, + "threadSection/list": CodexSchema.V2ThreadSectionListResponse, + "threadSection/create": CodexSchema.V2ThreadSectionCreateResponse, + "threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse, + "threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse, "thread/search": CodexSchema.V2ThreadSearchResponse, "thread/searchOccurrences": CodexSchema.V2ThreadSearchOccurrencesResponse, "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse, @@ -782,6 +924,7 @@ export const CLIENT_REQUEST_RESPONSES = { "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse, "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse, "plugin/list": CodexSchema.V2PluginListResponse, + "plugin/search": CodexSchema.V2PluginSearchResponse, "plugin/installed": CodexSchema.V2PluginInstalledResponse, "plugin/read": CodexSchema.V2PluginReadResponse, "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse, @@ -813,6 +956,7 @@ export const CLIENT_REQUEST_RESPONSES = { "thread/realtime/appendText": CodexSchema.V2ThreadRealtimeAppendTextResponse, "thread/realtime/appendSpeech": CodexSchema.V2ThreadRealtimeAppendSpeechResponse, "thread/realtime/stop": CodexSchema.V2ThreadRealtimeStopResponse, + "thread/timeline/list": CodexSchema.V2ThreadTimelineListResponse, "thread/realtime/listVoices": CodexSchema.V2ThreadRealtimeListVoicesResponse, "review/start": CodexSchema.V2ReviewStartResponse, "model/list": CodexSchema.V2ModelListResponse, @@ -836,10 +980,14 @@ export const CLIENT_REQUEST_RESPONSES = { "config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse, "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusResponse, "mcpServer/resource/read": CodexSchema.V2McpResourceReadResponse, + "mcpServer/event/stream/start": CodexSchema.V2McpServerEventStreamStartResponse, + "mcpServer/event/stream/stop": CodexSchema.V2McpServerEventStreamStopResponse, "mcpServer/tool/call": CodexSchema.V2McpServerToolCallResponse, "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartResponse, "windowsSandbox/readiness": CodexSchema.V2WindowsSandboxReadinessResponse, "account/login/start": CodexSchema.V2LoginAccountResponse, + "account/bedrock/discover": CodexSchema.V2BedrockDiscoverResponse, + "account/bedrock/setup": CodexSchema.V2BedrockSetupResponse, "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse, "account/logout": CodexSchema.V2LogoutAccountResponse, "account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse, @@ -916,10 +1064,14 @@ export const SERVER_NOTIFICATION_PARAMS = { "thread/deleted": CodexSchema.V2ThreadDeletedNotification, "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification, "thread/closed": CodexSchema.V2ThreadClosedNotification, + "thread/reverted": CodexSchema.V2ThreadRevertedNotification, "skills/changed": CodexSchema.V2SkillsChangedNotification, "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification, "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification, "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification, + "thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification, + "project/changed": CodexSchema.V2ProjectChangedNotification, + "thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification, "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification, "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification, "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification, @@ -934,6 +1086,7 @@ export const SERVER_NOTIFICATION_PARAMS = { "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification, "item/autoApprovalReview/completed": CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification, + "autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification, "item/completed": CodexSchema.V2ItemCompletedNotification, "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification, "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification, @@ -950,6 +1103,7 @@ export const SERVER_NOTIFICATION_PARAMS = { "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification, "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification, "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification, + "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification, "account/updated": CodexSchema.V2AccountUpdatedNotification, "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification, "app/list/updated": CodexSchema.V2AppListUpdatedNotification, @@ -975,6 +1129,10 @@ export const SERVER_NOTIFICATION_PARAMS = { "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification, "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification, "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification, + "thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification, + "thread/realtime/item/transcript/delta": + CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification, + "thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification, "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification, "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification, "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification, 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 f2adf151c..1b92ef02f 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: rust-v0.146.0 +// Upstream protocol ref: rust-v0.150.1 import * as CodexSchema from "./schema.gen.ts"; @@ -20,6 +20,10 @@ export const v2 = { AppsListResponse: CodexSchema.V2AppsListResponse, AppsReadParams: CodexSchema.V2AppsReadParams, AppsReadResponse: CodexSchema.V2AppsReadResponse, + BedrockDiscoverParams: CodexSchema.V2BedrockDiscoverParams, + BedrockDiscoverResponse: CodexSchema.V2BedrockDiscoverResponse, + BedrockSetupParams: CodexSchema.V2BedrockSetupParams, + BedrockSetupResponse: CodexSchema.V2BedrockSetupResponse, CancelLoginAccountParams: CodexSchema.V2CancelLoginAccountParams, CancelLoginAccountResponse: CodexSchema.V2CancelLoginAccountResponse, CollaborationModeListParams: CodexSchema.V2CollaborationModeListParams, @@ -124,6 +128,11 @@ export const v2 = { MarketplaceUpgradeResponse: CodexSchema.V2MarketplaceUpgradeResponse, McpResourceReadParams: CodexSchema.V2McpResourceReadParams, McpResourceReadResponse: CodexSchema.V2McpResourceReadResponse, + McpServerEventStreamNotification: CodexSchema.V2McpServerEventStreamNotification, + McpServerEventStreamStartParams: CodexSchema.V2McpServerEventStreamStartParams, + McpServerEventStreamStartResponse: CodexSchema.V2McpServerEventStreamStartResponse, + McpServerEventStreamStopParams: CodexSchema.V2McpServerEventStreamStopParams, + McpServerEventStreamStopResponse: CodexSchema.V2McpServerEventStreamStopResponse, McpServerOauthLoginCompletedNotification: CodexSchema.V2McpServerOauthLoginCompletedNotification, McpServerOauthLoginParams: CodexSchema.V2McpServerOauthLoginParams, McpServerOauthLoginResponse: CodexSchema.V2McpServerOauthLoginResponse, @@ -142,6 +151,7 @@ export const v2 = { ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification, ModelSafetyBufferingUpdatedNotification: CodexSchema.V2ModelSafetyBufferingUpdatedNotification, ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification, + NullableGetAccountTokenUsageParams: CodexSchema.V2NullableGetAccountTokenUsageParams, NullableRemoteControlDisableParams: CodexSchema.V2NullableRemoteControlDisableParams, NullableRemoteControlEnableParams: CodexSchema.V2NullableRemoteControlEnableParams, PermissionProfileListParams: CodexSchema.V2PermissionProfileListParams, @@ -155,6 +165,8 @@ export const v2 = { PluginListResponse: CodexSchema.V2PluginListResponse, PluginReadParams: CodexSchema.V2PluginReadParams, PluginReadResponse: CodexSchema.V2PluginReadResponse, + PluginSearchParams: CodexSchema.V2PluginSearchParams, + PluginSearchResponse: CodexSchema.V2PluginSearchResponse, PluginShareCheckoutParams: CodexSchema.V2PluginShareCheckoutParams, PluginShareCheckoutResponse: CodexSchema.V2PluginShareCheckoutResponse, PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams, @@ -179,6 +191,21 @@ export const v2 = { ProcessSpawnResponse: CodexSchema.V2ProcessSpawnResponse, ProcessWriteStdinParams: CodexSchema.V2ProcessWriteStdinParams, ProcessWriteStdinResponse: CodexSchema.V2ProcessWriteStdinResponse, + ProjectChangedNotification: CodexSchema.V2ProjectChangedNotification, + ProjectCreateParams: CodexSchema.V2ProjectCreateParams, + ProjectCreateResponse: CodexSchema.V2ProjectCreateResponse, + ProjectDeleteParams: CodexSchema.V2ProjectDeleteParams, + ProjectDeleteResponse: CodexSchema.V2ProjectDeleteResponse, + ProjectImportParams: CodexSchema.V2ProjectImportParams, + ProjectImportResponse: CodexSchema.V2ProjectImportResponse, + ProjectListParams: CodexSchema.V2ProjectListParams, + ProjectListResponse: CodexSchema.V2ProjectListResponse, + ProjectMoveParams: CodexSchema.V2ProjectMoveParams, + ProjectMoveResponse: CodexSchema.V2ProjectMoveResponse, + ProjectReadParams: CodexSchema.V2ProjectReadParams, + ProjectReadResponse: CodexSchema.V2ProjectReadResponse, + ProjectUpdateParams: CodexSchema.V2ProjectUpdateParams, + ProjectUpdateResponse: CodexSchema.V2ProjectUpdateResponse, RawResponseCompletedNotification: CodexSchema.V2RawResponseCompletedNotification, RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification, ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification, @@ -200,6 +227,8 @@ export const v2 = { ReviewStartResponse: CodexSchema.V2ReviewStartResponse, SendAddCreditsNudgeEmailParams: CodexSchema.V2SendAddCreditsNudgeEmailParams, SendAddCreditsNudgeEmailResponse: CodexSchema.V2SendAddCreditsNudgeEmailResponse, + ServerDiagnosticsParams: CodexSchema.V2ServerDiagnosticsParams, + ServerDiagnosticsResponse: CodexSchema.V2ServerDiagnosticsResponse, ServerRequestResolvedNotification: CodexSchema.V2ServerRequestResolvedNotification, SkillsChangedNotification: CodexSchema.V2SkillsChangedNotification, SkillsConfigWriteParams: CodexSchema.V2SkillsConfigWriteParams, @@ -208,6 +237,7 @@ export const v2 = { SkillsExtraRootsSetResponse: CodexSchema.V2SkillsExtraRootsSetResponse, SkillsListParams: CodexSchema.V2SkillsListParams, SkillsListResponse: CodexSchema.V2SkillsListResponse, + StrictReviewRequiredNotification: CodexSchema.V2StrictReviewRequiredNotification, TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification, ThreadApproveGuardianDeniedActionParams: CodexSchema.V2ThreadApproveGuardianDeniedActionParams, ThreadApproveGuardianDeniedActionResponse: @@ -255,6 +285,20 @@ export const v2 = { ThreadMetadataUpdateParams: CodexSchema.V2ThreadMetadataUpdateParams, ThreadMetadataUpdateResponse: CodexSchema.V2ThreadMetadataUpdateResponse, ThreadNameUpdatedNotification: CodexSchema.V2ThreadNameUpdatedNotification, + ThreadProjectUpdatedNotification: CodexSchema.V2ThreadProjectUpdatedNotification, + ThreadQueueAddParams: CodexSchema.V2ThreadQueueAddParams, + ThreadQueueAddResponse: CodexSchema.V2ThreadQueueAddResponse, + ThreadQueueChangedNotification: CodexSchema.V2ThreadQueueChangedNotification, + ThreadQueueDeleteParams: CodexSchema.V2ThreadQueueDeleteParams, + ThreadQueueDeleteResponse: CodexSchema.V2ThreadQueueDeleteResponse, + ThreadQueueListParams: CodexSchema.V2ThreadQueueListParams, + ThreadQueueListResponse: CodexSchema.V2ThreadQueueListResponse, + ThreadQueueReorderParams: CodexSchema.V2ThreadQueueReorderParams, + ThreadQueueReorderResponse: CodexSchema.V2ThreadQueueReorderResponse, + ThreadQueueStartParams: CodexSchema.V2ThreadQueueStartParams, + ThreadQueueStartResponse: CodexSchema.V2ThreadQueueStartResponse, + ThreadQueueUpdateParams: CodexSchema.V2ThreadQueueUpdateParams, + ThreadQueueUpdateResponse: CodexSchema.V2ThreadQueueUpdateResponse, ThreadReadParams: CodexSchema.V2ThreadReadParams, ThreadReadResponse: CodexSchema.V2ThreadReadResponse, ThreadRealtimeAppendAudioParams: CodexSchema.V2ThreadRealtimeAppendAudioParams, @@ -266,6 +310,10 @@ export const v2 = { ThreadRealtimeClosedNotification: CodexSchema.V2ThreadRealtimeClosedNotification, ThreadRealtimeErrorNotification: CodexSchema.V2ThreadRealtimeErrorNotification, ThreadRealtimeItemAddedNotification: CodexSchema.V2ThreadRealtimeItemAddedNotification, + ThreadRealtimeItemCompletedNotification: CodexSchema.V2ThreadRealtimeItemCompletedNotification, + ThreadRealtimeItemStartedNotification: CodexSchema.V2ThreadRealtimeItemStartedNotification, + ThreadRealtimeItemTranscriptDeltaNotification: + CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification, ThreadRealtimeListVoicesParams: CodexSchema.V2ThreadRealtimeListVoicesParams, ThreadRealtimeListVoicesResponse: CodexSchema.V2ThreadRealtimeListVoicesResponse, ThreadRealtimeOutputAudioDeltaNotification: @@ -281,12 +329,25 @@ export const v2 = { ThreadRealtimeTranscriptDoneNotification: CodexSchema.V2ThreadRealtimeTranscriptDoneNotification, ThreadResumeParams: CodexSchema.V2ThreadResumeParams, ThreadResumeResponse: CodexSchema.V2ThreadResumeResponse, + ThreadRevertedNotification: CodexSchema.V2ThreadRevertedNotification, + ThreadRevertParams: CodexSchema.V2ThreadRevertParams, + ThreadRevertResponse: CodexSchema.V2ThreadRevertResponse, ThreadRollbackParams: CodexSchema.V2ThreadRollbackParams, ThreadRollbackResponse: CodexSchema.V2ThreadRollbackResponse, ThreadSearchOccurrencesParams: CodexSchema.V2ThreadSearchOccurrencesParams, ThreadSearchOccurrencesResponse: CodexSchema.V2ThreadSearchOccurrencesResponse, ThreadSearchParams: CodexSchema.V2ThreadSearchParams, ThreadSearchResponse: CodexSchema.V2ThreadSearchResponse, + ThreadSectionCreateParams: CodexSchema.V2ThreadSectionCreateParams, + ThreadSectionCreateResponse: CodexSchema.V2ThreadSectionCreateResponse, + ThreadSectionDeleteParams: CodexSchema.V2ThreadSectionDeleteParams, + ThreadSectionDeleteResponse: CodexSchema.V2ThreadSectionDeleteResponse, + ThreadSectionListParams: CodexSchema.V2ThreadSectionListParams, + ThreadSectionListResponse: CodexSchema.V2ThreadSectionListResponse, + ThreadSectionMoveParams: CodexSchema.V2ThreadSectionMoveParams, + ThreadSectionMoveResponse: CodexSchema.V2ThreadSectionMoveResponse, + ThreadSectionUpdateParams: CodexSchema.V2ThreadSectionUpdateParams, + ThreadSectionUpdateResponse: CodexSchema.V2ThreadSectionUpdateResponse, ThreadSetNameParams: CodexSchema.V2ThreadSetNameParams, ThreadSetNameResponse: CodexSchema.V2ThreadSetNameResponse, ThreadSettingsUpdatedNotification: CodexSchema.V2ThreadSettingsUpdatedNotification, @@ -298,6 +359,8 @@ export const v2 = { ThreadStartParams: CodexSchema.V2ThreadStartParams, ThreadStartResponse: CodexSchema.V2ThreadStartResponse, ThreadStatusChangedNotification: CodexSchema.V2ThreadStatusChangedNotification, + ThreadTimelineListParams: CodexSchema.V2ThreadTimelineListParams, + ThreadTimelineListResponse: CodexSchema.V2ThreadTimelineListResponse, ThreadTokenUsageUpdatedNotification: CodexSchema.V2ThreadTokenUsageUpdatedNotification, ThreadTurnsListParams: CodexSchema.V2ThreadTurnsListParams, ThreadTurnsListResponse: CodexSchema.V2ThreadTurnsListResponse, 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 b18a8bffe..c585eb221 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: rust-v0.146.0 +// Upstream protocol ref: rust-v0.150.1 import * as Schema from "effect/Schema"; @@ -36,12 +36,18 @@ export const ClientRequest__AppsInstalledParams = Schema.Struct({ "forceRefresh" export type ClientRequest__AppsListParams = { readonly "cursor"?: string | null, readonly "forceRefetch"?: boolean, readonly "limit"?: number | null, readonly "threadId"?: string | null } export const ClientRequest__AppsListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "forceRefetch": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, bypass app caches and fetch the latest data from sources." })), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "threadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional thread id used to evaluate app feature gating from that thread's config." }), Schema.Null])) }).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__AppsReadParams = { readonly "appIds": ReadonlyArray, readonly "includeTools"?: boolean, readonly "threadId"?: string | null } +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." })), "threadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional loaded thread id used to evaluate effective app configuration." }), Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - read metadata for specific apps/connectors." }) export type ClientRequest__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 ClientRequest__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 ClientRequest__BedrockDiscoverParams = { } +export const ClientRequest__BedrockDiscoverParams = Schema.Struct({ }) + +export type ClientRequest__BedrockSetupParams = { readonly "profile": string, readonly "region": string, readonly "type": "profile" } | { readonly "region": string, readonly "type": "environment" } +export const ClientRequest__BedrockSetupParams = Schema.Union([Schema.Struct({ "profile": Schema.String, "region": Schema.String, "type": Schema.Literal("profile").annotate({ "title": "ProfileBedrockSetupParamsType" }) }).annotate({ "title": "ProfileBedrockSetupParams" }), Schema.Struct({ "region": Schema.String, "type": Schema.Literal("environment").annotate({ "title": "EnvironmentBedrockSetupParamsType" }) }).annotate({ "title": "EnvironmentBedrockSetupParams" })], { mode: "oneOf" }) + export type ClientRequest__CancelLoginAccountParams = { readonly "loginId": string } export const ClientRequest__CancelLoginAccountParams = Schema.Struct({ "loginId": Schema.String }) @@ -147,6 +153,9 @@ export const ClientRequest__FuzzyFileSearchSessionUpdateParams = Schema.Struct({ export type ClientRequest__GetAccountParams = { readonly "refreshToken"?: boolean } export const ClientRequest__GetAccountParams = Schema.Struct({ "refreshToken": Schema.optionalKey(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`." })) }) +export type ClientRequest__GetAccountTokenUsageParams = { readonly "threadId"?: string | null } +export const ClientRequest__GetAccountTokenUsageParams = Schema.Struct({ "threadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "When present, read estimated usage for this thread instead of account-wide token activity." }), Schema.Null])) }) + export type ClientRequest__HookMigration = { readonly "name": string } export const ClientRequest__HookMigration = Schema.Struct({ "name": Schema.String }) @@ -156,8 +165,8 @@ export const ClientRequest__HooksListParams = Schema.Struct({ "cwds": Schema.opt 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(Schema.Boolean.annotate({ "description": "Opt into receiving experimental API methods and fields.", "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({ "description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`)." }), 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__InitializeCapabilities = { readonly "experimentalApi"?: boolean, readonly "extensions"?: { readonly [x: string]: Schema.Json } | null, readonly "mcpServerOpenaiFormElicitation"?: boolean, readonly "optOutNotificationMethods"?: ReadonlyArray | null, readonly "requestAttestation"?: boolean } +export const ClientRequest__InitializeCapabilities = Schema.Struct({ "experimentalApi": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Opt into receiving experimental API methods and fields.", "default": false })), "extensions": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json).annotate({ "description": "MCP extension settings declared by the app-server client." }), Schema.Null])), "mcpServerOpenaiFormElicitation": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`]." })), "optOutNotificationMethods": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`)." }), 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." }) @@ -183,14 +192,20 @@ export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({ "marketpla 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__McpResourceReadParams = { readonly "server": string, readonly "threadId"?: string | null, readonly "uri": string } -export const ClientRequest__McpResourceReadParams = Schema.Struct({ "server": Schema.String, "threadId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "uri": Schema.String }) +export type ClientRequest__McpResourceReadParams = { readonly "connectorId"?: string | null, readonly "originCallId"?: string | null, readonly "server": string, readonly "threadId"?: string | null, readonly "uri": string } +export const ClientRequest__McpResourceReadParams = Schema.Struct({ "connectorId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "originCallId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Originating MCP tool call used to select the resource's app." }), Schema.Null])), "server": Schema.String, "threadId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "uri": Schema.String }) + +export type ClientRequest__McpServerEventStreamStartParams = { readonly "_meta"?: Schema.Json, readonly "arguments": Schema.Json, readonly "name": string, readonly "server": string, readonly "subscriptionId": string, readonly "threadId": string } +export const ClientRequest__McpServerEventStreamStartParams = Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "arguments": Schema.Json, "name": Schema.String, "server": Schema.String, "subscriptionId": Schema.String, "threadId": Schema.String }) + +export type ClientRequest__McpServerEventStreamStopParams = { readonly "subscriptionId": string } +export const ClientRequest__McpServerEventStreamStopParams = Schema.Struct({ "subscriptionId": 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])) }) +export type ClientRequest__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr" +export const ClientRequest__McpServerOauthClientRegistration = Schema.Literals(["auto", "cimd", "dcr"]) export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly" export const ClientRequest__McpServerStatusDetail = Schema.Literals(["full", "toolsAndAuthOnly"]) @@ -228,6 +243,9 @@ export const ClientRequest__Personality = Schema.Literals(["none", "friendly", " 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__PluginSearchScope = "global" | "workspace" | "personal" +export const ClientRequest__PluginSearchScope = Schema.Literals(["global", "workspace", "personal"]) + export type ClientRequest__PluginShareCheckoutParams = { readonly "remotePluginId": string } export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({ "remotePluginId": Schema.String }) @@ -270,6 +288,18 @@ export const ClientRequest__ProcessTerminalSize = Schema.Struct({ "cols": Schema export type ClientRequest__ProcessWriteStdinParams = { readonly "closeStdin"?: boolean, readonly "deltaBase64"?: string | null, readonly "processHandle": string } export const ClientRequest__ProcessWriteStdinParams = Schema.Struct({ "closeStdin": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Close stdin after writing `deltaBase64`, if present." })), "deltaBase64": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional base64-encoded stdin bytes to write." }), Schema.Null])), "processHandle": Schema.String.annotate({ "description": "Client-supplied, connection-scoped `processHandle` from `process/spawn`." }) }).annotate({ "description": "Write stdin bytes to a running `process/spawn` session, close stdin, or both." }) +export type ClientRequest__ProjectDeleteParams = { readonly "projectId": string } +export const ClientRequest__ProjectDeleteParams = Schema.Struct({ "projectId": Schema.String }) + +export type ClientRequest__ProjectListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null } +export const ClientRequest__ProjectListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) + +export type ClientRequest__ProjectMoveParams = { readonly "beforeProjectId"?: string | null, readonly "projectId": string } +export const ClientRequest__ProjectMoveParams = Schema.Struct({ "beforeProjectId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "projectId": Schema.String }) + +export type ClientRequest__ProjectReadParams = { readonly "projectId": string } +export const ClientRequest__ProjectReadParams = Schema.Struct({ "projectId": Schema.String }) + export type ClientRequest__RealtimeConversationVersion = "v1" | "v2" | "v3" export const ClientRequest__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]) @@ -324,6 +354,9 @@ export const ClientRequest__SandboxMode = Schema.Literals(["read-only", "workspa 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__ServerDiagnosticsParams = { } +export const ClientRequest__ServerDiagnosticsParams = Schema.Struct({ }) + export type ClientRequest__SessionMigration = { readonly "cwd": string, readonly "path": string, readonly "title"?: string | null } export const ClientRequest__SessionMigration = Schema.Struct({ "cwd": Schema.String, "path": Schema.String, "title": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) @@ -396,6 +429,18 @@ export const ClientRequest__ThreadMemoryMode = Schema.Literals(["enabled", "disa export type ClientRequest__ThreadMetadataGitInfoUpdateParams = { readonly "branch"?: string | null, readonly "originUrl"?: string | null, readonly "sha"?: string | null } export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({ "branch": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it." }), Schema.Null])), "originUrl": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it." }), Schema.Null])), "sha": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it." }), Schema.Null])) }) +export type ClientRequest__ThreadQueueDeleteParams = { readonly "queuedSubmissionId": string, readonly "threadId": string } +export const ClientRequest__ThreadQueueDeleteParams = Schema.Struct({ "queuedSubmissionId": Schema.String, "threadId": Schema.String }) + +export type ClientRequest__ThreadQueueListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "threadId": string } +export const ClientRequest__ThreadQueueListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to the standard thread-list page size.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "threadId": Schema.String }) + +export type ClientRequest__ThreadQueueReorderParams = { readonly "queuedSubmissionIds": ReadonlyArray, readonly "threadId": string } +export const ClientRequest__ThreadQueueReorderParams = Schema.Struct({ "queuedSubmissionIds": Schema.Array(Schema.String), "threadId": Schema.String }) + +export type ClientRequest__ThreadQueueStartParams = { readonly "queuedSubmissionId"?: string | null, readonly "threadId": string } +export const ClientRequest__ThreadQueueStartParams = Schema.Struct({ "queuedSubmissionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String }) + export type ClientRequest__ThreadReadParams = { readonly "includeTurns"?: boolean, readonly "threadId": string } export const ClientRequest__ThreadReadParams = Schema.Struct({ "includeTurns": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, include turns and their items from rollout history." })), "threadId": Schema.String }) @@ -411,26 +456,44 @@ export const ClientRequest__ThreadRealtimeAudioChunk = Schema.Struct({ "data": S export type ClientRequest__ThreadRealtimeListVoicesParams = { } export const ClientRequest__ThreadRealtimeListVoicesParams = Schema.Struct({ }).annotate({ "description": "EXPERIMENTAL - list voices supported by thread realtime." }) -export type ClientRequest__ThreadRealtimeStartTransport = { readonly "type": "websocket" } | { readonly "sdp": string, readonly "type": "webrtc" } -export const ClientRequest__ThreadRealtimeStartTransport = Schema.Union([Schema.Struct({ "type": Schema.Literal("websocket").annotate({ "title": "WebsocketThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebsocketThreadRealtimeStartTransport" }), Schema.Struct({ "sdp": Schema.String.annotate({ "description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel." }), "type": Schema.Literal("webrtc").annotate({ "title": "WebrtcThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebrtcThreadRealtimeStartTransport" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - transport used by thread realtime." }) +export type ClientRequest__ThreadRealtimeStartTransport = { readonly "type": "websocket" } | { readonly "sdp": string, readonly "type": "webrtc" } | { readonly "callId": string, readonly "type": "existingCall" } +export const ClientRequest__ThreadRealtimeStartTransport = Schema.Union([Schema.Struct({ "type": Schema.Literal("websocket").annotate({ "title": "WebsocketThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebsocketThreadRealtimeStartTransport" }), Schema.Struct({ "sdp": Schema.String.annotate({ "description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel." }), "type": Schema.Literal("webrtc").annotate({ "title": "WebrtcThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebrtcThreadRealtimeStartTransport" }), Schema.Struct({ "callId": Schema.String.annotate({ "description": "Identifier of a realtime call already created and negotiated by the client." }), "type": Schema.Literal("existingCall").annotate({ "title": "ExistingCallThreadRealtimeStartTransportType" }) }).annotate({ "title": "ExistingCallThreadRealtimeStartTransport" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - transport used by thread realtime." }) export type ClientRequest__ThreadRealtimeStopParams = { readonly "threadId": string } export const ClientRequest__ThreadRealtimeStopParams = Schema.Struct({ "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - stop thread realtime." }) +export type ClientRequest__ThreadRevertParams = { readonly "beforeTurnId": string, readonly "threadId": string } +export const ClientRequest__ThreadRevertParams = Schema.Struct({ "beforeTurnId": Schema.String.annotate({ "description": "Turn excluded from the replacement history, together with every later turn." }), "threadId": Schema.String }).annotate({ "description": "Replace a paginated thread's durable history with the prefix before one turn.\n\nThis only changes persisted conversation history. It does not revert local file changes." }) + export type ClientRequest__ThreadRollbackParams = { readonly "numTurns": number, readonly "threadId": string } export const ClientRequest__ThreadRollbackParams = Schema.Struct({ "numTurns": Schema.Number.annotate({ "description": "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "threadId": Schema.String }).annotate({ "description": "DEPRECATED: `thread/rollback` will be removed soon." }) export type ClientRequest__ThreadSearchOccurrencesParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "searchTerm": string, readonly "threadId": string } export const ClientRequest__ThreadSearchOccurrencesParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor returned by a previous call for the same thread and search term." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional occurrence page size.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "searchTerm": Schema.String.annotate({ "description": "Case-insensitive literal substring to find in visible user messages and final assistant messages." }), "threadId": Schema.String }).annotate({ "description": "Parameters for searching visible message occurrences within one paginated thread." }) +export type ClientRequest__ThreadSearchSortKey = "created_at" | "updated_at" | "recency_at" +export const ClientRequest__ThreadSearchSortKey = Schema.Literals(["created_at", "updated_at", "recency_at"]) + +export type ClientRequest__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const ClientRequest__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + +export type ClientRequest__ThreadSectionDeleteParams = { readonly "sectionId": string } +export const ClientRequest__ThreadSectionDeleteParams = Schema.Struct({ "sectionId": Schema.String.annotate({ "description": "The stable, server-generated identity of the section to delete." }) }).annotate({ "description": "Parameters for deleting an independently persisted thread section." }) + +export type ClientRequest__ThreadSectionListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null } +export const ClientRequest__ThreadSectionListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Maximum number of sections to return.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }).annotate({ "description": "Parameters for listing independently persisted thread sections." }) + +export type ClientRequest__ThreadSectionMoveParams = { readonly "beforeThreadId"?: string | null, readonly "sectionId": string | null, readonly "threadId": string } +export const ClientRequest__ThreadSectionMoveParams = Schema.Struct({ "beforeThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Existing thread to insert before; omission or null appends to the section." }), Schema.Null])), "sectionId": Schema.Union([Schema.String.annotate({ "description": "Destination section, or `null` to remove the thread from its section." }), Schema.Null]), "threadId": Schema.String.annotate({ "description": "Thread to move into, within, or out of a section." }) }).annotate({ "description": "Parameters for moving a thread within a server-owned section ordering." }) + export type ClientRequest__ThreadSetNameParams = { readonly "name": string, readonly "threadId": string } export const ClientRequest__ThreadSetNameParams = Schema.Struct({ "name": Schema.String, "threadId": Schema.String }) export type ClientRequest__ThreadShellCommandParams = { readonly "command": string, readonly "threadId": string } export const ClientRequest__ThreadShellCommandParams = Schema.Struct({ "command": Schema.String.annotate({ "description": "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy." }), "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__ThreadSortKey = "created_at" | "updated_at" | "recency_at" | "section_position" +export const ClientRequest__ThreadSortKey = Schema.Literals(["created_at", "updated_at", "recency_at", "section_position"]) export type ClientRequest__ThreadSource = string export const ClientRequest__ThreadSource = Schema.String @@ -441,6 +504,9 @@ export const ClientRequest__ThreadSourceKind = Schema.Literals(["cli", "vscode", export type ClientRequest__ThreadStartSource = "startup" | "clear" export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]) +export type ClientRequest__ThreadTimelineListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "threadId": string } +export const ClientRequest__ThreadTimelineListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - list ordinary and realtime thread history in rollout order." }) + export type ClientRequest__ThreadUnarchiveParams = { readonly "threadId": string } export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({ "threadId": Schema.String }) @@ -456,9 +522,6 @@ export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summa export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated" export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals(["elevated", "unelevated"]) -export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string -export const CommandExecutionRequestApprovalParams__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 CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = { readonly "enabled"?: boolean | null } export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({ "enabled": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }) @@ -573,15 +636,15 @@ export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.St export type ServerNotification__AbsolutePathBuf = string export const ServerNotification__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 ServerNotification__AccountLoginCompletedNotification = { readonly "error"?: string | null, readonly "loginId"?: string | null, readonly "success": boolean } -export const ServerNotification__AccountLoginCompletedNotification = Schema.Struct({ "error": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "loginId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "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__AgentMessageDelivery = "async" +export const ServerNotification__AgentMessageDelivery = Schema.Literal("async") + export type ServerNotification__AgentMessageDeltaNotification = { readonly "delta": string, readonly "itemId": string, readonly "threadId": string, readonly "turnId": string } export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({ "delta": Schema.String, "itemId": Schema.String, "threadId": Schema.String, "turnId": Schema.String }) @@ -603,8 +666,8 @@ export const ServerNotification__ApprovalsReviewer = Schema.Literals(["user", "a 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 const ServerNotification__AuthMode = Schema.Literals(["apikey", "chatgpt", "chatgptAuthTokens", "headers", "agentIdentity", "personalAccessToken", "bedrockApiKey"]).annotate({ "description": "Authentication mode for OpenAI-backed providers." }) +export type ServerNotification__AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens" | "headers" | "agentIdentity" | "personalAccessToken" | "bedrockApiKey" | "bedrockAccessKeys" +export const ServerNotification__AuthMode = Schema.Literals(["apikey", "chatgpt", "chatgptAuthTokens", "headers", "agentIdentity", "personalAccessToken", "bedrockApiKey", "bedrockAccessKeys"]).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." }) @@ -630,6 +693,9 @@ export const ServerNotification__CreditsSnapshot = Schema.Struct({ "balance": Sc export type ServerNotification__DeprecationNoticeNotification = { readonly "details"?: string | null, readonly "summary": string } export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({ "details": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional extra guidance, such as migration steps or rationale." }), Schema.Null])), "summary": Schema.String.annotate({ "description": "Concise summary of what is deprecated." }) }) +export type ServerNotification__DesktopOnboardingEntrypoint = "life_sciences" +export const ServerNotification__DesktopOnboardingEntrypoint = Schema.Literal("life_sciences") + export type ServerNotification__DynamicToolCallOutputContentItem = { readonly "text": string, readonly "type": "inputText" } | { readonly "imageUrl": string, readonly "type": "inputImage" } | { readonly "audioUrl": string, readonly "type": "inputAudio" } export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union([Schema.Struct({ "text": Schema.String, "type": Schema.Literal("inputText").annotate({ "title": "InputTextDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputTextDynamicToolCallOutputContentItem" }), Schema.Struct({ "imageUrl": Schema.String, "type": Schema.Literal("inputImage").annotate({ "title": "InputImageDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputImageDynamicToolCallOutputContentItem" }), Schema.Struct({ "audioUrl": Schema.String, "type": Schema.Literal("inputAudio").annotate({ "title": "InputAudioDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputAudioDynamicToolCallOutputContentItem" })], { mode: "oneOf" }) @@ -672,14 +738,14 @@ export const ServerNotification__GuardianUserAuthorization = Schema.Literals(["u 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." }) }) -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"]) +export type ServerNotification__HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop" | "interrupt" +export const ServerNotification__HookEventName = Schema.Literals(["preToolUse", "permissionRequest", "postToolUse", "preCompact", "postCompact", "sessionStart", "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", "stop", "interrupt"]) export type ServerNotification__HookExecutionMode = "sync" | "async" export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]) -export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent" -export const ServerNotification__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]) +export type ServerNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent" +export const ServerNotification__HookHandlerType = Schema.Literals(["command", "mcpTool", "prompt", "agent"]) export type ServerNotification__HookOutputEntryKind = "warning" | "stop" | "feedback" | "context" | "error" export const ServerNotification__HookOutputEntryKind = Schema.Literals(["warning", "stop", "feedback", "context", "error"]) @@ -696,9 +762,15 @@ 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__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const ServerNotification__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type ServerNotification__LegacyAppPathString = string export const ServerNotification__LegacyAppPathString = Schema.String +export type ServerNotification__McpServerEventNotification = { readonly "method": string, readonly "params": Schema.Json } +export const ServerNotification__McpServerEventNotification = Schema.Struct({ "method": Schema.String, "params": Schema.Json }) + 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])) }) @@ -759,8 +831,8 @@ export const ServerNotification__Personality = Schema.Literals(["none", "friendl export type ServerNotification__PlanDeltaNotification = { readonly "delta": string, readonly "itemId": string, readonly "threadId": string, readonly "turnId": string } export const ServerNotification__PlanDeltaNotification = Schema.Struct({ "delta": Schema.String, "itemId": Schema.String, "threadId": Schema.String, "turnId": Schema.String }).annotate({ "description": "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content." }) -export type ServerNotification__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown" -export const ServerNotification__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_usage_based", "enterprise", "edu", "unknown"]) +export type ServerNotification__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown" +export const ServerNotification__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_prolite", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_automation", "enterprise_cbp_usage_based", "enterprise", "edu", "edu_plus", "edu_pro", "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`." }) @@ -768,6 +840,9 @@ export const ServerNotification__ProcessExitedNotification = Schema.Struct({ "ex 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__ProjectChangeType = "created" | "updated" | "deleted" +export const ServerNotification__ProjectChangeType = Schema.Literals(["created", "updated", "deleted"]) + 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"]) @@ -804,6 +879,9 @@ export const ServerNotification__SkillsChangedNotification = Schema.Struct({ }) 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__StrictReviewRequiredNotification = { readonly "startedAtMs": number, readonly "threadId": string, readonly "turnId": string } +export const ServerNotification__StrictReviewRequiredNotification = Schema.Struct({ "startedAtMs": Schema.Number.annotate({ "description": "Unix timestamp (in milliseconds) when this review started.", "format": "int64" }).check(Schema.isInt()), "threadId": Schema.String, "turnId": Schema.String }) + export type ServerNotification__SubAgentActivityKind = "started" | "interacted" | "interrupted" | "completed" export const ServerNotification__SubAgentActivityKind = Schema.Literals(["started", "interacted", "interrupted", "completed"]) @@ -843,9 +921,18 @@ export const ServerNotification__ThreadId = Schema.String export type ServerNotification__ThreadNameUpdatedNotification = { readonly "threadId": string, readonly "threadName"?: string | null } export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({ "threadId": Schema.String, "threadName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) +export type ServerNotification__ThreadProjectUpdatedNotification = { readonly "projectId": string | null, readonly "threadId": string } +export const ServerNotification__ThreadProjectUpdatedNotification = Schema.Struct({ "projectId": Schema.Union([Schema.String, Schema.Null]), "threadId": Schema.String }) + +export type ServerNotification__ThreadQueueChangedNotification = { readonly "threadId": string } +export const ServerNotification__ThreadQueueChangedNotification = Schema.Struct({ "threadId": Schema.String }) + export type ServerNotification__ThreadRealtimeAudioChunk = { readonly "data": string, readonly "itemId"?: string | null, readonly "numChannels": number, readonly "sampleRate": number, readonly "samplesPerChannel"?: number | null } export const ServerNotification__ThreadRealtimeAudioChunk = Schema.Struct({ "data": Schema.String, "itemId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "numChannels": Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "sampleRate": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "samplesPerChannel": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - thread realtime audio chunk." }) +export type ServerNotification__ThreadRealtimeBemItemPresentation = { readonly "type": "wholeItem" } | { readonly "type": "inlineMarkdown" } | { readonly "index": number, readonly "type": "inlineVisualization" } +export const ServerNotification__ThreadRealtimeBemItemPresentation = Schema.Union([Schema.Struct({ "type": Schema.Literal("wholeItem").annotate({ "title": "WholeItemThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "WholeItemThreadRealtimeBemItemPresentation" }), Schema.Struct({ "type": Schema.Literal("inlineMarkdown").annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentation" }), Schema.Struct({ "index": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "type": Schema.Literal("inlineVisualization").annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentation" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - how an existing agent item appears in a realtime conversation." }) + export type ServerNotification__ThreadRealtimeClosedNotification = { readonly "reason"?: string | null, readonly "threadId": string } export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({ "reason": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - emitted when thread realtime transport closes." }) @@ -855,15 +942,30 @@ export const ServerNotification__ThreadRealtimeErrorNotification = Schema.Struct export type ServerNotification__ThreadRealtimeItemAddedNotification = { readonly "item": Schema.Json, readonly "threadId": string } export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({ "item": Schema.Json, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend." }) +export type ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = { readonly "delta": string, readonly "itemId": string, readonly "threadId": string } +export const ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = Schema.Struct({ "delta": Schema.String, "itemId": Schema.String, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - text appended to an active realtime transcript item." }) + export type ServerNotification__ThreadRealtimeSdpNotification = { readonly "sdp": string, readonly "threadId": string } export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({ "sdp": Schema.String, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session." }) +export type ServerNotification__ThreadRealtimeSessionOutcome = "ended" | "failed" +export const ServerNotification__ThreadRealtimeSessionOutcome = Schema.Literals(["ended", "failed"]) + export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = { readonly "delta": string, readonly "role": string, readonly "threadId": string } export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({ "delta": Schema.String.annotate({ "description": "Live transcript delta from the realtime event." }), "role": 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__ThreadRealtimeTranscriptRole = "user" | "assistant" +export const ServerNotification__ThreadRealtimeTranscriptRole = Schema.Literals(["user", "assistant"]) + +export type ServerNotification__ThreadRevertedNotification = { readonly "threadId": string } +export const ServerNotification__ThreadRevertedNotification = Schema.Struct({ "threadId": Schema.String }) + +export type ServerNotification__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const ServerNotification__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type ServerNotification__ThreadSource = string export const ServerNotification__ThreadSource = Schema.String @@ -975,14 +1077,17 @@ export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.S export type V1InitializeParams__ClientInfo = { readonly "name": string, readonly "title"?: string | null, readonly "version": string } export const V1InitializeParams__ClientInfo = Schema.Struct({ "name": Schema.String, "title": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "version": Schema.String }) -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(Schema.Boolean.annotate({ "description": "Opt into receiving experimental API methods and fields.", "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({ "description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`)." }), 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 V1InitializeParams__InitializeCapabilities = { readonly "experimentalApi"?: boolean, readonly "extensions"?: { readonly [x: string]: Schema.Json } | null, readonly "mcpServerOpenaiFormElicitation"?: boolean, readonly "optOutNotificationMethods"?: ReadonlyArray | null, readonly "requestAttestation"?: boolean } +export const V1InitializeParams__InitializeCapabilities = Schema.Struct({ "experimentalApi": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Opt into receiving experimental API methods and fields.", "default": false })), "extensions": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json).annotate({ "description": "MCP extension settings declared by the app-server client." }), Schema.Null])), "mcpServerOpenaiFormElicitation": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`]." })), "optOutNotificationMethods": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`)." }), 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 V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = "life_sciences" +export const V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = Schema.Literal("life_sciences") export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = { readonly "balance"?: string | null, readonly "hasCredits": boolean, readonly "unlimited": boolean } export const V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = Schema.Struct({ "balance": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "hasCredits": Schema.Boolean, "unlimited": Schema.Boolean }) -export type V2AccountRateLimitsUpdatedNotification__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown" -export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_usage_based", "enterprise", "edu", "unknown"]) +export type V2AccountRateLimitsUpdatedNotification__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown" +export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_prolite", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_automation", "enterprise_cbp_usage_based", "enterprise", "edu", "edu_plus", "edu_pro", "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"]) @@ -993,11 +1098,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 const V2AccountUpdatedNotification__AuthMode = Schema.Literals(["apikey", "chatgpt", "chatgptAuthTokens", "headers", "agentIdentity", "personalAccessToken", "bedrockApiKey"]).annotate({ "description": "Authentication mode for OpenAI-backed providers." }) +export type V2AccountUpdatedNotification__AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens" | "headers" | "agentIdentity" | "personalAccessToken" | "bedrockApiKey" | "bedrockAccessKeys" +export const V2AccountUpdatedNotification__AuthMode = Schema.Literals(["apikey", "chatgpt", "chatgptAuthTokens", "headers", "agentIdentity", "personalAccessToken", "bedrockApiKey", "bedrockAccessKeys"]).annotate({ "description": "Authentication mode for OpenAI-backed providers." }) -export type V2AccountUpdatedNotification__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown" -export const V2AccountUpdatedNotification__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_usage_based", "enterprise", "edu", "unknown"]) +export type V2AccountUpdatedNotification__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown" +export const V2AccountUpdatedNotification__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_prolite", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_automation", "enterprise_cbp_usage_based", "enterprise", "edu", "edu_plus", "edu_pro", "unknown"]) export type V2AppListUpdatedNotification__AppBranding = { readonly "category"?: string | null, readonly "developer"?: string | null, readonly "isDiscoverableApp": boolean, readonly "privacyPolicy"?: string | null, readonly "termsOfService"?: string | null, readonly "website"?: string | null } export const V2AppListUpdatedNotification__AppBranding = Schema.Struct({ "category": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "developer": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "isDiscoverableApp": Schema.Boolean, "privacyPolicy": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "termsOfService": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "website": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - app metadata returned by app-list APIs." }) @@ -1023,6 +1128,12 @@ export const V2AppsListResponse__AppScreenshot = Schema.Struct({ "fileId": Schem export type V2AppsReadResponse__AppToolSummary = { readonly "description": string, readonly "disabledReason"?: string | null, readonly "isEnabled"?: boolean, readonly "isReadOnly"?: boolean, readonly "name": string, readonly "title"?: string | null } export const V2AppsReadResponse__AppToolSummary = Schema.Struct({ "description": Schema.String, "disabledReason": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "isEnabled": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })), "isReadOnly": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })), "name": Schema.String, "title": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - metadata returned by app/read." }) +export type V2BedrockDiscoverResponse__AwsCredentialType = "accessKeys" | "bedrockApiKey" +export const V2BedrockDiscoverResponse__AwsCredentialType = Schema.Literals(["accessKeys", "bedrockApiKey"]) + +export type V2BedrockDiscoverResponse__BedrockAwsProfile = { readonly "name": string, readonly "region"?: string | null } +export const V2BedrockDiscoverResponse__BedrockAwsProfile = Schema.Struct({ "name": Schema.String, "region": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) + export type V2CancelLoginAccountResponse__CancelLoginAccountStatus = "canceled" | "notFound" export const V2CancelLoginAccountResponse__CancelLoginAccountStatus = Schema.Literals(["canceled", "notFound"]) @@ -1044,6 +1155,9 @@ export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals(["replace export type V2ConfigReadResponse__AbsolutePathBuf = string export const V2ConfigReadResponse__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 V2ConfigReadResponse__AllowDenyRequirement = "allow" | "deny" +export const V2ConfigReadResponse__AllowDenyRequirement = Schema.Literals(["allow", "deny"]) + export type V2ConfigReadResponse__AnalyticsConfig = { readonly "enabled"?: boolean | null, readonly [x: string]: Schema.Json } export const V2ConfigReadResponse__AnalyticsConfig = Schema.StructWithRest(Schema.Struct({ "enabled": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }), [Schema.Record(Schema.String, Schema.Json)]) @@ -1092,24 +1206,33 @@ export const V2ConfigReadResponse__WebSearchLocation = Schema.Struct({ "city": S export type V2ConfigReadResponse__WebSearchMode = "disabled" | "cached" | "indexed" | "live" export const V2ConfigReadResponse__WebSearchMode = Schema.Literals(["disabled", "cached", "indexed", "live"]) +export type V2ConfigRequirementsReadResponse__AllowDenyRequirement = "allow" | "deny" +export const V2ConfigRequirementsReadResponse__AllowDenyRequirement = Schema.Literals(["allow", "deny"]) + export type V2ConfigRequirementsReadResponse__ApprovalsReviewer = "user" | "auto_review" | "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__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 V2ConfigRequirementsReadResponse__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 V2ConfigRequirementsReadResponse__BrowserUseRequirements = { readonly "disableAutoReview"?: boolean | null } -export const V2ConfigRequirementsReadResponse__BrowserUseRequirements = Schema.Struct({ "disableAutoReview": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }) +export type V2ConfigRequirementsReadResponse__AutoReviewRequirements = { readonly "ignoreRules"?: ReadonlyArray | null, readonly "requiredOnModels"?: ReadonlyArray | null } +export const V2ConfigRequirementsReadResponse__AutoReviewRequirements = Schema.Struct({ "ignoreRules": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "requiredOnModels": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])) }) -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__BrowserUseAccessApprovalLifetime = "turn" | "thread" +export const V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = Schema.Literals(["turn", "thread"]) -export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler = { readonly "additionalContextLimit"?: number | null, 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({ "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Approximate token threshold for spilling this hook's `additionalContext` to disk. `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is evaluated against the original context; a spilled preview also includes recovery metadata.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "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__CliAuthCredentialsStoreMode = "file" | "keyring" | "auto" | "ephemeral" +export const V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode = Schema.Literals(["file", "keyring", "auto", "ephemeral"]) + +export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler = { readonly "additionalContextLimit"?: number | null, readonly "async": boolean, readonly "command": string, readonly "commandWindows"?: string | null, readonly "statusMessage"?: string | null, readonly "timeoutSec"?: number | null, readonly "type": "command" } | { readonly "input": { readonly [x: string]: Schema.Json }, readonly "server": string, readonly "statusMessage"?: string | null, readonly "timeoutSec"?: number | null, readonly "tool": string, readonly "type": "mcp_tool" } | { readonly "type": "prompt" } | { readonly "type": "agent" } +export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union([Schema.Struct({ "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Approximate token threshold for spilling this hook's `additionalContext` to disk. `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is evaluated against the original context; a spilled preview also includes recovery metadata.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "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({ "input": Schema.Record(Schema.String, Schema.Json), "server": Schema.String, "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])), "tool": Schema.String, "type": Schema.Literal("mcp_tool").annotate({ "title": "McpToolConfiguredHookHandlerType" }) }).annotate({ "title": "McpToolConfiguredHookHandler" }), 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__FeedbackRequirements = { readonly "enabled"?: boolean | null } export const V2ConfigRequirementsReadResponse__FeedbackRequirements = Schema.Struct({ "enabled": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }) +export type V2ConfigRequirementsReadResponse__InAppBrowserRequirements = { readonly "allowExternalBrowserSettingsImport"?: boolean | null } +export const V2ConfigRequirementsReadResponse__InAppBrowserRequirements = Schema.Struct({ "allowExternalBrowserSettingsImport": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }) + export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny" export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals(["allow", "deny"]) @@ -1164,6 +1287,9 @@ export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Stru export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" | "MCP_SERVER_CONFIG" | "SUBAGENTS" | "HOOKS" | "COMMANDS" | "MEMORY" | "SESSIONS" export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = Schema.Literals(["AGENTS_MD", "CONFIG", "SKILLS", "PLUGINS", "MCP_SERVER_CONFIG", "SUBAGENTS", "HOOKS", "COMMANDS", "MEMORY", "SESSIONS"]) +export type V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource = "remoteMcpServersConfig" | "sessionToolUse" +export const V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource = Schema.Literals(["remoteMcpServersConfig", "sessionToolUse"]) + export type V2ExternalAgentConfigDetectResponse__HookMigration = { readonly "name": string } export const V2ExternalAgentConfigDetectResponse__HookMigration = Schema.Struct({ "name": Schema.String }) @@ -1233,8 +1359,8 @@ export const V2FsReadDirectoryResponse__FsReadDirectoryEntry = Schema.Struct({ " export type V2GetAccountRateLimitsResponse__CreditsSnapshot = { readonly "balance"?: string | null, readonly "hasCredits": boolean, readonly "unlimited": boolean } export const V2GetAccountRateLimitsResponse__CreditsSnapshot = Schema.Struct({ "balance": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "hasCredits": Schema.Boolean, "unlimited": Schema.Boolean }) -export type V2GetAccountRateLimitsResponse__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown" -export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_usage_based", "enterprise", "edu", "unknown"]) +export type V2GetAccountRateLimitsResponse__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown" +export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_prolite", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_automation", "enterprise_cbp_usage_based", "enterprise", "edu", "edu_plus", "edu_pro", "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"]) @@ -1251,8 +1377,8 @@ 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" | "ent26" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown" -export const V2GetAccountResponse__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_usage_based", "enterprise", "edu", "unknown"]) +export type V2GetAccountResponse__PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_prolite" | "self_serve_business_usage_based" | "business" | "ent26" | "enterprise_cbp_automation" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "edu_plus" | "edu_pro" | "unknown" +export const V2GetAccountResponse__PlanType = Schema.Literals(["free", "go", "plus", "pro", "prolite", "team", "self_serve_business_prolite", "self_serve_business_usage_based", "business", "ent26", "enterprise_cbp_automation", "enterprise_cbp_usage_based", "enterprise", "edu", "edu_plus", "edu_pro", "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()) }) @@ -1260,20 +1386,23 @@ export const V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = Sche 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 V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup = { readonly "cachedInputTokens"?: number | null, readonly "estimatedUsageCreditsMicros": number, readonly "inputTokens"?: number | null, readonly "model"?: string | null, readonly "netNewInputTokens"?: number | null, readonly "outputTokens"?: number | null, readonly "reasoningEffort"?: string | null, readonly "speed"?: string | null, readonly "totalTokens"?: number | null } +export const V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup = Schema.Struct({ "cachedInputTokens": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "estimatedUsageCreditsMicros": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "inputTokens": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "netNewInputTokens": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "outputTokens": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "speed": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "totalTokens": 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"]) +export type V2HookCompletedNotification__HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop" | "interrupt" +export const V2HookCompletedNotification__HookEventName = Schema.Literals(["preToolUse", "permissionRequest", "postToolUse", "preCompact", "postCompact", "sessionStart", "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", "stop", "interrupt"]) export type V2HookCompletedNotification__HookExecutionMode = "sync" | "async" export const V2HookCompletedNotification__HookExecutionMode = Schema.Literals(["sync", "async"]) -export type V2HookCompletedNotification__HookHandlerType = "command" | "prompt" | "agent" -export const V2HookCompletedNotification__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]) +export type V2HookCompletedNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent" +export const V2HookCompletedNotification__HookHandlerType = Schema.Literals(["command", "mcpTool", "prompt", "agent"]) export type V2HookCompletedNotification__HookOutputEntryKind = "warning" | "stop" | "feedback" | "context" | "error" export const V2HookCompletedNotification__HookOutputEntryKind = Schema.Literals(["warning", "stop", "feedback", "context", "error"]) @@ -1290,11 +1419,8 @@ export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({ "de 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__HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop" | "interrupt" +export const V2HooksListResponse__HookEventName = Schema.Literals(["preToolUse", "permissionRequest", "postToolUse", "preCompact", "postCompact", "sessionStart", "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", "stop", "interrupt"]) 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"]) @@ -1305,14 +1431,14 @@ export const V2HooksListResponse__HookTrustStatus = Schema.Literals(["managed", 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"]) +export type V2HookStartedNotification__HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop" | "interrupt" +export const V2HookStartedNotification__HookEventName = Schema.Literals(["preToolUse", "permissionRequest", "postToolUse", "preCompact", "postCompact", "sessionStart", "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", "stop", "interrupt"]) export type V2HookStartedNotification__HookExecutionMode = "sync" | "async" export const V2HookStartedNotification__HookExecutionMode = Schema.Literals(["sync", "async"]) -export type V2HookStartedNotification__HookHandlerType = "command" | "prompt" | "agent" -export const V2HookStartedNotification__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]) +export type V2HookStartedNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent" +export const V2HookStartedNotification__HookHandlerType = Schema.Literals(["command", "mcpTool", "prompt", "agent"]) export type V2HookStartedNotification__HookOutputEntryKind = "warning" | "stop" | "feedback" | "context" | "error" export const V2HookStartedNotification__HookOutputEntryKind = Schema.Literals(["warning", "stop", "feedback", "context", "error"]) @@ -1326,6 +1452,9 @@ export const V2HookStartedNotification__HookScope = Schema.Literals(["thread", " 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__AgentMessageDelivery = "async" +export const V2ItemCompletedNotification__AgentMessageDelivery = Schema.Literal("async") + export type V2ItemCompletedNotification__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2ItemCompletedNotification__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -1344,6 +1473,9 @@ export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({ " export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original" export const V2ItemCompletedNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ItemCompletedNotification__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ItemCompletedNotification__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ItemCompletedNotification__LegacyAppPathString = string export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String @@ -1443,6 +1575,9 @@ export const V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalPro 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__AgentMessageDelivery = "async" +export const V2ItemStartedNotification__AgentMessageDelivery = Schema.Literal("async") + export type V2ItemStartedNotification__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2ItemStartedNotification__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -1461,6 +1596,9 @@ export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({ "ho export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original" export const V2ItemStartedNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ItemStartedNotification__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ItemStartedNotification__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ItemStartedNotification__LegacyAppPathString = string export const V2ItemStartedNotification__LegacyAppPathString = Schema.String @@ -1503,8 +1641,11 @@ export const V2ItemStartedNotification__WebSearchAction = Schema.Union([Schema.S export type V2ListMcpServerStatusParams__McpServerStatusDetail = "full" | "toolsAndAuthOnly" export const V2ListMcpServerStatusParams__McpServerStatusDetail = Schema.Literals(["full", "toolsAndAuthOnly"]) -export type V2ListMcpServerStatusResponse__McpAuthStatus = "unsupported" | "notLoggedIn" | "bearerToken" | "oAuth" -export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals(["unsupported", "notLoggedIn", "bearerToken", "oAuth"]) +export type V2ListMcpServerStatusResponse__McpAuthStatus = "unknown" | "unsupported" | "notLoggedIn" | "bearerToken" | "oAuth" +export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals(["unknown", "unsupported", "notLoggedIn", "bearerToken", "oAuth"]) + +export type V2ListMcpServerStatusResponse__McpServerConnectionStatus = "notStarted" | "starting" | "connected" | "authenticationRequired" | "failed" | "cancelled" | "disabled" +export const V2ListMcpServerStatusResponse__McpServerConnectionStatus = Schema.Literals(["notStarted", "starting", "connected", "authenticationRequired", "failed", "cancelled", "disabled"]) 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.Json), 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." }) @@ -1536,6 +1677,12 @@ export const V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = Schema. export type V2McpResourceReadResponse__ResourceContent = { readonly "_meta"?: Schema.Json, readonly "mimeType"?: string | null, readonly "text": string, readonly "uri": string } | { readonly "_meta"?: Schema.Json, readonly "blob": string, readonly "mimeType"?: string | null, readonly "uri": string } export const V2McpResourceReadResponse__ResourceContent = Schema.Union([Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "mimeType": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "text": Schema.String, "uri": Schema.String.annotate({ "description": "The URI of this resource." }) }), Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "blob": Schema.String, "mimeType": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "uri": Schema.String.annotate({ "description": "The URI of this resource." }) })]).annotate({ "description": "Contents returned when reading a resource from an MCP server." }) +export type V2McpServerEventStreamNotification__McpServerEventNotification = { readonly "method": string, readonly "params": Schema.Json } +export const V2McpServerEventStreamNotification__McpServerEventNotification = Schema.Struct({ "method": Schema.String, "params": Schema.Json }) + +export type V2McpServerOauthLoginParams__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr" +export const V2McpServerOauthLoginParams__McpServerOauthClientRegistration = Schema.Literals(["auto", "cimd", "dcr"]) + export type V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = "reauthenticationRequired" export const V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = Schema.Literal("reauthenticationRequired") @@ -1551,8 +1698,11 @@ export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({ "messag 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, readonly "modelLink"?: string | null, readonly "upgradeCopy"?: string | null } -export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({ "migrationMarkdown": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "model": Schema.String, "modelLink": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "upgradeCopy": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) +export type V2ModelListResponse__ModelUpgradeInfo = { readonly "migrationMarkdown"?: string | null, readonly "model": string, readonly "modelLink"?: string | null, readonly "retirementAt"?: number | null, readonly "upgradeCopy"?: string | null } +export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({ "migrationMarkdown": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "model": Schema.String, "modelLink": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "retirementAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Informational Unix timestamp for this upgrade's scheduled retirement, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "upgradeCopy": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) + +export type V2ModelListResponse__MultiAgentVersion = "disabled" | "v1" | "v2" +export const V2ModelListResponse__MultiAgentVersion = Schema.Literals(["disabled", "v1", "v2"]).annotate({ "description": "Multi-agent runtime supported by a model." }) 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)) @@ -1563,6 +1713,9 @@ export const V2ModelReroutedNotification__ModelRerouteReason = Schema.Literal("h export type V2ModelVerificationNotification__ModelVerification = "trustedAccessForCyber" export const V2ModelVerificationNotification__ModelVerification = Schema.Literal("trustedAccessForCyber") +export type V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams = { readonly "threadId"?: string | null } +export const V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams = Schema.Struct({ "threadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "When present, read estimated usage for this thread instead of account-wide token activity." }), Schema.Null])) }) + export type V2NullableRemoteControlDisableParams__RemoteControlDisableParams = { readonly "ephemeral"?: boolean } export const V2NullableRemoteControlDisableParams__RemoteControlDisableParams = Schema.Struct({ "ephemeral": Schema.optionalKey(Schema.Boolean) }) @@ -1584,6 +1737,9 @@ export const V2PluginInstalledResponse__MarketplaceInterface = Schema.Struct({ " export type V2PluginInstalledResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE" export const V2PluginInstalledResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]) +export type V2PluginInstalledResponse__PluginDisabledReason = "disabled_by_admin" | "plan_not_eligible" | "required_app_unavailable" | "unknown" +export const V2PluginInstalledResponse__PluginDisabledReason = Schema.Literals(["disabled_by_admin", "plan_not_eligible", "required_app_unavailable", "unknown"]) + export type V2PluginInstalledResponse__PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT" export const V2PluginInstalledResponse__PluginInstallPolicy = Schema.Literals(["NOT_AVAILABLE", "AVAILABLE", "INSTALLED_BY_DEFAULT"]) @@ -1623,6 +1779,9 @@ export const V2PluginListResponse__MarketplaceInterface = Schema.Struct({ "displ export type V2PluginListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE" export const V2PluginListResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]) +export type V2PluginListResponse__PluginDisabledReason = "disabled_by_admin" | "plan_not_eligible" | "required_app_unavailable" | "unknown" +export const V2PluginListResponse__PluginDisabledReason = Schema.Literals(["disabled_by_admin", "plan_not_eligible", "required_app_unavailable", "unknown"]) + export type V2PluginListResponse__PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT" export const V2PluginListResponse__PluginInstallPolicy = Schema.Literals(["NOT_AVAILABLE", "AVAILABLE", "INSTALLED_BY_DEFAULT"]) @@ -1650,12 +1809,15 @@ export const V2PluginReadResponse__AppSummary = Schema.Struct({ "category": Sche 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__HookEventName = "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "sessionStart" | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" | "stop" | "interrupt" +export const V2PluginReadResponse__HookEventName = Schema.Literals(["preToolUse", "permissionRequest", "postToolUse", "preCompact", "postCompact", "sessionStart", "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", "stop", "interrupt"]) export type V2PluginReadResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE" export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]) +export type V2PluginReadResponse__PluginDisabledReason = "disabled_by_admin" | "plan_not_eligible" | "required_app_unavailable" | "unknown" +export const V2PluginReadResponse__PluginDisabledReason = Schema.Literals(["disabled_by_admin", "plan_not_eligible", "required_app_unavailable", "unknown"]) + export type V2PluginReadResponse__PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT" export const V2PluginReadResponse__PluginInstallPolicy = Schema.Literals(["NOT_AVAILABLE", "AVAILABLE", "INSTALLED_BY_DEFAULT"]) @@ -1674,6 +1836,36 @@ export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([" 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 V2PluginSearchParams__AbsolutePathBuf = string +export const V2PluginSearchParams__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 V2PluginSearchParams__PluginSearchScope = "global" | "workspace" | "personal" +export const V2PluginSearchParams__PluginSearchScope = Schema.Literals(["global", "workspace", "personal"]) + +export type V2PluginSearchResponse__AbsolutePathBuf = string +export const V2PluginSearchResponse__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 V2PluginSearchResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE" +export const V2PluginSearchResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]) + +export type V2PluginSearchResponse__PluginDisabledReason = "disabled_by_admin" | "plan_not_eligible" | "required_app_unavailable" | "unknown" +export const V2PluginSearchResponse__PluginDisabledReason = Schema.Literals(["disabled_by_admin", "plan_not_eligible", "required_app_unavailable", "unknown"]) + +export type V2PluginSearchResponse__PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT" +export const V2PluginSearchResponse__PluginInstallPolicy = Schema.Literals(["NOT_AVAILABLE", "AVAILABLE", "INSTALLED_BY_DEFAULT"]) + +export type V2PluginSearchResponse__PluginInstallPolicySource = "WORKSPACE_SETTING" | "IMPLICIT_CANONICAL_APP" +export const V2PluginSearchResponse__PluginInstallPolicySource = Schema.Literals(["WORKSPACE_SETTING", "IMPLICIT_CANONICAL_APP"]) + +export type V2PluginSearchResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE" +export const V2PluginSearchResponse__PluginShareDiscoverability = Schema.Literals(["LISTED", "UNLISTED", "PRIVATE"]) + +export type V2PluginSearchResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner" +export const V2PluginSearchResponse__PluginSharePrincipalRole = Schema.Literals(["reader", "editor", "owner"]) + +export type V2PluginSearchResponse__PluginSharePrincipalType = "user" | "group" | "workspace" +export const V2PluginSearchResponse__PluginSharePrincipalType = Schema.Literals(["user", "group", "workspace"]) + 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." }) @@ -1683,6 +1875,9 @@ export const V2PluginShareListResponse__AbsolutePathBuf = Schema.String.annotate export type V2PluginShareListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE" export const V2PluginShareListResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]) +export type V2PluginShareListResponse__PluginDisabledReason = "disabled_by_admin" | "plan_not_eligible" | "required_app_unavailable" | "unknown" +export const V2PluginShareListResponse__PluginDisabledReason = Schema.Literals(["disabled_by_admin", "plan_not_eligible", "required_app_unavailable", "unknown"]) + export type V2PluginShareListResponse__PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT" export const V2PluginShareListResponse__PluginInstallPolicy = Schema.Literals(["NOT_AVAILABLE", "AVAILABLE", "INSTALLED_BY_DEFAULT"]) @@ -1731,6 +1926,33 @@ export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Sche export type V2ProcessSpawnParams__ProcessTerminalSize = { readonly "cols": number, readonly "rows": number } export const V2ProcessSpawnParams__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 V2ProjectChangedNotification__ProjectChangeType = "created" | "updated" | "deleted" +export const V2ProjectChangedNotification__ProjectChangeType = Schema.Literals(["created", "updated", "deleted"]) + +export type V2ProjectCreateParams__AbsolutePathBuf = string +export const V2ProjectCreateParams__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 V2ProjectCreateResponse__AbsolutePathBuf = string +export const V2ProjectCreateResponse__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 V2ProjectImportParams__AbsolutePathBuf = string +export const V2ProjectImportParams__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 V2ProjectImportResponse__AbsolutePathBuf = string +export const V2ProjectImportResponse__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 V2ProjectListResponse__AbsolutePathBuf = string +export const V2ProjectListResponse__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 V2ProjectReadResponse__AbsolutePathBuf = string +export const V2ProjectReadResponse__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 V2ProjectUpdateParams__AbsolutePathBuf = string +export const V2ProjectUpdateParams__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 V2ProjectUpdateResponse__AbsolutePathBuf = string +export const V2ProjectUpdateResponse__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 V2RawResponseCompletedNotification__TokenUsageBreakdown = { readonly "cacheWriteInputTokens"?: number, readonly "cachedInputTokens": number, readonly "inputTokens": number, readonly "outputTokens": number, readonly "reasoningOutputTokens": number, readonly "totalTokens": number } 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()) }) @@ -1788,6 +2010,9 @@ export const V2ReviewStartParams__ReviewTarget = Schema.Union([Schema.Struct({ " 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__AgentMessageDelivery = "async" +export const V2ReviewStartResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ReviewStartResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2ReviewStartResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -1806,6 +2031,9 @@ export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({ "hookRu export type V2ReviewStartResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ReviewStartResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ReviewStartResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ReviewStartResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ReviewStartResponse__LegacyAppPathString = string export const V2ReviewStartResponse__LegacyAppPathString = Schema.String @@ -1857,6 +2085,12 @@ export const V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = Schem export type V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus = "sent" | "cooldown_active" export const V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus = Schema.Literals(["sent", "cooldown_active"]) +export type V2ServerDiagnosticsResponse__ServerDiagnosticsGauge = { readonly "name": string, readonly "value": number } +export const V2ServerDiagnosticsResponse__ServerDiagnosticsGauge = Schema.Struct({ "name": Schema.String, "value": Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ServerDiagnosticsResponse__ServerDiagnosticsProcess = { readonly "id": number, readonly "physicalFootprintBytes"?: number | null, readonly "residentMemoryBytes"?: number | null } +export const V2ServerDiagnosticsResponse__ServerDiagnosticsProcess = Schema.Struct({ "id": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "physicalFootprintBytes": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "residentMemoryBytes": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) + export type V2ServerRequestResolvedNotification__RequestId = string | number export const V2ServerRequestResolvedNotification__RequestId = Schema.Union([Schema.String, Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt())]) @@ -1878,8 +2112,8 @@ export const V2SkillsListResponse__SkillScope = Schema.Literals(["user", "repo", export type V2SkillsListResponse__SkillToolDependency = { readonly "command"?: string | null, readonly "description"?: string | null, readonly "transport"?: string | null, readonly "type": string, readonly "url"?: string | null, readonly "value": string } export const V2SkillsListResponse__SkillToolDependency = Schema.Struct({ "command": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "description": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "transport": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.String, "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "value": Schema.String }) -export type V2ThreadBackgroundTerminalsListResponse__AbsolutePathBuf = string -export const V2ThreadBackgroundTerminalsListResponse__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 V2ThreadBackgroundTerminalsListResponse__LegacyAppPathString = string +export const V2ThreadBackgroundTerminalsListResponse__LegacyAppPathString = Schema.String 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." }) @@ -1902,6 +2136,9 @@ export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({ "d 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__AgentMessageDelivery = "async" +export const V2ThreadForkResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadForkResponse__AgentPath = string export const V2ThreadForkResponse__AgentPath = Schema.String @@ -1929,6 +2166,9 @@ export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({ "hookRun export type V2ThreadForkResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadForkResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadForkResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadForkResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadForkResponse__LegacyAppPathString = string export const V2ThreadForkResponse__LegacyAppPathString = Schema.String @@ -1977,6 +2217,9 @@ export const V2ThreadForkResponse__ThreadExtra = Schema.Struct({ }).annotate({ export type V2ThreadForkResponse__ThreadId = string export const V2ThreadForkResponse__ThreadId = Schema.String +export type V2ThreadForkResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadForkResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadForkResponse__ThreadSource = string export const V2ThreadForkResponse__ThreadSource = Schema.String @@ -2004,6 +2247,9 @@ export const V2ThreadItemsListParams__SortDirection = Schema.Literals(["asc", "d export type V2ThreadItemsListResponse__AbsolutePathBuf = string export const V2ThreadItemsListResponse__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 V2ThreadItemsListResponse__AgentMessageDelivery = "async" +export const V2ThreadItemsListResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadItemsListResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2ThreadItemsListResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -2022,6 +2268,9 @@ export const V2ThreadItemsListResponse__HookPromptFragment = Schema.Struct({ "ho export type V2ThreadItemsListResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadItemsListResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadItemsListResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadItemsListResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadItemsListResponse__LegacyAppPathString = string export const V2ThreadItemsListResponse__LegacyAppPathString = Schema.String @@ -2067,8 +2316,8 @@ 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" | "recency_at" | "section_position" +export const V2ThreadListParams__ThreadSortKey = Schema.Literals(["created_at", "updated_at", "recency_at", "section_position"]) export type V2ThreadListParams__ThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown" export const V2ThreadListParams__ThreadSourceKind = Schema.Literals(["cli", "vscode", "exec", "appServer", "subAgent", "subAgentReview", "subAgentCompact", "subAgentThreadSpawn", "subAgentOther", "unknown"]) @@ -2076,6 +2325,9 @@ export const V2ThreadListParams__ThreadSourceKind = Schema.Literals(["cli", "vsc 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__AgentMessageDelivery = "async" +export const V2ThreadListResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadListResponse__AgentPath = string export const V2ThreadListResponse__AgentPath = Schema.String @@ -2100,6 +2352,9 @@ export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({ "hookRun export type V2ThreadListResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadListResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadListResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadListResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadListResponse__LegacyAppPathString = string export const V2ThreadListResponse__LegacyAppPathString = Schema.String @@ -2148,6 +2403,9 @@ export const V2ThreadListResponse__ThreadExtra = Schema.Struct({ }).annotate({ export type V2ThreadListResponse__ThreadId = string export const V2ThreadListResponse__ThreadId = Schema.String +export type V2ThreadListResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadListResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadListResponse__ThreadSource = string export const V2ThreadListResponse__ThreadSource = Schema.String @@ -2166,6 +2424,9 @@ 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__AgentMessageDelivery = "async" +export const V2ThreadMetadataUpdateResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadMetadataUpdateResponse__AgentPath = string export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String @@ -2190,6 +2451,9 @@ export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct( export type V2ThreadMetadataUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadMetadataUpdateResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadMetadataUpdateResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadMetadataUpdateResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String @@ -2238,6 +2502,9 @@ export const V2ThreadMetadataUpdateResponse__ThreadExtra = Schema.Struct({ }).a export type V2ThreadMetadataUpdateResponse__ThreadId = string export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String +export type V2ThreadMetadataUpdateResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadMetadataUpdateResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadMetadataUpdateResponse__ThreadSource = string export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String @@ -2247,9 +2514,114 @@ export const V2ThreadMetadataUpdateResponse__TurnStatus = Schema.Literals(["comp export type V2ThreadMetadataUpdateResponse__WebSearchAction = { readonly "queries"?: ReadonlyArray | null, readonly "query"?: string | null, readonly "type": "search" } | { readonly "type": "openPage", readonly "url"?: string | null } | { readonly "pattern"?: string | null, readonly "type": "findInPage", readonly "url"?: string | null } | { readonly "type": "other" } export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union([Schema.Struct({ "queries": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "query": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("search").annotate({ "title": "SearchWebSearchActionType" }) }).annotate({ "title": "SearchWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("openPage").annotate({ "title": "OpenPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "OpenPageWebSearchAction" }), Schema.Struct({ "pattern": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("findInPage").annotate({ "title": "FindInPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "FindInPageWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("other").annotate({ "title": "OtherWebSearchActionType" }) }).annotate({ "title": "OtherWebSearchAction" })], { mode: "oneOf" }) +export type V2ThreadQueueAddParams__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadQueueAddParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadQueueAddParams__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadQueueAddParams__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadQueueAddResponse__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadQueueAddResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadQueueAddResponse__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadQueueAddResponse__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadQueueListResponse__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadQueueListResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadQueueListResponse__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadQueueListResponse__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadQueueStartResponse__AbsolutePathBuf = string +export const V2ThreadQueueStartResponse__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 V2ThreadQueueStartResponse__AgentMessageDelivery = "async" +export const V2ThreadQueueStartResponse__AgentMessageDelivery = Schema.Literal("async") + +export type V2ThreadQueueStartResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" +export const V2ThreadQueueStartResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) + +export type V2ThreadQueueStartResponse__CommandExecutionStatus = "inProgress" | "completed" | "failed" | "declined" +export const V2ThreadQueueStartResponse__CommandExecutionStatus = Schema.Literals(["inProgress", "completed", "failed", "declined"]) + +export type V2ThreadQueueStartResponse__DynamicToolCallOutputContentItem = { readonly "text": string, readonly "type": "inputText" } | { readonly "imageUrl": string, readonly "type": "inputImage" } | { readonly "audioUrl": string, readonly "type": "inputAudio" } +export const V2ThreadQueueStartResponse__DynamicToolCallOutputContentItem = Schema.Union([Schema.Struct({ "text": Schema.String, "type": Schema.Literal("inputText").annotate({ "title": "InputTextDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputTextDynamicToolCallOutputContentItem" }), Schema.Struct({ "imageUrl": Schema.String, "type": Schema.Literal("inputImage").annotate({ "title": "InputImageDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputImageDynamicToolCallOutputContentItem" }), Schema.Struct({ "audioUrl": Schema.String, "type": Schema.Literal("inputAudio").annotate({ "title": "InputAudioDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputAudioDynamicToolCallOutputContentItem" })], { mode: "oneOf" }) + +export type V2ThreadQueueStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed" +export const V2ThreadQueueStartResponse__DynamicToolCallStatus = Schema.Literals(["inProgress", "completed", "failed"]) + +export type V2ThreadQueueStartResponse__HookPromptFragment = { readonly "hookRunId": string, readonly "text": string } +export const V2ThreadQueueStartResponse__HookPromptFragment = Schema.Struct({ "hookRunId": Schema.String, "text": Schema.String }) + +export type V2ThreadQueueStartResponse__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadQueueStartResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadQueueStartResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadQueueStartResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + +export type V2ThreadQueueStartResponse__LegacyAppPathString = string +export const V2ThreadQueueStartResponse__LegacyAppPathString = Schema.String + +export type V2ThreadQueueStartResponse__McpToolCallAppContext = { readonly "actionName"?: string | null, readonly "appName"?: string | null, readonly "connectorId": string, readonly "linkId"?: string | null, readonly "resourceUri"?: string | null } +export const V2ThreadQueueStartResponse__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 V2ThreadQueueStartResponse__McpToolCallError = { readonly "message": string } +export const V2ThreadQueueStartResponse__McpToolCallError = Schema.Struct({ "message": Schema.String }) + +export type V2ThreadQueueStartResponse__McpToolCallResult = { readonly "_meta"?: Schema.Json, readonly "content": ReadonlyArray, readonly "structuredContent"?: Schema.Json } +export const V2ThreadQueueStartResponse__McpToolCallResult = Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "content": Schema.Array(Schema.Json), "structuredContent": Schema.optionalKey(Schema.Json) }) + +export type V2ThreadQueueStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed" +export const V2ThreadQueueStartResponse__McpToolCallStatus = Schema.Literals(["inProgress", "completed", "failed"]) + +export type V2ThreadQueueStartResponse__MemoryCitationEntry = { readonly "lineEnd": number, readonly "lineStart": number, readonly "note": string, readonly "path": string } +export const V2ThreadQueueStartResponse__MemoryCitationEntry = Schema.Struct({ "lineEnd": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "lineStart": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "note": Schema.String, "path": Schema.String }) + +export type V2ThreadQueueStartResponse__MessagePhase = "commentary" | "final_answer" +export const V2ThreadQueueStartResponse__MessagePhase = Schema.Literals(["commentary", "final_answer"]).annotate({ "description": "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 V2ThreadQueueStartResponse__NonSteerableTurnKind = "review" | "compact" +export const V2ThreadQueueStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]) + +export type V2ThreadQueueStartResponse__PatchApplyStatus = "inProgress" | "completed" | "failed" | "declined" +export const V2ThreadQueueStartResponse__PatchApplyStatus = Schema.Literals(["inProgress", "completed", "failed", "declined"]) + +export type V2ThreadQueueStartResponse__PatchChangeKind = { readonly "type": "add" } | { readonly "type": "delete" } | { readonly "move_path"?: string | null, readonly "type": "update" } +export const V2ThreadQueueStartResponse__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" }) + +export type V2ThreadQueueStartResponse__ReasoningEffort = string +export const V2ThreadQueueStartResponse__ReasoningEffort = Schema.String.annotate({ "description": "A non-empty reasoning effort value advertised by the model." }).check(Schema.isMinLength(1)) + +export type V2ThreadQueueStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted" | "completed" +export const V2ThreadQueueStartResponse__SubAgentActivityKind = Schema.Literals(["started", "interacted", "interrupted", "completed"]) + +export type V2ThreadQueueStartResponse__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadQueueStartResponse__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadQueueStartResponse__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress" +export const V2ThreadQueueStartResponse__TurnStatus = Schema.Literals(["completed", "interrupted", "failed", "inProgress"]) + +export type V2ThreadQueueStartResponse__WebSearchAction = { readonly "queries"?: ReadonlyArray | null, readonly "query"?: string | null, readonly "type": "search" } | { readonly "type": "openPage", readonly "url"?: string | null } | { readonly "pattern"?: string | null, readonly "type": "findInPage", readonly "url"?: string | null } | { readonly "type": "other" } +export const V2ThreadQueueStartResponse__WebSearchAction = Schema.Union([Schema.Struct({ "queries": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "query": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("search").annotate({ "title": "SearchWebSearchActionType" }) }).annotate({ "title": "SearchWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("openPage").annotate({ "title": "OpenPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "OpenPageWebSearchAction" }), Schema.Struct({ "pattern": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("findInPage").annotate({ "title": "FindInPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "FindInPageWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("other").annotate({ "title": "OtherWebSearchActionType" }) }).annotate({ "title": "OtherWebSearchAction" })], { mode: "oneOf" }) + +export type V2ThreadQueueUpdateParams__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadQueueUpdateParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadQueueUpdateParams__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadQueueUpdateParams__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadQueueUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadQueueUpdateResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadQueueUpdateResponse__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadQueueUpdateResponse__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + 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__AgentMessageDelivery = "async" +export const V2ThreadReadResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadReadResponse__AgentPath = string export const V2ThreadReadResponse__AgentPath = Schema.String @@ -2274,6 +2646,9 @@ export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({ "hookRun export type V2ThreadReadResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadReadResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadReadResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadReadResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadReadResponse__LegacyAppPathString = string export const V2ThreadReadResponse__LegacyAppPathString = Schema.String @@ -2322,6 +2697,9 @@ export const V2ThreadReadResponse__ThreadExtra = Schema.Struct({ }).annotate({ export type V2ThreadReadResponse__ThreadId = string export const V2ThreadReadResponse__ThreadId = Schema.String +export type V2ThreadReadResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadReadResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadReadResponse__ThreadSource = string export const V2ThreadReadResponse__ThreadSource = Schema.String @@ -2334,6 +2712,24 @@ export const V2ThreadReadResponse__WebSearchAction = Schema.Union([Schema.Struct export type V2ThreadRealtimeAppendAudioParams__ThreadRealtimeAudioChunk = { readonly "data": string, readonly "itemId"?: string | null, readonly "numChannels": number, readonly "sampleRate": number, readonly "samplesPerChannel"?: number | null } export const V2ThreadRealtimeAppendAudioParams__ThreadRealtimeAudioChunk = Schema.Struct({ "data": Schema.String, "itemId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "numChannels": Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "sampleRate": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "samplesPerChannel": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - thread realtime audio chunk." }) +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation = { readonly "type": "wholeItem" } | { readonly "type": "inlineMarkdown" } | { readonly "index": number, readonly "type": "inlineVisualization" } +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation = Schema.Union([Schema.Struct({ "type": Schema.Literal("wholeItem").annotate({ "title": "WholeItemThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "WholeItemThreadRealtimeBemItemPresentation" }), Schema.Struct({ "type": Schema.Literal("inlineMarkdown").annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentation" }), Schema.Struct({ "index": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "type": Schema.Literal("inlineVisualization").annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentation" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - how an existing agent item appears in a realtime conversation." }) + +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome = "ended" | "failed" +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome = Schema.Literals(["ended", "failed"]) + +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole = "user" | "assistant" +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole = Schema.Literals(["user", "assistant"]) + +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation = { readonly "type": "wholeItem" } | { readonly "type": "inlineMarkdown" } | { readonly "index": number, readonly "type": "inlineVisualization" } +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation = Schema.Union([Schema.Struct({ "type": Schema.Literal("wholeItem").annotate({ "title": "WholeItemThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "WholeItemThreadRealtimeBemItemPresentation" }), Schema.Struct({ "type": Schema.Literal("inlineMarkdown").annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentation" }), Schema.Struct({ "index": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "type": Schema.Literal("inlineVisualization").annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentation" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - how an existing agent item appears in a realtime conversation." }) + +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome = "ended" | "failed" +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome = Schema.Literals(["ended", "failed"]) + +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole = "user" | "assistant" +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole = Schema.Literals(["user", "assistant"]) + export type V2ThreadRealtimeListVoicesResponse__RealtimeVoice = "alloy" | "arbor" | "ash" | "ballad" | "breeze" | "cedar" | "coral" | "cove" | "echo" | "ember" | "juniper" | "maple" | "marin" | "sage" | "shimmer" | "sol" | "spruce" | "vale" | "verse" export const V2ThreadRealtimeListVoicesResponse__RealtimeVoice = Schema.Literals(["alloy", "arbor", "ash", "ballad", "breeze", "cedar", "coral", "cove", "echo", "ember", "juniper", "maple", "marin", "sage", "shimmer", "sol", "spruce", "vale", "verse"]) @@ -2355,8 +2751,8 @@ export const V2ThreadRealtimeStartParams__RealtimeConversationVersion = Schema.L export type V2ThreadRealtimeStartParams__RealtimeVoice = "alloy" | "arbor" | "ash" | "ballad" | "breeze" | "cedar" | "coral" | "cove" | "echo" | "ember" | "juniper" | "maple" | "marin" | "sage" | "shimmer" | "sol" | "spruce" | "vale" | "verse" export const V2ThreadRealtimeStartParams__RealtimeVoice = Schema.Literals(["alloy", "arbor", "ash", "ballad", "breeze", "cedar", "coral", "cove", "echo", "ember", "juniper", "maple", "marin", "sage", "shimmer", "sol", "spruce", "vale", "verse"]) -export type V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport = { readonly "type": "websocket" } | { readonly "sdp": string, readonly "type": "webrtc" } -export const V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport = Schema.Union([Schema.Struct({ "type": Schema.Literal("websocket").annotate({ "title": "WebsocketThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebsocketThreadRealtimeStartTransport" }), Schema.Struct({ "sdp": Schema.String.annotate({ "description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel." }), "type": Schema.Literal("webrtc").annotate({ "title": "WebrtcThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebrtcThreadRealtimeStartTransport" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - transport used by thread realtime." }) +export type V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport = { readonly "type": "websocket" } | { readonly "sdp": string, readonly "type": "webrtc" } | { readonly "callId": string, readonly "type": "existingCall" } +export const V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport = Schema.Union([Schema.Struct({ "type": Schema.Literal("websocket").annotate({ "title": "WebsocketThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebsocketThreadRealtimeStartTransport" }), Schema.Struct({ "sdp": Schema.String.annotate({ "description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel." }), "type": Schema.Literal("webrtc").annotate({ "title": "WebrtcThreadRealtimeStartTransportType" }) }).annotate({ "title": "WebrtcThreadRealtimeStartTransport" }), Schema.Struct({ "callId": Schema.String.annotate({ "description": "Identifier of a realtime call already created and negotiated by the client." }), "type": Schema.Literal("existingCall").annotate({ "title": "ExistingCallThreadRealtimeStartTransportType" }) }).annotate({ "title": "ExistingCallThreadRealtimeStartTransport" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - transport used by thread realtime." }) 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." }) @@ -2412,6 +2808,9 @@ export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({ 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__AgentMessageDelivery = "async" +export const V2ThreadResumeResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadResumeResponse__AgentPath = string export const V2ThreadResumeResponse__AgentPath = Schema.String @@ -2439,6 +2838,9 @@ export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({ "hookR export type V2ThreadResumeResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadResumeResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadResumeResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadResumeResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadResumeResponse__LegacyAppPathString = string export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String @@ -2487,6 +2889,9 @@ export const V2ThreadResumeResponse__ThreadExtra = Schema.Struct({ }).annotate( export type V2ThreadResumeResponse__ThreadId = string export const V2ThreadResumeResponse__ThreadId = Schema.String +export type V2ThreadResumeResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadResumeResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadResumeResponse__ThreadSource = string export const V2ThreadResumeResponse__ThreadSource = Schema.String @@ -2496,9 +2901,105 @@ export const V2ThreadResumeResponse__TurnStatus = Schema.Literals(["completed", export type V2ThreadResumeResponse__WebSearchAction = { readonly "queries"?: ReadonlyArray | null, readonly "query"?: string | null, readonly "type": "search" } | { readonly "type": "openPage", readonly "url"?: string | null } | { readonly "pattern"?: string | null, readonly "type": "findInPage", readonly "url"?: string | null } | { readonly "type": "other" } export const V2ThreadResumeResponse__WebSearchAction = Schema.Union([Schema.Struct({ "queries": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "query": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("search").annotate({ "title": "SearchWebSearchActionType" }) }).annotate({ "title": "SearchWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("openPage").annotate({ "title": "OpenPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "OpenPageWebSearchAction" }), Schema.Struct({ "pattern": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("findInPage").annotate({ "title": "FindInPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "FindInPageWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("other").annotate({ "title": "OtherWebSearchActionType" }) }).annotate({ "title": "OtherWebSearchAction" })], { mode: "oneOf" }) +export type V2ThreadRevertResponse__AbsolutePathBuf = string +export const V2ThreadRevertResponse__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 V2ThreadRevertResponse__AgentMessageDelivery = "async" +export const V2ThreadRevertResponse__AgentMessageDelivery = Schema.Literal("async") + +export type V2ThreadRevertResponse__AgentPath = string +export const V2ThreadRevertResponse__AgentPath = Schema.String + +export type V2ThreadRevertResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" +export const V2ThreadRevertResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) + +export type V2ThreadRevertResponse__CommandExecutionStatus = "inProgress" | "completed" | "failed" | "declined" +export const V2ThreadRevertResponse__CommandExecutionStatus = Schema.Literals(["inProgress", "completed", "failed", "declined"]) + +export type V2ThreadRevertResponse__DynamicToolCallOutputContentItem = { readonly "text": string, readonly "type": "inputText" } | { readonly "imageUrl": string, readonly "type": "inputImage" } | { readonly "audioUrl": string, readonly "type": "inputAudio" } +export const V2ThreadRevertResponse__DynamicToolCallOutputContentItem = Schema.Union([Schema.Struct({ "text": Schema.String, "type": Schema.Literal("inputText").annotate({ "title": "InputTextDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputTextDynamicToolCallOutputContentItem" }), Schema.Struct({ "imageUrl": Schema.String, "type": Schema.Literal("inputImage").annotate({ "title": "InputImageDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputImageDynamicToolCallOutputContentItem" }), Schema.Struct({ "audioUrl": Schema.String, "type": Schema.Literal("inputAudio").annotate({ "title": "InputAudioDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputAudioDynamicToolCallOutputContentItem" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed" +export const V2ThreadRevertResponse__DynamicToolCallStatus = Schema.Literals(["inProgress", "completed", "failed"]) + +export type V2ThreadRevertResponse__GitInfo = { readonly "branch"?: string | null, readonly "originUrl"?: string | null, readonly "sha"?: string | null } +export const V2ThreadRevertResponse__GitInfo = Schema.Struct({ "branch": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "originUrl": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "sha": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) + +export type V2ThreadRevertResponse__HookPromptFragment = { readonly "hookRunId": string, readonly "text": string } +export const V2ThreadRevertResponse__HookPromptFragment = Schema.Struct({ "hookRunId": Schema.String, "text": Schema.String }) + +export type V2ThreadRevertResponse__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadRevertResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadRevertResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadRevertResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__LegacyAppPathString = string +export const V2ThreadRevertResponse__LegacyAppPathString = Schema.String + +export type V2ThreadRevertResponse__McpToolCallAppContext = { readonly "actionName"?: string | null, readonly "appName"?: string | null, readonly "connectorId": string, readonly "linkId"?: string | null, readonly "resourceUri"?: string | null } +export const V2ThreadRevertResponse__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 V2ThreadRevertResponse__McpToolCallError = { readonly "message": string } +export const V2ThreadRevertResponse__McpToolCallError = Schema.Struct({ "message": Schema.String }) + +export type V2ThreadRevertResponse__McpToolCallResult = { readonly "_meta"?: Schema.Json, readonly "content": ReadonlyArray, readonly "structuredContent"?: Schema.Json } +export const V2ThreadRevertResponse__McpToolCallResult = Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "content": Schema.Array(Schema.Json), "structuredContent": Schema.optionalKey(Schema.Json) }) + +export type V2ThreadRevertResponse__McpToolCallStatus = "inProgress" | "completed" | "failed" +export const V2ThreadRevertResponse__McpToolCallStatus = Schema.Literals(["inProgress", "completed", "failed"]) + +export type V2ThreadRevertResponse__MemoryCitationEntry = { readonly "lineEnd": number, readonly "lineStart": number, readonly "note": string, readonly "path": string } +export const V2ThreadRevertResponse__MemoryCitationEntry = Schema.Struct({ "lineEnd": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "lineStart": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "note": Schema.String, "path": Schema.String }) + +export type V2ThreadRevertResponse__MessagePhase = "commentary" | "final_answer" +export const V2ThreadRevertResponse__MessagePhase = Schema.Literals(["commentary", "final_answer"]).annotate({ "description": "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 V2ThreadRevertResponse__NonSteerableTurnKind = "review" | "compact" +export const V2ThreadRevertResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]) + +export type V2ThreadRevertResponse__PatchApplyStatus = "inProgress" | "completed" | "failed" | "declined" +export const V2ThreadRevertResponse__PatchApplyStatus = Schema.Literals(["inProgress", "completed", "failed", "declined"]) + +export type V2ThreadRevertResponse__PatchChangeKind = { readonly "type": "add" } | { readonly "type": "delete" } | { readonly "move_path"?: string | null, readonly "type": "update" } +export const V2ThreadRevertResponse__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" }) + +export type V2ThreadRevertResponse__ReasoningEffort = string +export const V2ThreadRevertResponse__ReasoningEffort = Schema.String.annotate({ "description": "A non-empty reasoning effort value advertised by the model." }).check(Schema.isMinLength(1)) + +export type V2ThreadRevertResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted" | "completed" +export const V2ThreadRevertResponse__SubAgentActivityKind = Schema.Literals(["started", "interacted", "interrupted", "completed"]) + +export type V2ThreadRevertResponse__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadRevertResponse__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadRevertResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput" +export const V2ThreadRevertResponse__ThreadActiveFlag = Schema.Literals(["waitingOnApproval", "waitingOnUserInput"]) + +export type V2ThreadRevertResponse__ThreadExtra = { } +export const V2ThreadRevertResponse__ThreadExtra = Schema.Struct({ }).annotate({ "description": "Extra app-server data for a thread." }) + +export type V2ThreadRevertResponse__ThreadId = string +export const V2ThreadRevertResponse__ThreadId = Schema.String + +export type V2ThreadRevertResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadRevertResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + +export type V2ThreadRevertResponse__ThreadSource = string +export const V2ThreadRevertResponse__ThreadSource = Schema.String + +export type V2ThreadRevertResponse__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress" +export const V2ThreadRevertResponse__TurnStatus = Schema.Literals(["completed", "interrupted", "failed", "inProgress"]) + +export type V2ThreadRevertResponse__WebSearchAction = { readonly "queries"?: ReadonlyArray | null, readonly "query"?: string | null, readonly "type": "search" } | { readonly "type": "openPage", readonly "url"?: string | null } | { readonly "pattern"?: string | null, readonly "type": "findInPage", readonly "url"?: string | null } | { readonly "type": "other" } +export const V2ThreadRevertResponse__WebSearchAction = Schema.Union([Schema.Struct({ "queries": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "query": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("search").annotate({ "title": "SearchWebSearchActionType" }) }).annotate({ "title": "SearchWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("openPage").annotate({ "title": "OpenPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "OpenPageWebSearchAction" }), Schema.Struct({ "pattern": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("findInPage").annotate({ "title": "FindInPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "FindInPageWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("other").annotate({ "title": "OtherWebSearchActionType" }) }).annotate({ "title": "OtherWebSearchAction" })], { 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__AgentMessageDelivery = "async" +export const V2ThreadRollbackResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadRollbackResponse__AgentPath = string export const V2ThreadRollbackResponse__AgentPath = Schema.String @@ -2523,6 +3024,9 @@ export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({ "hoo export type V2ThreadRollbackResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadRollbackResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadRollbackResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadRollbackResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadRollbackResponse__LegacyAppPathString = string export const V2ThreadRollbackResponse__LegacyAppPathString = Schema.String @@ -2571,6 +3075,9 @@ export const V2ThreadRollbackResponse__ThreadExtra = Schema.Struct({ }).annotat export type V2ThreadRollbackResponse__ThreadId = string export const V2ThreadRollbackResponse__ThreadId = Schema.String +export type V2ThreadRollbackResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadRollbackResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadRollbackResponse__ThreadSource = string export const V2ThreadRollbackResponse__ThreadSource = Schema.String @@ -2586,8 +3093,8 @@ export const V2ThreadSearchOccurrencesResponse__ThreadSearchOccurrence = Schema. export type V2ThreadSearchParams__SortDirection = "asc" | "desc" export const V2ThreadSearchParams__SortDirection = Schema.Literals(["asc", "desc"]) -export type V2ThreadSearchParams__ThreadSortKey = "created_at" | "updated_at" | "recency_at" -export const V2ThreadSearchParams__ThreadSortKey = Schema.Literals(["created_at", "updated_at", "recency_at"]) +export type V2ThreadSearchParams__ThreadSearchSortKey = "created_at" | "updated_at" | "recency_at" +export const V2ThreadSearchParams__ThreadSearchSortKey = Schema.Literals(["created_at", "updated_at", "recency_at"]) export type V2ThreadSearchParams__ThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown" export const V2ThreadSearchParams__ThreadSourceKind = Schema.Literals(["cli", "vscode", "exec", "appServer", "subAgent", "subAgentReview", "subAgentCompact", "subAgentThreadSpawn", "subAgentOther", "unknown"]) @@ -2595,6 +3102,9 @@ export const V2ThreadSearchParams__ThreadSourceKind = Schema.Literals(["cli", "v export type V2ThreadSearchResponse__AbsolutePathBuf = string export const V2ThreadSearchResponse__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 V2ThreadSearchResponse__AgentMessageDelivery = "async" +export const V2ThreadSearchResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadSearchResponse__AgentPath = string export const V2ThreadSearchResponse__AgentPath = Schema.String @@ -2619,6 +3129,9 @@ export const V2ThreadSearchResponse__HookPromptFragment = Schema.Struct({ "hookR export type V2ThreadSearchResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadSearchResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadSearchResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadSearchResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadSearchResponse__LegacyAppPathString = string export const V2ThreadSearchResponse__LegacyAppPathString = Schema.String @@ -2667,6 +3180,9 @@ export const V2ThreadSearchResponse__ThreadExtra = Schema.Struct({ }).annotate( export type V2ThreadSearchResponse__ThreadId = string export const V2ThreadSearchResponse__ThreadId = Schema.String +export type V2ThreadSearchResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadSearchResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadSearchResponse__ThreadSource = string export const V2ThreadSearchResponse__ThreadSource = Schema.String @@ -2676,6 +3192,21 @@ export const V2ThreadSearchResponse__TurnStatus = Schema.Literals(["completed", export type V2ThreadSearchResponse__WebSearchAction = { readonly "queries"?: ReadonlyArray | null, readonly "query"?: string | null, readonly "type": "search" } | { readonly "type": "openPage", readonly "url"?: string | null } | { readonly "pattern"?: string | null, readonly "type": "findInPage", readonly "url"?: string | null } | { readonly "type": "other" } export const V2ThreadSearchResponse__WebSearchAction = Schema.Union([Schema.Struct({ "queries": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "query": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("search").annotate({ "title": "SearchWebSearchActionType" }) }).annotate({ "title": "SearchWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("openPage").annotate({ "title": "OpenPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "OpenPageWebSearchAction" }), Schema.Struct({ "pattern": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("findInPage").annotate({ "title": "FindInPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "FindInPageWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("other").annotate({ "title": "OtherWebSearchActionType" }) }).annotate({ "title": "OtherWebSearchAction" })], { mode: "oneOf" }) +export type V2ThreadSectionCreateParams__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadSectionCreateParams__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + +export type V2ThreadSectionCreateResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadSectionCreateResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + +export type V2ThreadSectionListResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadSectionListResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + +export type V2ThreadSectionUpdateParams__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadSectionUpdateParams__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + +export type V2ThreadSectionUpdateResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadSectionUpdateResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + 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." }) @@ -2727,6 +3258,9 @@ export const V2ThreadSettingsUpdateParams__ReasoningSummary = Schema.Union([Sche 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__AgentMessageDelivery = "async" +export const V2ThreadStartedNotification__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadStartedNotification__AgentPath = string export const V2ThreadStartedNotification__AgentPath = Schema.String @@ -2751,6 +3285,9 @@ export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({ " export type V2ThreadStartedNotification__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadStartedNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadStartedNotification__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadStartedNotification__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadStartedNotification__LegacyAppPathString = string export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String @@ -2799,6 +3336,9 @@ export const V2ThreadStartedNotification__ThreadExtra = Schema.Struct({ }).anno export type V2ThreadStartedNotification__ThreadId = string export const V2ThreadStartedNotification__ThreadId = Schema.String +export type V2ThreadStartedNotification__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadStartedNotification__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadStartedNotification__ThreadSource = string export const V2ThreadStartedNotification__ThreadSource = Schema.String @@ -2850,6 +3390,9 @@ export const V2ThreadStartResponse__AbsolutePathBuf = Schema.String.annotate({ " 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__AgentMessageDelivery = "async" +export const V2ThreadStartResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadStartResponse__AgentPath = string export const V2ThreadStartResponse__AgentPath = Schema.String @@ -2877,6 +3420,9 @@ export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({ "hookRu export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadStartResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadStartResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadStartResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadStartResponse__LegacyAppPathString = string export const V2ThreadStartResponse__LegacyAppPathString = Schema.String @@ -2925,6 +3471,9 @@ export const V2ThreadStartResponse__ThreadExtra = Schema.Struct({ }).annotate({ export type V2ThreadStartResponse__ThreadId = string export const V2ThreadStartResponse__ThreadId = Schema.String +export type V2ThreadStartResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadStartResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadStartResponse__ThreadSource = string export const V2ThreadStartResponse__ThreadSource = Schema.String @@ -2937,6 +3486,87 @@ export const V2ThreadStartResponse__WebSearchAction = Schema.Union([Schema.Struc export type V2ThreadStatusChangedNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput" export const V2ThreadStatusChangedNotification__ThreadActiveFlag = Schema.Literals(["waitingOnApproval", "waitingOnUserInput"]) +export type V2ThreadTimelineListResponse__AbsolutePathBuf = string +export const V2ThreadTimelineListResponse__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 V2ThreadTimelineListResponse__AgentMessageDelivery = "async" +export const V2ThreadTimelineListResponse__AgentMessageDelivery = Schema.Literal("async") + +export type V2ThreadTimelineListResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" +export const V2ThreadTimelineListResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) + +export type V2ThreadTimelineListResponse__CommandExecutionStatus = "inProgress" | "completed" | "failed" | "declined" +export const V2ThreadTimelineListResponse__CommandExecutionStatus = Schema.Literals(["inProgress", "completed", "failed", "declined"]) + +export type V2ThreadTimelineListResponse__DynamicToolCallOutputContentItem = { readonly "text": string, readonly "type": "inputText" } | { readonly "imageUrl": string, readonly "type": "inputImage" } | { readonly "audioUrl": string, readonly "type": "inputAudio" } +export const V2ThreadTimelineListResponse__DynamicToolCallOutputContentItem = Schema.Union([Schema.Struct({ "text": Schema.String, "type": Schema.Literal("inputText").annotate({ "title": "InputTextDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputTextDynamicToolCallOutputContentItem" }), Schema.Struct({ "imageUrl": Schema.String, "type": Schema.Literal("inputImage").annotate({ "title": "InputImageDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputImageDynamicToolCallOutputContentItem" }), Schema.Struct({ "audioUrl": Schema.String, "type": Schema.Literal("inputAudio").annotate({ "title": "InputAudioDynamicToolCallOutputContentItemType" }) }).annotate({ "title": "InputAudioDynamicToolCallOutputContentItem" })], { mode: "oneOf" }) + +export type V2ThreadTimelineListResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed" +export const V2ThreadTimelineListResponse__DynamicToolCallStatus = Schema.Literals(["inProgress", "completed", "failed"]) + +export type V2ThreadTimelineListResponse__HookPromptFragment = { readonly "hookRunId": string, readonly "text": string } +export const V2ThreadTimelineListResponse__HookPromptFragment = Schema.Struct({ "hookRunId": Schema.String, "text": Schema.String }) + +export type V2ThreadTimelineListResponse__ImageDetail = "auto" | "low" | "high" | "original" +export const V2ThreadTimelineListResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) + +export type V2ThreadTimelineListResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadTimelineListResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + +export type V2ThreadTimelineListResponse__LegacyAppPathString = string +export const V2ThreadTimelineListResponse__LegacyAppPathString = Schema.String + +export type V2ThreadTimelineListResponse__McpToolCallAppContext = { readonly "actionName"?: string | null, readonly "appName"?: string | null, readonly "connectorId": string, readonly "linkId"?: string | null, readonly "resourceUri"?: string | null } +export const V2ThreadTimelineListResponse__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 V2ThreadTimelineListResponse__McpToolCallError = { readonly "message": string } +export const V2ThreadTimelineListResponse__McpToolCallError = Schema.Struct({ "message": Schema.String }) + +export type V2ThreadTimelineListResponse__McpToolCallResult = { readonly "_meta"?: Schema.Json, readonly "content": ReadonlyArray, readonly "structuredContent"?: Schema.Json } +export const V2ThreadTimelineListResponse__McpToolCallResult = Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "content": Schema.Array(Schema.Json), "structuredContent": Schema.optionalKey(Schema.Json) }) + +export type V2ThreadTimelineListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed" +export const V2ThreadTimelineListResponse__McpToolCallStatus = Schema.Literals(["inProgress", "completed", "failed"]) + +export type V2ThreadTimelineListResponse__MemoryCitationEntry = { readonly "lineEnd": number, readonly "lineStart": number, readonly "note": string, readonly "path": string } +export const V2ThreadTimelineListResponse__MemoryCitationEntry = Schema.Struct({ "lineEnd": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "lineStart": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "note": Schema.String, "path": Schema.String }) + +export type V2ThreadTimelineListResponse__MessagePhase = "commentary" | "final_answer" +export const V2ThreadTimelineListResponse__MessagePhase = Schema.Literals(["commentary", "final_answer"]).annotate({ "description": "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 V2ThreadTimelineListResponse__NonSteerableTurnKind = "review" | "compact" +export const V2ThreadTimelineListResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]) + +export type V2ThreadTimelineListResponse__PatchApplyStatus = "inProgress" | "completed" | "failed" | "declined" +export const V2ThreadTimelineListResponse__PatchApplyStatus = Schema.Literals(["inProgress", "completed", "failed", "declined"]) + +export type V2ThreadTimelineListResponse__PatchChangeKind = { readonly "type": "add" } | { readonly "type": "delete" } | { readonly "move_path"?: string | null, readonly "type": "update" } +export const V2ThreadTimelineListResponse__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" }) + +export type V2ThreadTimelineListResponse__ReasoningEffort = string +export const V2ThreadTimelineListResponse__ReasoningEffort = Schema.String.annotate({ "description": "A non-empty reasoning effort value advertised by the model." }).check(Schema.isMinLength(1)) + +export type V2ThreadTimelineListResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted" | "completed" +export const V2ThreadTimelineListResponse__SubAgentActivityKind = Schema.Literals(["started", "interacted", "interrupted", "completed"]) + +export type V2ThreadTimelineListResponse__TextElement = { readonly "byteRange": { readonly "end": number, readonly "start": number }, readonly "placeholder"?: string | null } +export const V2ThreadTimelineListResponse__TextElement = Schema.Struct({ "byteRange": Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Byte range in the parent `text` buffer that this element occupies." }), "placeholder": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional human-readable placeholder for the element, displayed in the UI." }), Schema.Null])) }) + +export type V2ThreadTimelineListResponse__ThreadRealtimeBemItemPresentation = { readonly "type": "wholeItem" } | { readonly "type": "inlineMarkdown" } | { readonly "index": number, readonly "type": "inlineVisualization" } +export const V2ThreadTimelineListResponse__ThreadRealtimeBemItemPresentation = Schema.Union([Schema.Struct({ "type": Schema.Literal("wholeItem").annotate({ "title": "WholeItemThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "WholeItemThreadRealtimeBemItemPresentation" }), Schema.Struct({ "type": Schema.Literal("inlineMarkdown").annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineMarkdownThreadRealtimeBemItemPresentation" }), Schema.Struct({ "index": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "type": Schema.Literal("inlineVisualization").annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentationType" }) }).annotate({ "title": "InlineVisualizationThreadRealtimeBemItemPresentation" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - how an existing agent item appears in a realtime conversation." }) + +export type V2ThreadTimelineListResponse__ThreadRealtimeSessionOutcome = "ended" | "failed" +export const V2ThreadTimelineListResponse__ThreadRealtimeSessionOutcome = Schema.Literals(["ended", "failed"]) + +export type V2ThreadTimelineListResponse__ThreadRealtimeTranscriptRole = "user" | "assistant" +export const V2ThreadTimelineListResponse__ThreadRealtimeTranscriptRole = Schema.Literals(["user", "assistant"]) + +export type V2ThreadTimelineListResponse__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress" +export const V2ThreadTimelineListResponse__TurnStatus = Schema.Literals(["completed", "interrupted", "failed", "inProgress"]) + +export type V2ThreadTimelineListResponse__WebSearchAction = { readonly "queries"?: ReadonlyArray | null, readonly "query"?: string | null, readonly "type": "search" } | { readonly "type": "openPage", readonly "url"?: string | null } | { readonly "pattern"?: string | null, readonly "type": "findInPage", readonly "url"?: string | null } | { readonly "type": "other" } +export const V2ThreadTimelineListResponse__WebSearchAction = Schema.Union([Schema.Struct({ "queries": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "query": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("search").annotate({ "title": "SearchWebSearchActionType" }) }).annotate({ "title": "SearchWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("openPage").annotate({ "title": "OpenPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "OpenPageWebSearchAction" }), Schema.Struct({ "pattern": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("findInPage").annotate({ "title": "FindInPageWebSearchActionType" }), "url": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "FindInPageWebSearchAction" }), Schema.Struct({ "type": Schema.Literal("other").annotate({ "title": "OtherWebSearchActionType" }) }).annotate({ "title": "OtherWebSearchAction" })], { mode: "oneOf" }) + export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = { readonly "cacheWriteInputTokens"?: number, readonly "cachedInputTokens": number, readonly "inputTokens": number, readonly "outputTokens": number, readonly "reasoningOutputTokens": number, 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()), "reasoningOutputTokens": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "totalTokens": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()) }) @@ -2949,6 +3579,9 @@ export const V2ThreadTurnsListParams__TurnItemsView = Schema.Literals(["notLoade export type V2ThreadTurnsListResponse__AbsolutePathBuf = string export const V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__AgentMessageDelivery = "async" +export const V2ThreadTurnsListResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadTurnsListResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2ThreadTurnsListResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -2967,6 +3600,9 @@ export const V2ThreadTurnsListResponse__HookPromptFragment = Schema.Struct({ "ho export type V2ThreadTurnsListResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadTurnsListResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadTurnsListResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadTurnsListResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadTurnsListResponse__LegacyAppPathString = string export const V2ThreadTurnsListResponse__LegacyAppPathString = Schema.String @@ -3015,6 +3651,9 @@ export const V2ThreadTurnsListResponse__WebSearchAction = Schema.Union([Schema.S 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__AgentMessageDelivery = "async" +export const V2ThreadUnarchiveResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2ThreadUnarchiveResponse__AgentPath = string export const V2ThreadUnarchiveResponse__AgentPath = Schema.String @@ -3039,6 +3678,9 @@ export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({ "ho export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2ThreadUnarchiveResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2ThreadUnarchiveResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2ThreadUnarchiveResponse__LegacyAppPathString = string export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String @@ -3087,6 +3729,9 @@ export const V2ThreadUnarchiveResponse__ThreadExtra = Schema.Struct({ }).annota export type V2ThreadUnarchiveResponse__ThreadId = string export const V2ThreadUnarchiveResponse__ThreadId = Schema.String +export type V2ThreadUnarchiveResponse__ThreadSectionAppearance = { readonly "color"?: string | null, readonly "icon"?: string | null } +export const V2ThreadUnarchiveResponse__ThreadSectionAppearance = Schema.Struct({ "color": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "icon": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "description": "Extensible visual presentation for a custom thread section." }) + export type V2ThreadUnarchiveResponse__ThreadSource = string export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String @@ -3102,6 +3747,9 @@ export const V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus = Schema.Liter 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__AgentMessageDelivery = "async" +export const V2TurnCompletedNotification__AgentMessageDelivery = Schema.Literal("async") + export type V2TurnCompletedNotification__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2TurnCompletedNotification__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -3120,6 +3768,9 @@ export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({ " export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original" export const V2TurnCompletedNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2TurnCompletedNotification__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2TurnCompletedNotification__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2TurnCompletedNotification__LegacyAppPathString = string export const V2TurnCompletedNotification__LegacyAppPathString = Schema.String @@ -3171,6 +3822,9 @@ export const V2TurnPlanUpdatedNotification__TurnPlanStepStatus = Schema.Literals 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__AgentMessageDelivery = "async" +export const V2TurnStartedNotification__AgentMessageDelivery = Schema.Literal("async") + export type V2TurnStartedNotification__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2TurnStartedNotification__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -3189,6 +3843,9 @@ export const V2TurnStartedNotification__HookPromptFragment = Schema.Struct({ "ho export type V2TurnStartedNotification__ImageDetail = "auto" | "low" | "high" | "original" export const V2TurnStartedNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2TurnStartedNotification__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2TurnStartedNotification__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2TurnStartedNotification__LegacyAppPathString = string export const V2TurnStartedNotification__LegacyAppPathString = Schema.String @@ -3273,6 +3930,9 @@ export const V2TurnStartParams__TextElement = Schema.Struct({ "byteRange": Schem 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__AgentMessageDelivery = "async" +export const V2TurnStartResponse__AgentMessageDelivery = Schema.Literal("async") + export type V2TurnStartResponse__CollabAgentStatus = "pendingInit" | "running" | "interrupted" | "completed" | "errored" | "shutdown" | "notFound" export const V2TurnStartResponse__CollabAgentStatus = Schema.Literals(["pendingInit", "running", "interrupted", "completed", "errored", "shutdown", "notFound"]) @@ -3291,6 +3951,9 @@ export const V2TurnStartResponse__HookPromptFragment = Schema.Struct({ "hookRunI export type V2TurnStartResponse__ImageDetail = "auto" | "low" | "high" | "original" export const V2TurnStartResponse__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]) +export type V2TurnStartResponse__ImageGenerationFailure = { readonly "limitId": string, readonly "resetsAt"?: number | null, readonly "type": "usageLimitExceeded" } +export const V2TurnStartResponse__ImageGenerationFailure = Schema.Union([Schema.Struct({ "limitId": Schema.String, "resetsAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "type": Schema.Literal("usageLimitExceeded").annotate({ "title": "UsageLimitExceededImageGenerationFailureType" }) }).annotate({ "title": "UsageLimitExceededImageGenerationFailure" })], { mode: "oneOf" }) + export type V2TurnStartResponse__LegacyAppPathString = string export const V2TurnStartResponse__LegacyAppPathString = Schema.String @@ -3360,8 +4023,8 @@ export const V2WindowsSandboxSetupStartParams__WindowsSandboxSetupMode = Schema. export type ApplyPatchApprovalResponse__NetworkPolicyAmendment = { readonly "action": ApplyPatchApprovalResponse__NetworkPolicyRuleAction, readonly "host": string } export const ApplyPatchApprovalResponse__NetworkPolicyAmendment = Schema.Struct({ "action": ApplyPatchApprovalResponse__NetworkPolicyRuleAction, "host": Schema.String }) -export type ClientRequest__PluginInstallParams = { readonly "marketplacePath"?: ClientRequest__AbsolutePathBuf | null, readonly "pluginName": string, readonly "remoteMarketplaceName"?: string | null } -export const ClientRequest__PluginInstallParams = Schema.Struct({ "marketplacePath": Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])), "pluginName": Schema.String, "remoteMarketplaceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) +export type ClientRequest__PluginInstallParams = { readonly "installAttemptId"?: string | null, readonly "marketplacePath"?: ClientRequest__AbsolutePathBuf | null, readonly "pluginName": string, readonly "remoteMarketplaceName"?: string | null } +export const ClientRequest__PluginInstallParams = Schema.Struct({ "installAttemptId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Client-generated identifier used to correlate one installation attempt." }), Schema.Null])), "marketplacePath": Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])), "pluginName": Schema.String, "remoteMarketplaceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) export type ClientRequest__PluginInstalledParams = { readonly "cwds"?: ReadonlyArray | null, readonly "installSuggestionPluginNames"?: ReadonlyArray | null } export const ClientRequest__PluginInstalledParams = Schema.Struct({ "cwds": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__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])) }) @@ -3369,6 +4032,9 @@ export const ClientRequest__PluginInstalledParams = Schema.Struct({ "cwds": Sche export type ClientRequest__PluginReadParams = { readonly "marketplacePath"?: ClientRequest__AbsolutePathBuf | null, readonly "pluginName": string, readonly "remoteMarketplaceName"?: string | null } export const ClientRequest__PluginReadParams = Schema.Struct({ "marketplacePath": Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])), "pluginName": Schema.String, "remoteMarketplaceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) +export type ClientRequest__ProjectRoot = { readonly "path": ClientRequest__AbsolutePathBuf } +export const ClientRequest__ProjectRoot = Schema.Struct({ "path": ClientRequest__AbsolutePathBuf }) + export type ClientRequest__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 ClientRequest__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(ClientRequest__AbsolutePathBuf).annotate({ "default": [] })) }).annotate({ "title": "WorkspaceWriteSandboxPolicy" })], { mode: "oneOf" }) @@ -3390,12 +4056,12 @@ export const ClientRequest__ThreadRealtimeInitialItem = Schema.Struct({ "role": export type ClientRequest__DynamicToolSpec = { readonly "deferLoading"?: boolean, readonly "description": string, readonly "inputSchema": Schema.Json, 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.Json, "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__ExternalAgentConfigImportHistoryRecordSuccessParams = { readonly "cwd"?: string | null, readonly "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null, readonly "title"?: string | null } +export const ClientRequest__ExternalAgentConfigImportHistoryRecordSuccessParams = Schema.Struct({ "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, "source": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "target": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "title": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Original title for an imported session, when available." }), Schema.Null])) }) + export type ClientRequest__ExternalAgentConfigImportItemTypeFailure = { readonly "cwd"?: string | null, readonly "errorType"?: string | null, readonly "failureStage": string, readonly "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, readonly "message": string, readonly "source"?: string | null, readonly "subErrorType"?: string | null } export const ClientRequest__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": ClientRequest__ExternalAgentConfigMigrationItemType, "message": Schema.String, "source": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "subErrorType": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) -export type ClientRequest__ExternalAgentConfigImportItemTypeSuccess = { readonly "cwd"?: string | null, readonly "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null } -export const ClientRequest__ExternalAgentConfigImportItemTypeSuccess = Schema.Struct({ "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, "source": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "target": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) - 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" }) @@ -3408,8 +4074,11 @@ export const ClientRequest__InitializeParams = Schema.Struct({ "capabilities": S 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 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__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" } | { readonly "accessKeyId": string, readonly "region": string, readonly "secretAccessKey": string, readonly "sessionToken"?: string | null, readonly "type": "amazonBedrockAccessKeys" } +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." }), Schema.Struct({ "accessKeyId": Schema.String, "region": Schema.String, "secretAccessKey": Schema.String, "sessionToken": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("amazonBedrockAccessKeys").annotate({ "title": "AmazonBedrockAccessKeysLoginAccountParamsType" }) }).annotate({ "title": "AmazonBedrockAccessKeysLoginAccountParams", "description": "[UNSTABLE] Managed Amazon Bedrock AWS access key login is experimental." })], { mode: "oneOf" }) + +export type ClientRequest__McpServerOauthLoginParams = { readonly "clientRegistration"?: ClientRequest__McpServerOauthClientRegistration | null, readonly "name": string, readonly "scopes"?: ReadonlyArray | null, readonly "threadId"?: string | null, readonly "timeoutSecs"?: number | null } +export const ClientRequest__McpServerOauthLoginParams = Schema.Struct({ "clientRegistration": Schema.optionalKey(Schema.Union([ClientRequest__McpServerOauthClientRegistration, Schema.Null]).annotate({ "description": "Registration strategy for this login only; omission selects automatic discovery." })), "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])) }) 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(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "detail": Schema.optionalKey(Schema.Union([ClientRequest__McpServerStatusDetail, Schema.Null]).annotate({ "description": "Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted." })), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a server-defined value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "threadId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) @@ -3423,6 +4092,9 @@ export const ClientRequest__ConfigValueWriteParams = Schema.Struct({ "expectedVe export type ClientRequest__PluginListParams = { readonly "cwds"?: ReadonlyArray | null, readonly "forceRefetch"?: boolean, 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])), "forceRefetch": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the client requests a fresh remote plugin catalog fetch." })), "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__PluginSearchParams = { readonly "cursor"?: string | null, readonly "cwds"?: ReadonlyArray | null, readonly "limit"?: number | null, readonly "scope"?: ClientRequest__PluginSearchScope | null, readonly "searchTerm": string } +export const ClientRequest__PluginSearchParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "cwds": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__AbsolutePathBuf), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "scope": Schema.optionalKey(Schema.Union([ClientRequest__PluginSearchScope, Schema.Null])), "searchTerm": Schema.String }) + 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 }) @@ -3453,20 +4125,26 @@ export const ClientRequest__ThreadGoalSetParams = Schema.Struct({ "objective": S export type ClientRequest__ThreadMemoryModeSetParams = { readonly "mode": ClientRequest__ThreadMemoryMode, readonly "threadId": string } export const ClientRequest__ThreadMemoryModeSetParams = Schema.Struct({ "mode": ClientRequest__ThreadMemoryMode, "threadId": Schema.String }) -export type ClientRequest__ThreadMetadataUpdateParams = { readonly "gitInfo"?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null, readonly "isPinned"?: boolean | null, readonly "threadId": string } -export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({ "gitInfo": Schema.optionalKey(Schema.Union([ClientRequest__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({ "description": "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value." })), "isPinned": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Patch whether this thread is pinned. Omit to leave the stored value unchanged." }), Schema.Null])), "threadId": Schema.String }) +export type ClientRequest__ThreadMetadataUpdateParams = { readonly "gitInfo"?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null, readonly "projectId"?: string | null, readonly "threadId": string } +export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({ "gitInfo": Schema.optionalKey(Schema.Union([ClientRequest__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({ "description": "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value." })), "projectId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to leave the project unchanged, use an empty string to clear it, or provide an existing project ID to assign it." }), Schema.Null])), "threadId": Schema.String }) export type ClientRequest__ThreadRealtimeAppendAudioParams = { readonly "audio": ClientRequest__ThreadRealtimeAudioChunk, readonly "threadId": string } export const ClientRequest__ThreadRealtimeAppendAudioParams = Schema.Struct({ "audio": ClientRequest__ThreadRealtimeAudioChunk, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - append audio input to thread realtime." }) +export type ClientRequest__ThreadSectionCreateParams = { readonly "appearance"?: ClientRequest__ThreadSectionAppearance | null, readonly "name": string } +export const ClientRequest__ThreadSectionCreateParams = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([ClientRequest__ThreadSectionAppearance, Schema.Null])), "name": Schema.String.annotate({ "description": "The user-visible name of the section." }) }).annotate({ "description": "Parameters for creating an independently persisted thread section." }) + +export type ClientRequest__ThreadSectionUpdateParams = { readonly "appearance"?: ClientRequest__ThreadSectionAppearance | null, readonly "name": string, readonly "sectionId": string } +export const ClientRequest__ThreadSectionUpdateParams = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([ClientRequest__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Omit to preserve appearance, use `null` to clear it, or provide a replacement." })), "name": Schema.String.annotate({ "description": "The updated user-visible name of the section." }), "sectionId": Schema.String.annotate({ "description": "The stable, server-generated identity of the section to update." }) }).annotate({ "description": "Parameters for updating an independently persisted thread section." }) + export type ClientRequest__ThreadForkParams = { readonly "approvalPolicy"?: ClientRequest__AskForApproval | null, readonly "approvalsReviewer"?: ClientRequest__ApprovalsReviewer | null, readonly "baseInstructions"?: string | null, readonly "beforeTurnId"?: string | null, readonly "config"?: { readonly [x: string]: Schema.Json } | null, readonly "cwd"?: string | null, readonly "deferGoalContinuation"?: boolean, readonly "developerInstructions"?: string | null, readonly "ephemeral"?: boolean, readonly "excludeTurns"?: boolean, readonly "lastTurnId"?: string | null, readonly "model"?: string | null, readonly "modelProvider"?: string | null, readonly "path"?: string | null, readonly "permissions"?: string | null, readonly "runtimeWorkspaceRoots"?: ReadonlyArray | 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])), "beforeTurnId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional turn id to fork before, excluding that turn and all later turns. Cannot be combined with `last_turn_id`." }), Schema.Null])), "config": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json), Schema.Null])), "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "deferGoalContinuation": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, carry the source thread's current goal into the fork without starting its initial automatic continuation. The next explicit turn owns the goal lifecycle, and normal automatic continuation resumes after it." })), "developerInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "ephemeral": Schema.optionalKey(Schema.Boolean), "excludeTurns": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, return only thread metadata and live fork state without populating `thread.turns`. This is useful when the client plans to call `thread/turns/list` immediately after forking." })), "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])), "path": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "[UNSTABLE] Specify the rollout path to fork from. If specified, the thread_id param will be ignored." }), Schema.Null])), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Named profile id for the forked thread. Cannot be combined with `sandbox`." }), Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ "description": "Replace the thread's runtime workspace roots. Paths must be absolute." }), 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 "ancestorThreadId"?: string | null, readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "cwd"?: ClientRequest__ThreadListCwdFilter | null, readonly "isPinned"?: boolean | null, readonly "limit"?: number | null, readonly "modelProviders"?: ReadonlyArray | null, readonly "parentThreadId"?: string | 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({ "ancestorThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with `parentThreadId`." }), Schema.Null])), "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "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." })), "isPinned": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional pinned filter; when set, only threads matching this value are returned." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "modelProviders": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers." }), Schema.Null])), "parentThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`." }), Schema.Null])), "searchTerm": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional substring filter for the extracted thread title." }), 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." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), 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__ThreadListParams = { readonly "ancestorThreadId"?: string | null, readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "cwd"?: ClientRequest__ThreadListCwdFilter | null, readonly "limit"?: number | null, readonly "modelProviders"?: ReadonlyArray | null, readonly "parentThreadId"?: string | null, readonly "projectId"?: string | null, readonly "searchTerm"?: string | null, readonly "sectionId"?: 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({ "ancestorThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with `parentThreadId`." }), Schema.Null])), "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "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." })), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "modelProviders": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers." }), Schema.Null])), "parentThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`." }), Schema.Null])), "projectId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to include every project, set to null for unassigned threads, or provide a project ID to return only threads in that project." }), Schema.Null])), "searchTerm": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional substring filter for the extracted thread title." }), Schema.Null])), "sectionId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to include every section, set to `null` for unsectioned threads, or provide a section ID to return only threads in that section." }), 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." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), 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__ThreadSearchParams = { readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "searchTerm": string, readonly "sortDirection"?: ClientRequest__SortDirection | null, readonly "sortKey"?: ClientRequest__ThreadSortKey | null, readonly "sourceKinds"?: ReadonlyArray | null } -export const ClientRequest__ThreadSearchParams = Schema.Struct({ "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "searchTerm": Schema.String.annotate({ "description": "Required substring/full-text query for thread search." }), "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." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), Schema.Null])) }) +export type ClientRequest__ThreadSearchParams = { readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "searchTerm": string, readonly "sortDirection"?: ClientRequest__SortDirection | null, readonly "sortKey"?: ClientRequest__ThreadSearchSortKey | null, readonly "sourceKinds"?: ReadonlyArray | null } +export const ClientRequest__ThreadSearchParams = Schema.Struct({ "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "searchTerm": Schema.String.annotate({ "description": "Required substring/full-text query for thread search." }), "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__ThreadSearchSortKey, Schema.Null]).annotate({ "description": "Optional sort key; defaults to created_at." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), Schema.Null])) }) 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." })) }) @@ -3477,8 +4155,8 @@ export const ClientRequest__ThreadTurnsListParams = Schema.Struct({ "cursor": Sc export type ClientRequest__WindowsSandboxSetupStartParams = { readonly "cwd"?: ClientRequest__AbsolutePathBuf | null, readonly "mode": ClientRequest__WindowsSandboxSetupMode } export const ClientRequest__WindowsSandboxSetupStartParams = Schema.Struct({ "cwd": Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])), "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__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": CommandExecutionRequestApprovalParams__LegacyAppPathString, 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__LegacyAppPathString, "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" }) @@ -3540,9 +4218,6 @@ export const PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Un 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 ServerNotification__FsChangedNotification = { readonly "changedPaths": ReadonlyArray, readonly "watchId": string } export const ServerNotification__FsChangedNotification = Schema.Struct({ "changedPaths": Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ "description": "File or directory paths associated with this event." }), "watchId": Schema.String.annotate({ "description": "Watch identifier previously provided to `fs/watch`." }) }).annotate({ "description": "Filesystem watch notification emitted for `fs/watch` subscribers." }) @@ -3555,11 +4230,14 @@ export const ServerNotification__AppMetadata = Schema.Struct({ "categories": Sch export type ServerNotification__CollabAgentState = { readonly "message"?: string | null, readonly "status": ServerNotification__CollabAgentStatus } export const ServerNotification__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": ServerNotification__CollabAgentStatus }) +export type ServerNotification__AccountLoginCompletedNotification = { readonly "error"?: string | null, readonly "loginId"?: string | null, readonly "onboardingEntrypoint"?: ServerNotification__DesktopOnboardingEntrypoint | null, readonly "success": boolean } +export const ServerNotification__AccountLoginCompletedNotification = Schema.Struct({ "error": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "loginId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "onboardingEntrypoint": Schema.optionalKey(Schema.Union([ServerNotification__DesktopOnboardingEntrypoint, Schema.Null])), "success": Schema.Boolean }) + 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__ExternalAgentConfigImportItemTypeSuccess = { readonly "cwd"?: string | null, readonly "itemType": ServerNotification__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null, readonly "title"?: 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])), "title": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Original title for an imported session; null for other item types." }), Schema.Null])) }) export type ServerNotification__FuzzyFileSearchResult = { readonly "file_name": string, readonly "indices"?: ReadonlyArray | null, readonly "match_type": ServerNotification__FuzzyFileSearchMatchType, readonly "path": string, readonly "root": string, readonly "score": number } export const ServerNotification__FuzzyFileSearchResult = Schema.Struct({ "file_name": Schema.String, "indices": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0))), Schema.Null])), "match_type": ServerNotification__FuzzyFileSearchMatchType, "path": Schema.String, "root": Schema.String, "score": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "Superset of [`codex_file_search::FileMatch`]" }) @@ -3570,9 +4248,15 @@ export const ServerNotification__GuardianApprovalReview = Schema.Struct({ "ratio export type ServerNotification__HookOutputEntry = { readonly "kind": ServerNotification__HookOutputEntryKind, readonly "text": string } export const ServerNotification__HookOutputEntry = Schema.Struct({ "kind": ServerNotification__HookOutputEntryKind, "text": Schema.String }) +export type ServerNotification__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": ServerNotification__LegacyAppPathString, 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__LegacyAppPathString, "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__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__McpServerEventStreamNotification = { readonly "notification": ServerNotification__McpServerEventNotification, readonly "subscriptionId": string } +export const ServerNotification__McpServerEventStreamNotification = Schema.Struct({ "notification": ServerNotification__McpServerEventNotification, "subscriptionId": Schema.String }) + 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])) }) @@ -3585,8 +4269,8 @@ export const ServerNotification__ModelReroutedNotification = Schema.Struct({ "fr 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__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": ServerNotification__NonSteerableTurnKind } } -export const ServerNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": ServerNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 ServerNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": ServerNotification__NonSteerableTurnKind } } +export const ServerNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": ServerNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 ServerNotification__FileUpdateChange = { readonly "diff": string, readonly "kind": ServerNotification__PatchChangeKind, readonly "path": string } export const ServerNotification__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": ServerNotification__PatchChangeKind, "path": Schema.String }) @@ -3594,6 +4278,9 @@ export const ServerNotification__FileUpdateChange = Schema.Struct({ "diff": Sche export type ServerNotification__AccountUpdatedNotification = { readonly "authMode"?: ServerNotification__AuthMode | null, readonly "planType"?: ServerNotification__PlanType | null } export const ServerNotification__AccountUpdatedNotification = Schema.Struct({ "authMode": Schema.optionalKey(Schema.Union([ServerNotification__AuthMode, Schema.Null])), "planType": Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])) }) +export type ServerNotification__ProjectChangedNotification = { readonly "changeType": ServerNotification__ProjectChangeType, readonly "projectId": string } +export const ServerNotification__ProjectChangedNotification = Schema.Struct({ "changeType": ServerNotification__ProjectChangeType, "projectId": Schema.String }) + export type ServerNotification__ThreadRealtimeStartedNotification = { readonly "realtimeSessionId"?: string | null, readonly "threadId": string, readonly "version": ServerNotification__RealtimeConversationVersion } export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Struct({ "realtimeSessionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String, "version": ServerNotification__RealtimeConversationVersion }).annotate({ "description": "EXPERIMENTAL - emitted when thread realtime startup is accepted." }) @@ -3627,6 +4314,12 @@ export const ServerNotification__SubAgentSource = Schema.Union([Schema.Literals( export type ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = { readonly "audio": ServerNotification__ThreadRealtimeAudioChunk, readonly "threadId": string } export const ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = Schema.Struct({ "audio": ServerNotification__ThreadRealtimeAudioChunk, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - streamed output audio emitted by thread realtime." }) +export type ServerNotification__ThreadRealtimeItem = { readonly "type": "realtimeSessionStarted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "role": ServerNotification__ThreadRealtimeTranscriptRole, readonly "text": string, readonly "type": "transcriptSegment", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "item_id": string, readonly "presentation": ServerNotification__ThreadRealtimeBemItemPresentation, readonly "turn_id": string, readonly "type": "bemItemPromoted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "outcome": ServerNotification__ThreadRealtimeSessionOutcome, readonly "type": "realtimeSessionClosed", readonly "id": string, readonly "realtimeSessionId": string } +export const ServerNotification__ThreadRealtimeItem = Schema.Union([Schema.Struct({ "type": Schema.Literal("realtimeSessionStarted").annotate({ "title": "RealtimeSessionStartedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionStartedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "role": ServerNotification__ThreadRealtimeTranscriptRole, "text": Schema.String, "type": Schema.Literal("transcriptSegment").annotate({ "title": "TranscriptSegmentThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "TranscriptSegmentThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "item_id": Schema.String, "presentation": ServerNotification__ThreadRealtimeBemItemPresentation, "turn_id": Schema.String, "type": Schema.Literal("bemItemPromoted").annotate({ "title": "BemItemPromotedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "BemItemPromotedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "outcome": ServerNotification__ThreadRealtimeSessionOutcome, "type": Schema.Literal("realtimeSessionClosed").annotate({ "title": "RealtimeSessionClosedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionClosedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." })], { mode: "oneOf" }) + +export type ServerNotification__ThreadSection = { readonly "appearance"?: ServerNotification__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const ServerNotification__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([ServerNotification__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + export type ServerNotification__ThreadTokenUsage = { readonly "last": ServerNotification__TokenUsageBreakdown, readonly "modelContextWindow"?: number | null, readonly "total": ServerNotification__TokenUsageBreakdown } export const ServerNotification__ThreadTokenUsage = Schema.Struct({ "last": ServerNotification__TokenUsageBreakdown, "modelContextWindow": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "total": ServerNotification__TokenUsageBreakdown }) @@ -3636,12 +4329,12 @@ export const ServerNotification__TurnPlanStep = Schema.Struct({ "status": Server export type ServerNotification__WindowsSandboxSetupCompletedNotification = { readonly "error"?: string | null, readonly "mode": ServerNotification__WindowsSandboxSetupMode, readonly "success": boolean } export const ServerNotification__WindowsSandboxSetupCompletedNotification = Schema.Struct({ "error": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "mode": ServerNotification__WindowsSandboxSetupMode, "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__ChatgptAuthTokensRefreshParams = { readonly "previousAccountId"?: string | null, readonly "reason": ServerRequest__ChatgptAuthTokensRefreshReason } export const ServerRequest__ChatgptAuthTokensRefreshParams = Schema.Struct({ "previousAccountId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`)." }), Schema.Null])), "reason": ServerRequest__ChatgptAuthTokensRefreshReason }) +export type ServerRequest__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": ServerRequest__LegacyAppPathString, 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__LegacyAppPathString, "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__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" }) @@ -3699,6 +4392,9 @@ export const V2AppsListResponse__AppMetadata = Schema.Struct({ "categories": Sch export type V2AppsReadResponse__ConnectorMetadata = { readonly "description"?: string | null, readonly "distributionChannel"?: string | null, readonly "iconUrl"?: string | null, readonly "iconUrlDark"?: string | null, readonly "id": string, readonly "installUrl"?: string | null, readonly "name": string, readonly "pluginDisplayNames"?: ReadonlyArray, readonly "toolSummaries"?: ReadonlyArray | null } export const V2AppsReadResponse__ConnectorMetadata = Schema.Struct({ "description": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "distributionChannel": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "iconUrl": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "iconUrlDark": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "id": Schema.String, "installUrl": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "name": Schema.String, "pluginDisplayNames": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "toolSummaries": Schema.optionalKey(Schema.Union([Schema.Array(V2AppsReadResponse__AppToolSummary), Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - metadata returned by app/read." }) +export type V2BedrockDiscoverResponse__BedrockEnvironmentCredential = { readonly "region"?: string | null, readonly "type": V2BedrockDiscoverResponse__AwsCredentialType } +export const V2BedrockDiscoverResponse__BedrockEnvironmentCredential = Schema.Struct({ "region": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": V2BedrockDiscoverResponse__AwsCredentialType }) + export type V2CollaborationModeListResponse__CollaborationModeMask = { readonly "mode"?: V2CollaborationModeListResponse__ModeKind | null, readonly "model"?: string | null, readonly "name": string, readonly "reasoning_effort"?: V2CollaborationModeListResponse__ReasoningEffort | null | null } export const V2CollaborationModeListResponse__CollaborationModeMask = Schema.Struct({ "mode": Schema.optionalKey(Schema.Union([V2CollaborationModeListResponse__ModeKind, Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "name": Schema.String, "reasoning_effort": Schema.optionalKey(Schema.Union([Schema.Union([V2CollaborationModeListResponse__ReasoningEffort, Schema.Null]), Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - collaboration mode preset metadata for clients." }) @@ -3708,8 +4404,17 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union([Schema.Struct({ export type V2ConfigBatchWriteParams__ConfigEdit = { readonly "keyPath": string, readonly "mergeStrategy": V2ConfigBatchWriteParams__MergeStrategy, readonly "value": Schema.Json } export const V2ConfigBatchWriteParams__ConfigEdit = Schema.Struct({ "keyPath": Schema.String, "mergeStrategy": V2ConfigBatchWriteParams__MergeStrategy, "value": Schema.Json }) -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 "dotCodexFolder": V2ConfigReadResponse__AbsolutePathBuf, readonly "type": "project" } | { readonly "type": "sessionFlags" } | { readonly "file": V2ConfigReadResponse__AbsolutePathBuf, readonly "type": "legacyManagedConfigTomlFromFile" } | { readonly "type": "legacyManagedConfigTomlFromMdm" } -export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union([Schema.Struct({ "domain": Schema.String, "key": Schema.String, "type": Schema.Literal("mdm").annotate({ "title": "MdmConfigLayerSourceType" }) }).annotate({ "title": "MdmConfigLayerSource", "description": "Managed preferences layer delivered by MDM (macOS only)." }), 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." }), "type": Schema.Literal("system").annotate({ "title": "SystemConfigLayerSourceType" }) }).annotate({ "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", "description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory" }), Schema.Struct({ "dotCodexFolder": V2ConfigReadResponse__AbsolutePathBuf, "type": Schema.Literal("project").annotate({ "title": "ProjectConfigLayerSourceType" }) }).annotate({ "title": "ProjectConfigLayerSource", "description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root." }), Schema.Struct({ "type": Schema.Literal("sessionFlags").annotate({ "title": "SessionFlagsConfigLayerSourceType" }) }).annotate({ "title": "SessionFlagsConfigLayerSource", "description": "Session-layer overrides supplied via `-c`/`--config`." }), Schema.Struct({ "file": V2ConfigReadResponse__AbsolutePathBuf, "type": Schema.Literal("legacyManagedConfigTomlFromFile").annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSource", "description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`." }), Schema.Struct({ "type": Schema.Literal("legacyManagedConfigTomlFromMdm").annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSource" })], { mode: "oneOf" }) +export type V2ConfigReadResponse__ConfigLayerSource = { readonly "file": string, readonly "type": "packagedDefaults" } | { 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 "dotCodexFolder": V2ConfigReadResponse__AbsolutePathBuf, readonly "type": "project" } | { readonly "type": "sessionFlags" } | { readonly "file": V2ConfigReadResponse__AbsolutePathBuf, readonly "type": "legacyManagedConfigTomlFromFile" } | { readonly "type": "legacyManagedConfigTomlFromMdm" } +export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union([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." }), "type": Schema.Literal("packagedDefaults").annotate({ "title": "PackagedDefaultsConfigLayerSourceType" }) }).annotate({ "title": "PackagedDefaultsConfigLayerSource", "description": "Default configuration supplied with the installed Codex package." }), Schema.Struct({ "domain": Schema.String, "key": Schema.String, "type": Schema.Literal("mdm").annotate({ "title": "MdmConfigLayerSourceType" }) }).annotate({ "title": "MdmConfigLayerSource", "description": "Managed preferences layer delivered by MDM (macOS only)." }), 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." }), "type": Schema.Literal("system").annotate({ "title": "SystemConfigLayerSourceType" }) }).annotate({ "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", "description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory" }), Schema.Struct({ "dotCodexFolder": V2ConfigReadResponse__AbsolutePathBuf, "type": Schema.Literal("project").annotate({ "title": "ProjectConfigLayerSourceType" }) }).annotate({ "title": "ProjectConfigLayerSource", "description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root." }), Schema.Struct({ "type": Schema.Literal("sessionFlags").annotate({ "title": "SessionFlagsConfigLayerSourceType" }) }).annotate({ "title": "SessionFlagsConfigLayerSource", "description": "Session-layer overrides supplied via `-c`/`--config`." }), Schema.Struct({ "file": V2ConfigReadResponse__AbsolutePathBuf, "type": Schema.Literal("legacyManagedConfigTomlFromFile").annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSource", "description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`." }), Schema.Struct({ "type": Schema.Literal("legacyManagedConfigTomlFromMdm").annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSource" })], { mode: "oneOf" }) + +export type V2ConfigReadResponse__BrowserUseOriginPolicyConfig = { readonly "access"?: V2ConfigReadResponse__AllowDenyRequirement | null, readonly "downloads"?: V2ConfigReadResponse__AllowDenyRequirement | null, readonly "full_cdp_access"?: V2ConfigReadResponse__AllowDenyRequirement | null, readonly "uploads"?: V2ConfigReadResponse__AllowDenyRequirement | null } +export const V2ConfigReadResponse__BrowserUseOriginPolicyConfig = Schema.Struct({ "access": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AllowDenyRequirement, Schema.Null])), "downloads": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AllowDenyRequirement, Schema.Null])), "full_cdp_access": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AllowDenyRequirement, Schema.Null])), "uploads": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AllowDenyRequirement, Schema.Null])) }) + +export type V2ConfigReadResponse__ComputerUseMacosConfig = { readonly "bundle_ids"?: { readonly [x: string]: V2ConfigReadResponse__AllowDenyRequirement } | null } +export const V2ConfigReadResponse__ComputerUseMacosConfig = Schema.Struct({ "bundle_ids": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, V2ConfigReadResponse__AllowDenyRequirement), Schema.Null])) }) + +export type V2ConfigReadResponse__ComputerUseWindowsExeConfig = { readonly "access": V2ConfigReadResponse__AllowDenyRequirement, readonly "binary_name"?: string | null, readonly "product_name": string, readonly "publisher_name": string } +export const V2ConfigReadResponse__ComputerUseWindowsExeConfig = Schema.Struct({ "access": V2ConfigReadResponse__AllowDenyRequirement, "binary_name": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "product_name": Schema.String, "publisher_name": Schema.String }) 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 })) }) @@ -3717,6 +4422,15 @@ export const V2ConfigReadResponse__AppsDefaultConfig = Schema.Struct({ "approval export type V2ConfigReadResponse__WebSearchToolConfig = { readonly "allowed_domains"?: ReadonlyArray | null, readonly "context_size"?: V2ConfigReadResponse__WebSearchContextSize | null, readonly "location"?: V2ConfigReadResponse__WebSearchLocation | null } export const V2ConfigReadResponse__WebSearchToolConfig = Schema.Struct({ "allowed_domains": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "context_size": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__WebSearchContextSize, Schema.Null])), "location": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__WebSearchLocation, Schema.Null])) }) +export type V2ConfigRequirementsReadResponse__ComputerUseMacosRequirements = { readonly "bundleIds"?: { readonly [x: string]: V2ConfigRequirementsReadResponse__AllowDenyRequirement } | null } +export const V2ConfigRequirementsReadResponse__ComputerUseMacosRequirements = Schema.Struct({ "bundleIds": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, V2ConfigRequirementsReadResponse__AllowDenyRequirement), Schema.Null])) }) + +export type V2ConfigRequirementsReadResponse__ComputerUseWindowsExeRequirement = { readonly "access": V2ConfigRequirementsReadResponse__AllowDenyRequirement, readonly "binaryName"?: string | null, readonly "productName": string, readonly "publisherName": string } +export const V2ConfigRequirementsReadResponse__ComputerUseWindowsExeRequirement = Schema.Struct({ "access": V2ConfigRequirementsReadResponse__AllowDenyRequirement, "binaryName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "productName": Schema.String, "publisherName": Schema.String }) + +export type V2ConfigRequirementsReadResponse__BrowserUseOriginPolicy = { readonly "access"?: V2ConfigRequirementsReadResponse__AllowDenyRequirement | null, readonly "accessApprovalLifetime"?: V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime | null, readonly "autoReview"?: V2ConfigRequirementsReadResponse__AllowDenyRequirement | null, readonly "downloads"?: V2ConfigRequirementsReadResponse__AllowDenyRequirement | null, readonly "fullCdpAccess"?: V2ConfigRequirementsReadResponse__AllowDenyRequirement | null, readonly "persistentApproval"?: boolean | null, readonly "uploads"?: V2ConfigRequirementsReadResponse__AllowDenyRequirement | null } +export const V2ConfigRequirementsReadResponse__BrowserUseOriginPolicy = Schema.Struct({ "access": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AllowDenyRequirement, Schema.Null])), "accessApprovalLifetime": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime, Schema.Null])), "autoReview": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AllowDenyRequirement, Schema.Null])), "downloads": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AllowDenyRequirement, Schema.Null])), "fullCdpAccess": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AllowDenyRequirement, Schema.Null])), "persistentApproval": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "uploads": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AllowDenyRequirement, Schema.Null])) }) + export type V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = { readonly "hooks": ReadonlyArray, readonly "matcher"?: string | null } export const V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = Schema.Struct({ "hooks": Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookHandler), "matcher": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) @@ -3729,11 +4443,14 @@ export const V2ConfigRequirementsReadResponse__NewThreadModelDefaults = Schema.S export type V2ConfigWarningNotification__TextRange = { readonly "end": V2ConfigWarningNotification__TextPosition, readonly "start": V2ConfigWarningNotification__TextPosition } export const V2ConfigWarningNotification__TextRange = Schema.Struct({ "end": V2ConfigWarningNotification__TextPosition, "start": V2ConfigWarningNotification__TextPosition }) -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 "dotCodexFolder": V2ConfigWriteResponse__AbsolutePathBuf, readonly "type": "project" } | { readonly "type": "sessionFlags" } | { readonly "file": V2ConfigWriteResponse__AbsolutePathBuf, readonly "type": "legacyManagedConfigTomlFromFile" } | { readonly "type": "legacyManagedConfigTomlFromMdm" } -export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union([Schema.Struct({ "domain": Schema.String, "key": Schema.String, "type": Schema.Literal("mdm").annotate({ "title": "MdmConfigLayerSourceType" }) }).annotate({ "title": "MdmConfigLayerSource", "description": "Managed preferences layer delivered by MDM (macOS only)." }), 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." }), "type": Schema.Literal("system").annotate({ "title": "SystemConfigLayerSourceType" }) }).annotate({ "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", "description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory" }), Schema.Struct({ "dotCodexFolder": V2ConfigWriteResponse__AbsolutePathBuf, "type": Schema.Literal("project").annotate({ "title": "ProjectConfigLayerSourceType" }) }).annotate({ "title": "ProjectConfigLayerSource", "description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root." }), Schema.Struct({ "type": Schema.Literal("sessionFlags").annotate({ "title": "SessionFlagsConfigLayerSourceType" }) }).annotate({ "title": "SessionFlagsConfigLayerSource", "description": "Session-layer overrides supplied via `-c`/`--config`." }), Schema.Struct({ "file": V2ConfigWriteResponse__AbsolutePathBuf, "type": Schema.Literal("legacyManagedConfigTomlFromFile").annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSource", "description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`." }), Schema.Struct({ "type": Schema.Literal("legacyManagedConfigTomlFromMdm").annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSource" })], { mode: "oneOf" }) +export type V2ConfigWriteResponse__ConfigLayerSource = { readonly "file": string, readonly "type": "packagedDefaults" } | { 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 "dotCodexFolder": V2ConfigWriteResponse__AbsolutePathBuf, readonly "type": "project" } | { readonly "type": "sessionFlags" } | { readonly "file": V2ConfigWriteResponse__AbsolutePathBuf, readonly "type": "legacyManagedConfigTomlFromFile" } | { readonly "type": "legacyManagedConfigTomlFromMdm" } +export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union([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." }), "type": Schema.Literal("packagedDefaults").annotate({ "title": "PackagedDefaultsConfigLayerSourceType" }) }).annotate({ "title": "PackagedDefaultsConfigLayerSource", "description": "Default configuration supplied with the installed Codex package." }), Schema.Struct({ "domain": Schema.String, "key": Schema.String, "type": Schema.Literal("mdm").annotate({ "title": "MdmConfigLayerSourceType" }) }).annotate({ "title": "MdmConfigLayerSource", "description": "Managed preferences layer delivered by MDM (macOS only)." }), 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." }), "type": Schema.Literal("system").annotate({ "title": "SystemConfigLayerSourceType" }) }).annotate({ "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", "description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory" }), Schema.Struct({ "dotCodexFolder": V2ConfigWriteResponse__AbsolutePathBuf, "type": Schema.Literal("project").annotate({ "title": "ProjectConfigLayerSourceType" }) }).annotate({ "title": "ProjectConfigLayerSource", "description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root." }), Schema.Struct({ "type": Schema.Literal("sessionFlags").annotate({ "title": "SessionFlagsConfigLayerSourceType" }) }).annotate({ "title": "SessionFlagsConfigLayerSource", "description": "Session-layer overrides supplied via `-c`/`--config`." }), Schema.Struct({ "file": V2ConfigWriteResponse__AbsolutePathBuf, "type": Schema.Literal("legacyManagedConfigTomlFromFile").annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromFileConfigLayerSource", "description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`." }), Schema.Struct({ "type": Schema.Literal("legacyManagedConfigTomlFromMdm").annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType" }) }).annotate({ "title": "LegacyManagedConfigTomlFromMdmConfigLayerSource" })], { mode: "oneOf" }) + +export type V2ErrorNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ErrorNotification__NonSteerableTurnKind } } +export const V2ErrorNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ErrorNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ErrorNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ErrorNotification__NonSteerableTurnKind } } -export const V2ErrorNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ErrorNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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__ExternalAgentDetectedConnectorCandidate = { readonly "name": string, readonly "sessionCount": number, readonly "source": V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource } +export const V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorCandidate = Schema.Struct({ "name": Schema.String, "sessionCount": Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "source": V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource }) 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 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": [] })) }) @@ -3741,32 +4458,32 @@ export const V2ExternalAgentConfigDetectResponse__MigrationDetails = Schema.Stru 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 V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess = { readonly "cwd"?: string | null, readonly "itemType": V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null, readonly "title"?: 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])), "title": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Original title for an imported session; null for other item types." }), 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__ExternalAgentConfigImportItemTypeSuccess = { readonly "cwd"?: string | null, readonly "itemType": V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null, readonly "title"?: 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])), "title": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Original title for an imported session; null for other item types." }), 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 V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportHistoryRecordSuccessParams = { readonly "cwd"?: string | null, readonly "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null, readonly "title"?: string | null } +export const V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportHistoryRecordSuccessParams = Schema.Struct({ "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, "source": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "target": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "title": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Original title for an imported session, when available." }), Schema.Null])) }) + export type V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportItemTypeFailure = { readonly "cwd"?: string | null, readonly "errorType"?: string | null, readonly "failureStage": string, readonly "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, readonly "message": string, readonly "source"?: string | null, readonly "subErrorType"?: string | null } export const V2ExternalAgentConfigImportHistoryRecordParams__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": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, "message": Schema.String, "source": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "subErrorType": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) -export type V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportItemTypeSuccess = { readonly "cwd"?: string | null, readonly "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null } -export const V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportItemTypeSuccess = Schema.Struct({ "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, "source": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "target": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) - 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 V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess = { readonly "cwd"?: string | null, readonly "itemType": V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType, readonly "source"?: string | null, readonly "target"?: string | null, readonly "title"?: 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])), "title": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Original title for an imported session; null for other item types." }), 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 }) @@ -3780,24 +4497,27 @@ export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({ export type V2GetAccountResponse__Account = { readonly "type": "apiKey" } | { readonly "email": string | null, 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]), "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 V2GetAccountTokenUsageResponse__ThreadUsage = { readonly "estimatedUsageCreditsMicros": number, readonly "estimatedUsageUsdMicros"?: number | null, readonly "groups": ReadonlyArray, readonly "threadId": string } +export const V2GetAccountTokenUsageResponse__ThreadUsage = Schema.Struct({ "estimatedUsageCreditsMicros": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "estimatedUsageUsdMicros": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "groups": Schema.Array(V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup), "threadId": Schema.String }) + 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 } export const V2HookCompletedNotification__HookOutputEntry = Schema.Struct({ "kind": V2HookCompletedNotification__HookOutputEntryKind, "text": Schema.String }) -export type V2HooksListResponse__HookMetadata = { readonly "additionalContextLimit"?: number | null, 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({ "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "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 V2HooksListResponse__HookMetadata = { readonly "async"?: boolean, readonly "command": string, readonly "handlerType": "command", readonly "additionalContextLimit"?: number | null, readonly "currentHash": string, readonly "displayOrder": number, readonly "enabled": boolean, readonly "eventName": V2HooksListResponse__HookEventName, 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 } | { readonly "handlerType": "mcpTool", readonly "server": string, readonly "tool": string, readonly "additionalContextLimit"?: number | null, readonly "currentHash": string, readonly "displayOrder": number, readonly "enabled": boolean, readonly "eventName": V2HooksListResponse__HookEventName, 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 } | { readonly "handlerType": "prompt", readonly "additionalContextLimit"?: number | null, readonly "currentHash": string, readonly "displayOrder": number, readonly "enabled": boolean, readonly "eventName": V2HooksListResponse__HookEventName, 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 } | { readonly "handlerType": "agent", readonly "additionalContextLimit"?: number | null, readonly "currentHash": string, readonly "displayOrder": number, readonly "enabled": boolean, readonly "eventName": V2HooksListResponse__HookEventName, 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.Union([Schema.Struct({ "async": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })), "command": Schema.String, "handlerType": Schema.Literal("command"), "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "currentHash": Schema.String, "displayOrder": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "enabled": Schema.Boolean, "eventName": V2HooksListResponse__HookEventName, "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 }), Schema.Struct({ "handlerType": Schema.Literal("mcpTool"), "server": Schema.String, "tool": Schema.String, "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "currentHash": Schema.String, "displayOrder": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "enabled": Schema.Boolean, "eventName": V2HooksListResponse__HookEventName, "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 }), Schema.Struct({ "handlerType": Schema.Literal("prompt"), "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "currentHash": Schema.String, "displayOrder": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "enabled": Schema.Boolean, "eventName": V2HooksListResponse__HookEventName, "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 }).annotate({ "title": "PromptHookMetadata" }), Schema.Struct({ "handlerType": Schema.Literal("agent"), "additionalContextLimit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "currentHash": Schema.String, "displayOrder": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "enabled": Schema.Boolean, "eventName": V2HooksListResponse__HookEventName, "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 }).annotate({ "title": "AgentHookMetadata" })], { mode: "oneOf" }) export type V2HookStartedNotification__HookOutputEntry = { readonly "kind": V2HookStartedNotification__HookOutputEntryKind, readonly "text": string } export const V2HookStartedNotification__HookOutputEntry = Schema.Struct({ "kind": V2HookStartedNotification__HookOutputEntryKind, "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 } export const V2ItemCompletedNotification__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ItemCompletedNotification__CollabAgentStatus }) +export type V2ItemCompletedNotification__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ItemCompletedNotification__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ItemCompletedNotification__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ItemCompletedNotification__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) @@ -3819,12 +4539,12 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRe export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = { readonly "kind": "root" } | { readonly "kind": "minimal" } | { readonly "kind": "project_roots", readonly "subpath"?: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString | null } | { readonly "kind": "tmpdir" } | { readonly "kind": "slash_tmp" } | { readonly "kind": "unknown", readonly "path": string, readonly "subpath"?: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString | null } 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 type V2ItemStartedNotification__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ItemStartedNotification__CollabAgentStatus } export const V2ItemStartedNotification__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ItemStartedNotification__CollabAgentStatus }) +export type V2ItemStartedNotification__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ItemStartedNotification__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ItemStartedNotification__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ItemStartedNotification__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) @@ -3834,8 +4554,8 @@ export const V2ItemStartedNotification__FileUpdateChange = Schema.Struct({ "diff export type V2ItemStartedNotification__UserInput = { readonly "text": string, 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 "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } export const V2ItemStartedNotification__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ItemStartedNotification__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) -export type V2ListMcpServerStatusResponse__McpServerStatus = { readonly "authStatus": V2ListMcpServerStatusResponse__McpAuthStatus, 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({ "authStatus": V2ListMcpServerStatusResponse__McpAuthStatus, "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) }) +export type V2ListMcpServerStatusResponse__McpServerStatus = { readonly "authStatus": V2ListMcpServerStatusResponse__McpAuthStatus, readonly "name": string, readonly "pluginId"?: string | null, readonly "resourceTemplates": ReadonlyArray, readonly "resources": ReadonlyArray, readonly "runtimeStatus"?: V2ListMcpServerStatusResponse__McpServerConnectionStatus | null, readonly "serverInfo"?: V2ListMcpServerStatusResponse__McpServerInfo | null, readonly "tools": { readonly [x: string]: V2ListMcpServerStatusResponse__Tool } } +export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({ "authStatus": V2ListMcpServerStatusResponse__McpAuthStatus, "name": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "resourceTemplates": Schema.Array(V2ListMcpServerStatusResponse__ResourceTemplate), "resources": Schema.Array(V2ListMcpServerStatusResponse__Resource), "runtimeStatus": Schema.optionalKey(Schema.Union([V2ListMcpServerStatusResponse__McpServerConnectionStatus, Schema.Null]).annotate({ "description": "Current thread-runtime connection state; null when unavailable or the configuration changed." })), "serverInfo": Schema.optionalKey(Schema.Union([V2ListMcpServerStatusResponse__McpServerInfo, Schema.Null])), "tools": Schema.Record(Schema.String, V2ListMcpServerStatusResponse__Tool) }) export type V2ModelListResponse__ReasoningEffortOption = { readonly "description": string, readonly "reasoningEffort": V2ModelListResponse__ReasoningEffort } export const V2ModelListResponse__ReasoningEffortOption = Schema.Struct({ "description": Schema.String, "reasoningEffort": V2ModelListResponse__ReasoningEffort }) @@ -3885,6 +4605,15 @@ export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({ "name" 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 V2PluginSearchResponse__PluginInterface = { readonly "brandColor"?: string | null, readonly "capabilities": ReadonlyArray, readonly "category"?: string | null, readonly "composerIcon"?: V2PluginSearchResponse__AbsolutePathBuf | null, readonly "composerIconUrl"?: string | null, readonly "defaultPrompt"?: ReadonlyArray | null, readonly "developerName"?: string | null, readonly "displayName"?: string | null, readonly "logo"?: V2PluginSearchResponse__AbsolutePathBuf | null, readonly "logoDark"?: V2PluginSearchResponse__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 V2PluginSearchResponse__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([V2PluginSearchResponse__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([V2PluginSearchResponse__AbsolutePathBuf, Schema.Null]).annotate({ "description": "Local logo path, resolved from the installed plugin package." })), "logoDark": Schema.optionalKey(Schema.Union([V2PluginSearchResponse__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(V2PluginSearchResponse__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 V2PluginSearchResponse__PluginSource = { readonly "path": V2PluginSearchResponse__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 V2PluginSearchResponse__PluginSource = Schema.Union([Schema.Struct({ "path": V2PluginSearchResponse__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 V2PluginSearchResponse__PluginSharePrincipal = { readonly "name": string, readonly "principalId": string, readonly "principalType": V2PluginSearchResponse__PluginSharePrincipalType, readonly "role": V2PluginSearchResponse__PluginSharePrincipalRole } +export const V2PluginSearchResponse__PluginSharePrincipal = Schema.Struct({ "name": Schema.String, "principalId": Schema.String, "principalType": V2PluginSearchResponse__PluginSharePrincipalType, "role": V2PluginSearchResponse__PluginSharePrincipalRole }) + 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])) }) @@ -3903,23 +4632,47 @@ export const V2PluginShareUpdateTargetsParams__PluginShareTarget = Schema.Struct 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 V2ProjectCreateParams__ProjectRoot = { readonly "path": V2ProjectCreateParams__AbsolutePathBuf } +export const V2ProjectCreateParams__ProjectRoot = Schema.Struct({ "path": V2ProjectCreateParams__AbsolutePathBuf }) + +export type V2ProjectCreateResponse__ProjectRoot = { readonly "path": V2ProjectCreateResponse__AbsolutePathBuf } +export const V2ProjectCreateResponse__ProjectRoot = Schema.Struct({ "path": V2ProjectCreateResponse__AbsolutePathBuf }) + +export type V2ProjectImportParams__ProjectRoot = { readonly "path": V2ProjectImportParams__AbsolutePathBuf } +export const V2ProjectImportParams__ProjectRoot = Schema.Struct({ "path": V2ProjectImportParams__AbsolutePathBuf }) + +export type V2ProjectImportResponse__ProjectRoot = { readonly "path": V2ProjectImportResponse__AbsolutePathBuf } +export const V2ProjectImportResponse__ProjectRoot = Schema.Struct({ "path": V2ProjectImportResponse__AbsolutePathBuf }) + +export type V2ProjectListResponse__ProjectRoot = { readonly "path": V2ProjectListResponse__AbsolutePathBuf } +export const V2ProjectListResponse__ProjectRoot = Schema.Struct({ "path": V2ProjectListResponse__AbsolutePathBuf }) + +export type V2ProjectReadResponse__ProjectRoot = { readonly "path": V2ProjectReadResponse__AbsolutePathBuf } +export const V2ProjectReadResponse__ProjectRoot = Schema.Struct({ "path": V2ProjectReadResponse__AbsolutePathBuf }) + +export type V2ProjectUpdateParams__ProjectRoot = { readonly "path": V2ProjectUpdateParams__AbsolutePathBuf } +export const V2ProjectUpdateParams__ProjectRoot = Schema.Struct({ "path": V2ProjectUpdateParams__AbsolutePathBuf }) + +export type V2ProjectUpdateResponse__ProjectRoot = { readonly "path": V2ProjectUpdateResponse__AbsolutePathBuf } +export const V2ProjectUpdateResponse__ProjectRoot = Schema.Struct({ "path": V2ProjectUpdateResponse__AbsolutePathBuf }) + 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({ "text": Schema.String, "type": Schema.Literal("input_text").annotate({ "title": "InputTextFunctionCallOutputContentItemType" }) }).annotate({ "title": "InputTextFunctionCallOutputContentItem" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__ImageDetail, Schema.Null])), "image_url": Schema.String, "type": Schema.Literal("input_image").annotate({ "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({ "description": "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 } export const V2ReviewStartResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ReviewStartResponse__CollabAgentStatus }) +export type V2ReviewStartResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ReviewStartResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ReviewStartResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ReviewStartResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ReviewStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ReviewStartResponse__NonSteerableTurnKind } } -export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ReviewStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ReviewStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ReviewStartResponse__NonSteerableTurnKind } } +export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ReviewStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ReviewStartResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ReviewStartResponse__PatchChangeKind, readonly "path": string } export const V2ReviewStartResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ReviewStartResponse__PatchChangeKind, "path": Schema.String }) @@ -3933,20 +4686,20 @@ export const V2SkillsListResponse__SkillInterface = Schema.Struct({ "brandColor" export type V2SkillsListResponse__SkillDependencies = { readonly "tools": ReadonlyArray } export const V2SkillsListResponse__SkillDependencies = Schema.Struct({ "tools": Schema.Array(V2SkillsListResponse__SkillToolDependency) }) -export type V2ThreadBackgroundTerminalsListResponse__ThreadBackgroundTerminal = { readonly "command": string, readonly "cpuPercent"?: number | null, readonly "cwd": V2ThreadBackgroundTerminalsListResponse__AbsolutePathBuf, readonly "itemId": string, readonly "osPid"?: number | null, readonly "processId": string, readonly "rssKb"?: number | null } -export const V2ThreadBackgroundTerminalsListResponse__ThreadBackgroundTerminal = Schema.Struct({ "command": Schema.String, "cpuPercent": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "double" }).check(Schema.isFinite()), Schema.Null])), "cwd": V2ThreadBackgroundTerminalsListResponse__AbsolutePathBuf, "itemId": Schema.String, "osPid": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "processId": Schema.String, "rssKb": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) - -export type V2ThreadForkResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadForkResponse__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 V2ThreadForkResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadForkResponse__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 V2ThreadBackgroundTerminalsListResponse__ThreadBackgroundTerminal = { readonly "command": string, readonly "cpuPercent"?: number | null, readonly "cwd": V2ThreadBackgroundTerminalsListResponse__LegacyAppPathString, readonly "itemId": string, readonly "osPid"?: number | null, readonly "processId": string, readonly "rssKb"?: number | null } +export const V2ThreadBackgroundTerminalsListResponse__ThreadBackgroundTerminal = Schema.Struct({ "command": Schema.String, "cpuPercent": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "double" }).check(Schema.isFinite()), Schema.Null])), "cwd": V2ThreadBackgroundTerminalsListResponse__LegacyAppPathString, "itemId": Schema.String, "osPid": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "processId": Schema.String, "rssKb": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) export type V2ThreadForkResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadForkResponse__CollabAgentStatus } export const V2ThreadForkResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadForkResponse__CollabAgentStatus }) +export type V2ThreadForkResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadForkResponse__LegacyAppPathString, 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": V2ThreadForkResponse__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadForkResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadForkResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadForkResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadForkResponse__NonSteerableTurnKind } } -export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadForkResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadForkResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadForkResponse__NonSteerableTurnKind } } +export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadForkResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadForkResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadForkResponse__PatchChangeKind, readonly "path": string } export const V2ThreadForkResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadForkResponse__PatchChangeKind, "path": Schema.String }) @@ -3957,6 +4710,9 @@ export const V2ThreadForkResponse__UserInput = Schema.Union([Schema.Struct({ "te export type V2ThreadForkResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadForkResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadForkResponse__ThreadId } } | { readonly "other": string } export const V2ThreadForkResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadForkResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) +export type V2ThreadForkResponse__ThreadSection = { readonly "appearance"?: V2ThreadForkResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadForkResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + 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()) }) @@ -3966,12 +4722,12 @@ export const V2ThreadGoalSetResponse__ThreadGoal = Schema.Struct({ "createdAt": 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 V2ThreadItemsListResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadItemsListResponse__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 V2ThreadItemsListResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadItemsListResponse__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 V2ThreadItemsListResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadItemsListResponse__CollabAgentStatus } export const V2ThreadItemsListResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadItemsListResponse__CollabAgentStatus }) +export type V2ThreadItemsListResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadItemsListResponse__LegacyAppPathString, 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 V2ThreadItemsListResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadItemsListResponse__LegacyAppPathString, "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 V2ThreadItemsListResponse__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadItemsListResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadItemsListResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) @@ -3981,17 +4737,17 @@ export const V2ThreadItemsListResponse__FileUpdateChange = Schema.Struct({ "diff export type V2ThreadItemsListResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadItemsListResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadItemsListResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } export const V2ThreadItemsListResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadItemsListResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) -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 } export const V2ThreadListResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadListResponse__CollabAgentStatus }) +export type V2ThreadListResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadListResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadListResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadListResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadListResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadListResponse__NonSteerableTurnKind } } -export const V2ThreadListResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadListResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadListResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadListResponse__NonSteerableTurnKind } } +export const V2ThreadListResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadListResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadListResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadListResponse__PatchChangeKind, readonly "path": string } export const V2ThreadListResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadListResponse__PatchChangeKind, "path": Schema.String }) @@ -4002,17 +4758,20 @@ export const V2ThreadListResponse__UserInput = Schema.Union([Schema.Struct({ "te export type V2ThreadListResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadListResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadListResponse__ThreadId } } | { readonly "other": string } export const V2ThreadListResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadListResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadListResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { 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 V2ThreadListResponse__ThreadSection = { readonly "appearance"?: V2ThreadListResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadListResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) export type V2ThreadMetadataUpdateResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadMetadataUpdateResponse__CollabAgentStatus } export const V2ThreadMetadataUpdateResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadMetadataUpdateResponse__CollabAgentStatus }) +export type V2ThreadMetadataUpdateResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadMetadataUpdateResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadMetadataUpdateResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadMetadataUpdateResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadMetadataUpdateResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadMetadataUpdateResponse__NonSteerableTurnKind } } -export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadMetadataUpdateResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadMetadataUpdateResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadMetadataUpdateResponse__NonSteerableTurnKind } } +export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadMetadataUpdateResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadMetadataUpdateResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadMetadataUpdateResponse__PatchChangeKind, readonly "path": string } export const V2ThreadMetadataUpdateResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadMetadataUpdateResponse__PatchChangeKind, "path": Schema.String }) @@ -4023,17 +4782,53 @@ export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union([Schema.St export type V2ThreadMetadataUpdateResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadMetadataUpdateResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadMetadataUpdateResponse__ThreadId } } | { readonly "other": string } export const V2ThreadMetadataUpdateResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadMetadataUpdateResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { 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 V2ThreadMetadataUpdateResponse__ThreadSection = { readonly "appearance"?: V2ThreadMetadataUpdateResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadMetadataUpdateResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + +export type V2ThreadQueueAddParams__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadQueueAddParams__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadQueueAddParams__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadQueueAddParams__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadQueueAddParams__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueAddParams__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueAddParams__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadQueueAddResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadQueueAddResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadQueueAddResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadQueueAddResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadQueueAddResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueAddResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueAddResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadQueueListResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadQueueListResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadQueueListResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadQueueListResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadQueueListResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueListResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueListResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadQueueStartResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadQueueStartResponse__CollabAgentStatus } +export const V2ThreadQueueStartResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadQueueStartResponse__CollabAgentStatus }) + +export type V2ThreadQueueStartResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadQueueStartResponse__LegacyAppPathString, 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 V2ThreadQueueStartResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadQueueStartResponse__LegacyAppPathString, "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 V2ThreadQueueStartResponse__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } +export const V2ThreadQueueStartResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadQueueStartResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) + +export type V2ThreadQueueStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadQueueStartResponse__NonSteerableTurnKind } } +export const V2ThreadQueueStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadQueueStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadQueueStartResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadQueueStartResponse__PatchChangeKind, readonly "path": string } +export const V2ThreadQueueStartResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadQueueStartResponse__PatchChangeKind, "path": Schema.String }) + +export type V2ThreadQueueStartResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadQueueStartResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadQueueStartResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadQueueStartResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadQueueStartResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadQueueUpdateParams__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadQueueUpdateParams__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadQueueUpdateParams__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadQueueUpdateParams__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadQueueUpdateParams__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueUpdateParams__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueUpdateParams__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadQueueUpdateResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadQueueUpdateResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadQueueUpdateResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadQueueUpdateResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadQueueUpdateResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueUpdateResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadQueueUpdateResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) export type V2ThreadReadResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadReadResponse__CollabAgentStatus } export const V2ThreadReadResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadReadResponse__CollabAgentStatus }) +export type V2ThreadReadResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadReadResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadReadResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadReadResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadReadResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadReadResponse__NonSteerableTurnKind } } -export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadReadResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadReadResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadReadResponse__NonSteerableTurnKind } } +export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadReadResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadReadResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadReadResponse__PatchChangeKind, readonly "path": string } export const V2ThreadReadResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadReadResponse__PatchChangeKind, "path": Schema.String }) @@ -4044,6 +4839,15 @@ export const V2ThreadReadResponse__UserInput = Schema.Union([Schema.Struct({ "te export type V2ThreadReadResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadReadResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadReadResponse__ThreadId } } | { readonly "other": string } export const V2ThreadReadResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadReadResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) +export type V2ThreadReadResponse__ThreadSection = { readonly "appearance"?: V2ThreadReadResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadReadResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeItem = { readonly "type": "realtimeSessionStarted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "role": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole, readonly "text": string, readonly "type": "transcriptSegment", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "item_id": string, readonly "presentation": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation, readonly "turn_id": string, readonly "type": "bemItemPromoted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "outcome": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome, readonly "type": "realtimeSessionClosed", readonly "id": string, readonly "realtimeSessionId": string } +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeItem = Schema.Union([Schema.Struct({ "type": Schema.Literal("realtimeSessionStarted").annotate({ "title": "RealtimeSessionStartedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionStartedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "role": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole, "text": Schema.String, "type": Schema.Literal("transcriptSegment").annotate({ "title": "TranscriptSegmentThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "TranscriptSegmentThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "item_id": Schema.String, "presentation": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation, "turn_id": Schema.String, "type": Schema.Literal("bemItemPromoted").annotate({ "title": "BemItemPromotedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "BemItemPromotedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "outcome": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome, "type": Schema.Literal("realtimeSessionClosed").annotate({ "title": "RealtimeSessionClosedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionClosedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." })], { mode: "oneOf" }) + +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeItem = { readonly "type": "realtimeSessionStarted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "role": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole, readonly "text": string, readonly "type": "transcriptSegment", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "item_id": string, readonly "presentation": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation, readonly "turn_id": string, readonly "type": "bemItemPromoted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "outcome": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome, readonly "type": "realtimeSessionClosed", readonly "id": string, readonly "realtimeSessionId": string } +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeItem = Schema.Union([Schema.Struct({ "type": Schema.Literal("realtimeSessionStarted").annotate({ "title": "RealtimeSessionStartedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionStartedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "role": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole, "text": Schema.String, "type": Schema.Literal("transcriptSegment").annotate({ "title": "TranscriptSegmentThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "TranscriptSegmentThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "item_id": Schema.String, "presentation": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation, "turn_id": Schema.String, "type": Schema.Literal("bemItemPromoted").annotate({ "title": "BemItemPromotedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "BemItemPromotedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "outcome": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome, "type": Schema.Literal("realtimeSessionClosed").annotate({ "title": "RealtimeSessionClosedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionClosedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." })], { mode: "oneOf" }) + export type V2ThreadRealtimeListVoicesResponse__RealtimeVoicesList = { readonly "defaultV1": V2ThreadRealtimeListVoicesResponse__RealtimeVoice, readonly "defaultV2": V2ThreadRealtimeListVoicesResponse__RealtimeVoice, readonly "v1": ReadonlyArray, readonly "v2": ReadonlyArray } export const V2ThreadRealtimeListVoicesResponse__RealtimeVoicesList = Schema.Struct({ "defaultV1": V2ThreadRealtimeListVoicesResponse__RealtimeVoice, "defaultV2": V2ThreadRealtimeListVoicesResponse__RealtimeVoice, "v1": Schema.Array(V2ThreadRealtimeListVoicesResponse__RealtimeVoice), "v2": Schema.Array(V2ThreadRealtimeListVoicesResponse__RealtimeVoice) }) @@ -4059,17 +4863,17 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( 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__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadResumeResponse__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 V2ThreadResumeResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadResumeResponse__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 V2ThreadResumeResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadResumeResponse__CollabAgentStatus } export const V2ThreadResumeResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadResumeResponse__CollabAgentStatus }) +export type V2ThreadResumeResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadResumeResponse__LegacyAppPathString, 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": V2ThreadResumeResponse__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadResumeResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadResumeResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadResumeResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadResumeResponse__NonSteerableTurnKind } } -export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadResumeResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadResumeResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadResumeResponse__NonSteerableTurnKind } } +export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadResumeResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadResumeResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadResumeResponse__PatchChangeKind, readonly "path": string } export const V2ThreadResumeResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadResumeResponse__PatchChangeKind, "path": Schema.String }) @@ -4080,17 +4884,44 @@ export const V2ThreadResumeResponse__UserInput = Schema.Union([Schema.Struct({ " export type V2ThreadResumeResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadResumeResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadResumeResponse__ThreadId } } | { readonly "other": string } export const V2ThreadResumeResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadResumeResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { 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 V2ThreadResumeResponse__ThreadSection = { readonly "appearance"?: V2ThreadResumeResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadResumeResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + +export type V2ThreadRevertResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadRevertResponse__CollabAgentStatus } +export const V2ThreadRevertResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadRevertResponse__CollabAgentStatus }) + +export type V2ThreadRevertResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadRevertResponse__LegacyAppPathString, 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 V2ThreadRevertResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadRevertResponse__LegacyAppPathString, "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 V2ThreadRevertResponse__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } +export const V2ThreadRevertResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadRevertResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) + +export type V2ThreadRevertResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadRevertResponse__NonSteerableTurnKind } } +export const V2ThreadRevertResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadRevertResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadRevertResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadRevertResponse__PatchChangeKind, readonly "path": string } +export const V2ThreadRevertResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadRevertResponse__PatchChangeKind, "path": Schema.String }) + +export type V2ThreadRevertResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadRevertResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadRevertResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadRevertResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadRevertResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadRevertResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadRevertResponse__ThreadId } } | { readonly "other": string } +export const V2ThreadRevertResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadRevertResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__ThreadSection = { readonly "appearance"?: V2ThreadRevertResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadRevertResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) export type V2ThreadRollbackResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadRollbackResponse__CollabAgentStatus } export const V2ThreadRollbackResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadRollbackResponse__CollabAgentStatus }) +export type V2ThreadRollbackResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadRollbackResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadRollbackResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadRollbackResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadRollbackResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadRollbackResponse__NonSteerableTurnKind } } -export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadRollbackResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadRollbackResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadRollbackResponse__NonSteerableTurnKind } } +export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadRollbackResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadRollbackResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadRollbackResponse__PatchChangeKind, readonly "path": string } export const V2ThreadRollbackResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadRollbackResponse__PatchChangeKind, "path": Schema.String }) @@ -4101,17 +4932,20 @@ export const V2ThreadRollbackResponse__UserInput = Schema.Union([Schema.Struct({ export type V2ThreadRollbackResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadRollbackResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadRollbackResponse__ThreadId } } | { readonly "other": string } export const V2ThreadRollbackResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadRollbackResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) -export type V2ThreadSearchResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadSearchResponse__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 V2ThreadSearchResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadSearchResponse__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__ThreadSection = { readonly "appearance"?: V2ThreadRollbackResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadRollbackResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) export type V2ThreadSearchResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadSearchResponse__CollabAgentStatus } export const V2ThreadSearchResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadSearchResponse__CollabAgentStatus }) +export type V2ThreadSearchResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadSearchResponse__LegacyAppPathString, 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 V2ThreadSearchResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadSearchResponse__LegacyAppPathString, "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 V2ThreadSearchResponse__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadSearchResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadSearchResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadSearchResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadSearchResponse__NonSteerableTurnKind } } -export const V2ThreadSearchResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadSearchResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadSearchResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadSearchResponse__NonSteerableTurnKind } } +export const V2ThreadSearchResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadSearchResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadSearchResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadSearchResponse__PatchChangeKind, readonly "path": string } export const V2ThreadSearchResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadSearchResponse__PatchChangeKind, "path": Schema.String }) @@ -4122,6 +4956,18 @@ export const V2ThreadSearchResponse__UserInput = Schema.Union([Schema.Struct({ " export type V2ThreadSearchResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadSearchResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadSearchResponse__ThreadId } } | { readonly "other": string } export const V2ThreadSearchResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadSearchResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) +export type V2ThreadSearchResponse__ThreadSection = { readonly "appearance"?: V2ThreadSearchResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadSearchResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + +export type V2ThreadSectionCreateResponse__ThreadSection = { readonly "appearance"?: V2ThreadSectionCreateResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadSectionCreateResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadSectionCreateResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + +export type V2ThreadSectionListResponse__ThreadSection = { readonly "appearance"?: V2ThreadSectionListResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadSectionListResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadSectionListResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + +export type V2ThreadSectionUpdateResponse__ThreadSection = { readonly "appearance"?: V2ThreadSectionUpdateResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadSectionUpdateResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadSectionUpdateResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + 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" }) @@ -4134,17 +4980,17 @@ export const V2ThreadSettingsUpdateParams__SandboxPolicy = Schema.Union([Schema. export type V2ThreadSettingsUpdateParams__Settings = { readonly "developer_instructions"?: string | null, readonly "model": string, readonly "reasoning_effort"?: V2ThreadSettingsUpdateParams__ReasoningEffort | null } export const V2ThreadSettingsUpdateParams__Settings = Schema.Struct({ "developer_instructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "model": Schema.String, "reasoning_effort": Schema.optionalKey(Schema.Union([V2ThreadSettingsUpdateParams__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 } export const V2ThreadStartedNotification__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadStartedNotification__CollabAgentStatus }) +export type V2ThreadStartedNotification__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadStartedNotification__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadStartedNotification__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadStartedNotification__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadStartedNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadStartedNotification__NonSteerableTurnKind } } -export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadStartedNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadStartedNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadStartedNotification__NonSteerableTurnKind } } +export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadStartedNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadStartedNotification__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadStartedNotification__PatchChangeKind, readonly "path": string } export const V2ThreadStartedNotification__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadStartedNotification__PatchChangeKind, "path": Schema.String }) @@ -4155,23 +5001,26 @@ export const V2ThreadStartedNotification__UserInput = Schema.Union([Schema.Struc export type V2ThreadStartedNotification__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadStartedNotification__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadStartedNotification__ThreadId } } | { readonly "other": string } export const V2ThreadStartedNotification__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadStartedNotification__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) +export type V2ThreadStartedNotification__ThreadSection = { readonly "appearance"?: V2ThreadStartedNotification__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadStartedNotification__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + export type V2ThreadStartParams__DynamicToolSpec = { readonly "deferLoading"?: boolean, readonly "description": string, readonly "inputSchema": Schema.Json, 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.Json, "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__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 type V2ThreadStartResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadStartResponse__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 V2ThreadStartResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadStartResponse__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 V2ThreadStartResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadStartResponse__CollabAgentStatus } export const V2ThreadStartResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadStartResponse__CollabAgentStatus }) +export type V2ThreadStartResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadStartResponse__LegacyAppPathString, 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": V2ThreadStartResponse__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadStartResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadStartResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadStartResponse__NonSteerableTurnKind } } -export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadStartResponse__NonSteerableTurnKind } } +export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadStartResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadStartResponse__PatchChangeKind, readonly "path": string } export const V2ThreadStartResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadStartResponse__PatchChangeKind, "path": Schema.String }) @@ -4182,23 +5031,47 @@ export const V2ThreadStartResponse__UserInput = Schema.Union([Schema.Struct({ "t export type V2ThreadStartResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadStartResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadStartResponse__ThreadId } } | { readonly "other": string } export const V2ThreadStartResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadStartResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { mode: "oneOf" }) +export type V2ThreadStartResponse__ThreadSection = { readonly "appearance"?: V2ThreadStartResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadStartResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) + export type V2ThreadStatusChangedNotification__ThreadStatus = { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" } export const V2ThreadStatusChangedNotification__ThreadStatus = Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadStatusChangedNotification__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { mode: "oneOf" }) +export type V2ThreadTimelineListResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadTimelineListResponse__CollabAgentStatus } +export const V2ThreadTimelineListResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadTimelineListResponse__CollabAgentStatus }) + +export type V2ThreadTimelineListResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadTimelineListResponse__LegacyAppPathString, 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 V2ThreadTimelineListResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadTimelineListResponse__LegacyAppPathString, "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 V2ThreadTimelineListResponse__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } +export const V2ThreadTimelineListResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadTimelineListResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) + +export type V2ThreadTimelineListResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadTimelineListResponse__NonSteerableTurnKind } } +export const V2ThreadTimelineListResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadTimelineListResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadTimelineListResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadTimelineListResponse__PatchChangeKind, readonly "path": string } +export const V2ThreadTimelineListResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadTimelineListResponse__PatchChangeKind, "path": Schema.String }) + +export type V2ThreadTimelineListResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadTimelineListResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadTimelineListResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } +export const V2ThreadTimelineListResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadTimelineListResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) + +export type V2ThreadTimelineListResponse__ThreadRealtimeItem = { readonly "type": "realtimeSessionStarted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "role": V2ThreadTimelineListResponse__ThreadRealtimeTranscriptRole, readonly "text": string, readonly "type": "transcriptSegment", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "item_id": string, readonly "presentation": V2ThreadTimelineListResponse__ThreadRealtimeBemItemPresentation, readonly "turn_id": string, readonly "type": "bemItemPromoted", readonly "id": string, readonly "realtimeSessionId": string } | { readonly "outcome": V2ThreadTimelineListResponse__ThreadRealtimeSessionOutcome, readonly "type": "realtimeSessionClosed", readonly "id": string, readonly "realtimeSessionId": string } +export const V2ThreadTimelineListResponse__ThreadRealtimeItem = Schema.Union([Schema.Struct({ "type": Schema.Literal("realtimeSessionStarted").annotate({ "title": "RealtimeSessionStartedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionStartedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "role": V2ThreadTimelineListResponse__ThreadRealtimeTranscriptRole, "text": Schema.String, "type": Schema.Literal("transcriptSegment").annotate({ "title": "TranscriptSegmentThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "TranscriptSegmentThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "item_id": Schema.String, "presentation": V2ThreadTimelineListResponse__ThreadRealtimeBemItemPresentation, "turn_id": Schema.String, "type": Schema.Literal("bemItemPromoted").annotate({ "title": "BemItemPromotedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "BemItemPromotedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." }), Schema.Struct({ "outcome": V2ThreadTimelineListResponse__ThreadRealtimeSessionOutcome, "type": Schema.Literal("realtimeSessionClosed").annotate({ "title": "RealtimeSessionClosedThreadRealtimeItemType" }), "id": Schema.String, "realtimeSessionId": Schema.String }).annotate({ "title": "RealtimeSessionClosedThreadRealtimeItem", "description": "EXPERIMENTAL - a thread-scoped realtime item in the canonical timeline." })], { mode: "oneOf" }) + export type V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = { readonly "last": V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown, readonly "modelContextWindow"?: number | null, readonly "total": V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown } export const V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = Schema.Struct({ "last": V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown, "modelContextWindow": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "total": V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown }) -export type V2ThreadTurnsListResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2ThreadTurnsListResponse__CollabAgentStatus } export const V2ThreadTurnsListResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadTurnsListResponse__CollabAgentStatus }) +export type V2ThreadTurnsListResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadTurnsListResponse__LegacyAppPathString, 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 V2ThreadTurnsListResponse__CommandAction = Schema.Union([Schema.Struct({ "command": Schema.String, "name": Schema.String, "path": V2ThreadTurnsListResponse__LegacyAppPathString, "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 V2ThreadTurnsListResponse__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadTurnsListResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadTurnsListResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadTurnsListResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadTurnsListResponse__NonSteerableTurnKind } } -export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadTurnsListResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadTurnsListResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadTurnsListResponse__NonSteerableTurnKind } } +export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadTurnsListResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadTurnsListResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadTurnsListResponse__PatchChangeKind, readonly "path": string } export const V2ThreadTurnsListResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadTurnsListResponse__PatchChangeKind, "path": Schema.String }) @@ -4206,17 +5079,17 @@ export const V2ThreadTurnsListResponse__FileUpdateChange = Schema.Struct({ "diff export type V2ThreadTurnsListResponse__UserInput = { readonly "text": string, readonly "text_elements"?: ReadonlyArray, readonly "type": "text" } | { readonly "detail"?: V2ThreadTurnsListResponse__ImageDetail | null, readonly "type": "image", readonly "url": string } | { readonly "detail"?: V2ThreadTurnsListResponse__ImageDetail | null, readonly "path": string, readonly "type": "localImage" } | { readonly "type": "audio", readonly "url": string } | { readonly "path": string, readonly "type": "localAudio" } | { readonly "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } export const V2ThreadTurnsListResponse__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2ThreadTurnsListResponse__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "type": Schema.Literal("text").annotate({ "title": "TextUserInputType" }) }).annotate({ "title": "TextUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__ImageDetail, Schema.Null])), "type": Schema.Literal("image").annotate({ "title": "ImageUserInputType" }), "url": Schema.String }).annotate({ "title": "ImageUserInput" }), Schema.Struct({ "detail": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) -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 } export const V2ThreadUnarchiveResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadUnarchiveResponse__CollabAgentStatus }) +export type V2ThreadUnarchiveResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2ThreadUnarchiveResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2ThreadUnarchiveResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2ThreadUnarchiveResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2ThreadUnarchiveResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadUnarchiveResponse__NonSteerableTurnKind } } -export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadUnarchiveResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadUnarchiveResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2ThreadUnarchiveResponse__NonSteerableTurnKind } } +export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2ThreadUnarchiveResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2ThreadUnarchiveResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2ThreadUnarchiveResponse__PatchChangeKind, readonly "path": string } export const V2ThreadUnarchiveResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2ThreadUnarchiveResponse__PatchChangeKind, "path": Schema.String }) @@ -4227,17 +5100,20 @@ export const V2ThreadUnarchiveResponse__UserInput = Schema.Union([Schema.Struct( export type V2ThreadUnarchiveResponse__SubAgentSource = "review" | "compact" | "memory_consolidation" | { readonly "thread_spawn": { readonly "agent_nickname"?: string | null, readonly "agent_path"?: V2ThreadUnarchiveResponse__AgentPath | null, readonly "agent_role"?: string | null, readonly "depth": number, readonly "parent_thread_id": V2ThreadUnarchiveResponse__ThreadId } } | { readonly "other": string } export const V2ThreadUnarchiveResponse__SubAgentSource = Schema.Union([Schema.Literals(["review", "compact", "memory_consolidation"]), Schema.Struct({ "thread_spawn": Schema.Struct({ "agent_nickname": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "agent_path": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__AgentPath, Schema.Null])), "agent_role": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "depth": Schema.Number.annotate({ "format": "int32" }).check(Schema.isInt()), "parent_thread_id": V2ThreadUnarchiveResponse__ThreadId }) }).annotate({ "title": "ThreadSpawnSubAgentSource" }), Schema.Struct({ "other": Schema.String }).annotate({ "title": "OtherSubAgentSource" })], { 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 V2ThreadUnarchiveResponse__ThreadSection = { readonly "appearance"?: V2ThreadUnarchiveResponse__ThreadSectionAppearance | null, readonly "id": string, readonly "name": string } +export const V2ThreadUnarchiveResponse__ThreadSection = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Optional appearance synchronized across clients." })), "id": Schema.String.annotate({ "description": "Opaque UUIDv7 identity that remains stable when the section is renamed." }), "name": Schema.String.annotate({ "description": "The current user-visible section name." }) }).annotate({ "description": "An independently persisted, user-visible thread section." }) export type V2TurnCompletedNotification__CollabAgentState = { readonly "message"?: string | null, readonly "status": V2TurnCompletedNotification__CollabAgentStatus } export const V2TurnCompletedNotification__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2TurnCompletedNotification__CollabAgentStatus }) +export type V2TurnCompletedNotification__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2TurnCompletedNotification__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2TurnCompletedNotification__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2TurnCompletedNotification__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2TurnCompletedNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2TurnCompletedNotification__NonSteerableTurnKind } } -export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2TurnCompletedNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2TurnCompletedNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2TurnCompletedNotification__NonSteerableTurnKind } } +export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2TurnCompletedNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2TurnCompletedNotification__FileUpdateChange = { readonly "diff": string, readonly "kind": V2TurnCompletedNotification__PatchChangeKind, readonly "path": string } export const V2TurnCompletedNotification__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2TurnCompletedNotification__PatchChangeKind, "path": Schema.String }) @@ -4248,17 +5124,17 @@ export const V2TurnCompletedNotification__UserInput = Schema.Union([Schema.Struc export type V2TurnPlanUpdatedNotification__TurnPlanStep = { readonly "status": V2TurnPlanUpdatedNotification__TurnPlanStepStatus, readonly "step": string } export const V2TurnPlanUpdatedNotification__TurnPlanStep = Schema.Struct({ "status": V2TurnPlanUpdatedNotification__TurnPlanStepStatus, "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 } export const V2TurnStartedNotification__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2TurnStartedNotification__CollabAgentStatus }) +export type V2TurnStartedNotification__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2TurnStartedNotification__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2TurnStartedNotification__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2TurnStartedNotification__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2TurnStartedNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2TurnStartedNotification__NonSteerableTurnKind } } -export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2TurnStartedNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2TurnStartedNotification__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2TurnStartedNotification__NonSteerableTurnKind } } +export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2TurnStartedNotification__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2TurnStartedNotification__FileUpdateChange = { readonly "diff": string, readonly "kind": V2TurnStartedNotification__PatchChangeKind, readonly "path": string } export const V2TurnStartedNotification__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2TurnStartedNotification__PatchChangeKind, "path": Schema.String }) @@ -4281,17 +5157,17 @@ export const V2TurnStartParams__Settings = Schema.Struct({ "developer_instructio export type V2TurnStartParams__UserInput = { readonly "text": string, 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 "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } export const V2TurnStartParams__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2TurnStartParams__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { 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 } export const V2TurnStartResponse__CollabAgentState = Schema.Struct({ "message": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2TurnStartResponse__CollabAgentStatus }) +export type V2TurnStartResponse__CommandAction = { readonly "command": string, readonly "name": string, readonly "path": V2TurnStartResponse__LegacyAppPathString, 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__LegacyAppPathString, "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__MemoryCitation = { readonly "entries": ReadonlyArray, readonly "threadIds": ReadonlyArray } export const V2TurnStartResponse__MemoryCitation = Schema.Struct({ "entries": Schema.Array(V2TurnStartResponse__MemoryCitationEntry), "threadIds": Schema.Array(Schema.String) }) -export type V2TurnStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2TurnStartResponse__NonSteerableTurnKind } } -export const V2TurnStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2TurnStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2TurnStartResponse__CodexErrorInfo = "contextWindowExceeded" | "sessionBudgetExceeded" | "usageLimitExceeded" | "serverOverloaded" | "cyberPolicy" | "misalignmentPolicyViolation" | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | "other" | { readonly "httpConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamConnectionFailed": { readonly "httpStatusCode"?: number | null } } | { readonly "responseStreamDisconnected": { readonly "httpStatusCode"?: number | null } } | { readonly "responseTooManyFailedAttempts": { readonly "httpStatusCode"?: number | null } } | { readonly "activeTurnNotSteerable": { readonly "turnKind": V2TurnStartResponse__NonSteerableTurnKind } } +export const V2TurnStartResponse__CodexErrorInfo = Schema.Union([Schema.Literals(["contextWindowExceeded", "sessionBudgetExceeded", "usageLimitExceeded", "serverOverloaded", "cyberPolicy", "misalignmentPolicyViolation", "internalServerError", "unauthorized", "badRequest", "threadRollbackFailed", "sandboxError", "other"]), Schema.Struct({ "httpConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "HttpConnectionFailedCodexErrorInfo" }), Schema.Struct({ "responseStreamConnectionFailed": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamConnectionFailedCodexErrorInfo", "description": "Failed to connect to the response SSE stream." }), Schema.Struct({ "responseStreamDisconnected": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseStreamDisconnectedCodexErrorInfo", "description": "The response SSE stream disconnected in the middle of a turn before completion." }), Schema.Struct({ "responseTooManyFailedAttempts": Schema.Struct({ "httpStatusCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint16" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }) }).annotate({ "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", "description": "Reached the retry limit for responses." }), Schema.Struct({ "activeTurnNotSteerable": Schema.Struct({ "turnKind": V2TurnStartResponse__NonSteerableTurnKind }) }).annotate({ "title": "ActiveTurnNotSteerableCodexErrorInfo", "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`." })], { mode: "oneOf" }).annotate({ "description": "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 V2TurnStartResponse__FileUpdateChange = { readonly "diff": string, readonly "kind": V2TurnStartResponse__PatchChangeKind, readonly "path": string } export const V2TurnStartResponse__FileUpdateChange = Schema.Struct({ "diff": Schema.String, "kind": V2TurnStartResponse__PatchChangeKind, "path": Schema.String }) @@ -4305,23 +5181,32 @@ export const V2TurnSteerParams__AdditionalContextEntry = Schema.Struct({ "kind": export type V2TurnSteerParams__UserInput = { readonly "text": string, 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 "name": string, readonly "path": string, readonly "type": "skill" } | { readonly "name": string, readonly "path": string, readonly "type": "mention" } export const V2TurnSteerParams__UserInput = Schema.Union([Schema.Struct({ "text": Schema.String, "text_elements": Schema.optionalKey(Schema.Array(V2TurnSteerParams__TextElement).annotate({ "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [] })), "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, "type": Schema.Literal("skill").annotate({ "title": "SkillUserInputType" }) }).annotate({ "title": "SkillUserInput" }), Schema.Struct({ "name": Schema.String, "path": Schema.String, "type": Schema.Literal("mention").annotate({ "title": "MentionUserInputType" }) }).annotate({ "title": "MentionUserInput" })], { mode: "oneOf" }) -export type ApplyPatchApprovalResponse__ReviewDecision = "approved" | { readonly "approved_execpolicy_amendment": { readonly "proposed_execpolicy_amendment": ReadonlyArray } } | "approved_for_session" | { readonly "network_policy_amendment": { readonly "network_policy_amendment": ApplyPatchApprovalResponse__NetworkPolicyAmendment } } | { readonly "denied": { readonly "rejection": string } } | "timed_out" | "abort" -export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union([Schema.Literal("approved").annotate({ "description": "User has approved this command and the agent should execute it." }), Schema.Struct({ "approved_execpolicy_amendment": Schema.Struct({ "proposed_execpolicy_amendment": Schema.Array(Schema.String) }) }).annotate({ "title": "ApprovedExecpolicyAmendmentReviewDecision", "description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted." }), Schema.Literal("approved_for_session").annotate({ "description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session." }), Schema.Struct({ "network_policy_amendment": Schema.Struct({ "network_policy_amendment": ApplyPatchApprovalResponse__NetworkPolicyAmendment }) }).annotate({ "title": "NetworkPolicyAmendmentReviewDecision", "description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host." }), Schema.Struct({ "denied": Schema.Struct({ "rejection": Schema.String }) }).annotate({ "title": "DeniedReviewDecision", "description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else." }), Schema.Literal("timed_out").annotate({ "description": "Automatic approval review timed out before reaching a decision." }), Schema.Literal("abort").annotate({ "description": "User has denied this command and the agent should not do anything until the user's next command." })], { mode: "oneOf" }).annotate({ "description": "User's decision in response to an ExecApprovalRequest." }) +export type ApplyPatchApprovalResponse__ReviewDecision = "approved" | { readonly "approved_execpolicy_amendment": { readonly "proposed_execpolicy_amendment": ReadonlyArray } } | "approved_for_session" | "approved_mcp_policy_amendment" | { readonly "network_policy_amendment": { readonly "network_policy_amendment": ApplyPatchApprovalResponse__NetworkPolicyAmendment } } | { readonly "denied": { readonly "rejection": string } } | "timed_out" | "abort" +export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union([Schema.Literal("approved").annotate({ "description": "User has approved this command and the agent should execute it." }), Schema.Struct({ "approved_execpolicy_amendment": Schema.Struct({ "proposed_execpolicy_amendment": Schema.Array(Schema.String) }) }).annotate({ "title": "ApprovedExecpolicyAmendmentReviewDecision", "description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted." }), Schema.Literal("approved_for_session").annotate({ "description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session." }), Schema.Literal("approved_mcp_policy_amendment").annotate({ "description": "User has approved this MCP tool call and wants to amend its policy so matching future calls are automatically approved across sessions." }), Schema.Struct({ "network_policy_amendment": Schema.Struct({ "network_policy_amendment": ApplyPatchApprovalResponse__NetworkPolicyAmendment }) }).annotate({ "title": "NetworkPolicyAmendmentReviewDecision", "description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host." }), Schema.Struct({ "denied": Schema.Struct({ "rejection": Schema.String }) }).annotate({ "title": "DeniedReviewDecision", "description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else." }), Schema.Literal("timed_out").annotate({ "description": "Automatic approval review timed out before reaching a decision." }), Schema.Literal("abort").annotate({ "description": "User has denied this command and the agent should not do anything until the user's next command." })], { mode: "oneOf" }).annotate({ "description": "User's decision in response to an ExecApprovalRequest." }) + +export type ClientRequest__ProjectCreateParams = { readonly "idempotencyKey": string, readonly "metadata"?: { readonly [x: string]: string } | null, readonly "name": string, readonly "roots": ReadonlyArray } +export const ClientRequest__ProjectCreateParams = Schema.Struct({ "idempotencyKey": Schema.String, "metadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "name": Schema.String, "roots": Schema.Array(ClientRequest__ProjectRoot) }) + +export type ClientRequest__ProjectImportParams = { readonly "idempotencyKey": string, readonly "metadata"?: { readonly [x: string]: string } | null, readonly "name": string, readonly "roots": ReadonlyArray, readonly "threads"?: ReadonlyArray | null } +export const ClientRequest__ProjectImportParams = Schema.Struct({ "idempotencyKey": Schema.String, "metadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "name": Schema.String, "roots": Schema.Array(ClientRequest__ProjectRoot), "threads": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])) }) + +export type ClientRequest__ProjectUpdateParams = { readonly "metadata"?: { readonly [x: string]: string } | null, readonly "name"?: string | null, readonly "projectId": string, readonly "roots"?: ReadonlyArray | null } +export const ClientRequest__ProjectUpdateParams = Schema.Struct({ "metadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "name": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "projectId": Schema.String, "roots": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ProjectRoot), Schema.Null])) }) export type ClientRequest__CommandExecParams = { readonly "command": ReadonlyArray, readonly "cwd"?: string | null, readonly "disableOutputCap"?: boolean, readonly "disableTimeout"?: boolean, readonly "env"?: { readonly [x: string]: string | null } | null, readonly "outputBytesCap"?: number | null, readonly "permissionProfile"?: string | null, readonly "processId"?: string | null, readonly "sandboxPolicy"?: ClientRequest__SandboxPolicy | null, readonly "size"?: ClientRequest__CommandExecTerminalSize | null, readonly "streamStdin"?: boolean, readonly "streamStdoutStderr"?: boolean, readonly "timeoutMs"?: number | null, readonly "tty"?: boolean } export const ClientRequest__CommandExecParams = Schema.Struct({ "command": Schema.Array(Schema.String).annotate({ "description": "Command argv vector. Empty arrays are rejected." }), "cwd": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional working directory. Defaults to the server cwd." }), Schema.Null])), "disableOutputCap": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`." })), "disableTimeout": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`." })), "env": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Union([Schema.String, Schema.Null])).annotate({ "description": "Optional environment overrides merged into the server-computed environment.\n\nMatching names override inherited values. Set a key to `null` to unset an inherited variable." }), Schema.Null])), "outputBytesCap": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.", "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "permissionProfile": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional active permissions profile id for this command.\n\nDefaults to the user's configured permissions when omitted. Cannot be combined with `sandboxPolicy`." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional client-supplied, connection-scoped process id.\n\nRequired for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up `command/exec/write`, `command/exec/resize`, and `command/exec/terminate` calls. When omitted, buffered execution gets an internal id that is not exposed to the client." }), Schema.Null])), "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`." })), "size": Schema.optionalKey(Schema.Union([ClientRequest__CommandExecTerminalSize, Schema.Null]).annotate({ "description": "Optional initial PTY size in character cells. Only valid when `tty` is true." })), "streamStdin": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`." })), "streamStdoutStderr": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Stream stdout/stderr via `command/exec/outputDelta` notifications.\n\nStreamed bytes are not duplicated into the final response and require a client-supplied `processId`." })), "timeoutMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "tty": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`." })) }).annotate({ "description": "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__ThreadRealtimeStartParams = { readonly "clientManagedHandoffs"?: boolean | null, readonly "codexResponseHandoffChannelPrefixes"?: { readonly [x: string]: ReadonlyArray } | null, readonly "codexResponseHandoffMode"?: ClientRequest__CodexResponseHandoffMode | null, readonly "codexResponseItemPrefix"?: string | null, readonly "codexResponsesAsItems"?: boolean | null, readonly "flushTranscriptTailOnSessionEnd"?: boolean | null, readonly "includeStartupContext"?: boolean | null, readonly "initialItems"?: ReadonlyArray | null, readonly "model"?: string | null, readonly "outputModality": "text" | "audio", readonly "prompt"?: string | null, readonly "realtimeSessionId"?: string | null, readonly "threadId": string, readonly "transport"?: ClientRequest__ThreadRealtimeStartTransport | null, readonly "version"?: ClientRequest__RealtimeConversationVersion | null, readonly "voice"?: ClientRequest__RealtimeVoice | null } -export const ClientRequest__ThreadRealtimeStartParams = Schema.Struct({ "clientManagedHandoffs": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Leaves Codex response handoffs to the client's explicit append calls instead of forwarding them automatically. Defaults to false." }), Schema.Null])), "codexResponseHandoffChannelPrefixes": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Array(Schema.String)).annotate({ "description": "Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`. Omitted channels retain their default uppercase bracketed prefixes." }), Schema.Null])), "codexResponseHandoffMode": Schema.optionalKey(Schema.Union([ClientRequest__CodexResponseHandoffMode, Schema.Null]).annotate({ "description": "Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values default to `thinking`. Realtime V1 and V2 ignore this setting." })), "codexResponseItemPrefix": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional prefix added to automatic Codex response items when `codexResponsesAsItems` is true." }), Schema.Null])), "codexResponsesAsItems": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Sends automatic Codex responses as realtime conversation items instead of handoff appends." }), Schema.Null])), "flushTranscriptTailOnSessionEnd": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Routes any transcript tail remaining at session end through Codex. Defaults to false. TODO: Remove this rollout knob once transcript-tail flushing is always enabled." }), Schema.Null])), "includeStartupContext": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Set to false to start without Codex's startup context. Omitted or null includes it." }), Schema.Null])), "initialItems": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ThreadRealtimeInitialItem).annotate({ "description": "Adds complete role-bearing text items to the initial Frameless Bidi session history. This is only supported by realtime V3 and is sent during session startup. Requests are limited to 128 items and 8,192 estimated text tokens in total." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Overrides the configured realtime model for this session only." }), Schema.Null])), "outputModality": Schema.Literals(["text", "audio"]).annotate({ "description": "Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits." }), "prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "realtimeSessionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String, "transport": Schema.optionalKey(Schema.Union([ClientRequest__ThreadRealtimeStartTransport, Schema.Null])), "version": Schema.optionalKey(Schema.Union([ClientRequest__RealtimeConversationVersion, Schema.Null]).annotate({ "description": "Overrides the configured realtime protocol version for this session only." })), "voice": Schema.optionalKey(Schema.Union([ClientRequest__RealtimeVoice, Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - start a thread-scoped realtime session." }) +export type ClientRequest__ThreadRealtimeStartParams = { readonly "clientManagedHandoffs"?: boolean | null, readonly "codexResponseHandoffChannelPrefixes"?: { readonly [x: string]: ReadonlyArray } | null, readonly "codexResponseHandoffMode"?: ClientRequest__CodexResponseHandoffMode | null, readonly "codexResponseItemPrefix"?: string | null, readonly "codexResponsesAsItems"?: boolean | null, readonly "delegationAckFiller"?: boolean | null, readonly "flushTranscriptTailOnSessionEnd"?: boolean | null, readonly "includeStartupContext"?: boolean | null, readonly "initialItems"?: ReadonlyArray | null, readonly "model"?: string | null, readonly "outputModality": "text" | "audio", readonly "prompt"?: string | null, readonly "realtimeEndInstructions"?: string | null, readonly "realtimeSessionId"?: string | null, readonly "realtimeStartInstructions"?: string | null, readonly "threadId": string, readonly "transport"?: ClientRequest__ThreadRealtimeStartTransport | null, readonly "version"?: ClientRequest__RealtimeConversationVersion | null, readonly "voice"?: ClientRequest__RealtimeVoice | null } +export const ClientRequest__ThreadRealtimeStartParams = Schema.Struct({ "clientManagedHandoffs": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Leaves Codex response handoffs to the client's explicit append calls instead of forwarding them automatically. Defaults to false." }), Schema.Null])), "codexResponseHandoffChannelPrefixes": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Array(Schema.String)).annotate({ "description": "Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`. Omitted channels retain their default uppercase bracketed prefixes." }), Schema.Null])), "codexResponseHandoffMode": Schema.optionalKey(Schema.Union([ClientRequest__CodexResponseHandoffMode, Schema.Null]).annotate({ "description": "Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values default to `thinking`. Realtime V1 and V2 ignore this setting." })), "codexResponseItemPrefix": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional prefix added to automatic Codex response items when `codexResponsesAsItems` is true." }), Schema.Null])), "codexResponsesAsItems": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Sends automatic Codex responses as realtime conversation items instead of handoff appends." }), Schema.Null])), "delegationAckFiller": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Controls whether a realtime V3 delegation produces an acknowledgement filler. Omitted values preserve the Realtime API's default behavior." }), Schema.Null])), "flushTranscriptTailOnSessionEnd": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Routes any transcript tail remaining at session end through Codex. Defaults to false. TODO: Remove this rollout knob once transcript-tail flushing is always enabled." }), Schema.Null])), "includeStartupContext": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Set to false to start without Codex's startup context. Omitted or null includes it." }), Schema.Null])), "initialItems": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__ThreadRealtimeInitialItem).annotate({ "description": "Adds complete role-bearing text items to the initial Frameless Bidi session history. This is only supported by realtime V3 and is sent during session startup. Requests are limited to 128 items and 8,192 estimated text tokens in total." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Overrides the configured realtime model for this session only." }), Schema.Null])), "outputModality": Schema.Literals(["text", "audio"]).annotate({ "description": "Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits." }), "prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "realtimeEndInstructions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Developer instructions given to the backing Codex model when this realtime session ends." }), Schema.Null])), "realtimeSessionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "realtimeStartInstructions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Developer instructions given to the backing Codex model when this realtime session starts." }), Schema.Null])), "threadId": Schema.String, "transport": Schema.optionalKey(Schema.Union([ClientRequest__ThreadRealtimeStartTransport, Schema.Null])), "version": Schema.optionalKey(Schema.Union([ClientRequest__RealtimeConversationVersion, Schema.Null]).annotate({ "description": "Overrides the configured realtime protocol version for this session only." })), "voice": Schema.optionalKey(Schema.Union([ClientRequest__RealtimeVoice, Schema.Null])) }).annotate({ "description": "EXPERIMENTAL - start a thread-scoped realtime session." }) -export type ClientRequest__ExternalAgentConfigImportTypeResult = { readonly "failures": ReadonlyArray, readonly "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, readonly "successes": ReadonlyArray } -export const ClientRequest__ExternalAgentConfigImportTypeResult = Schema.Struct({ "failures": Schema.Array(ClientRequest__ExternalAgentConfigImportItemTypeFailure), "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, "successes": Schema.Array(ClientRequest__ExternalAgentConfigImportItemTypeSuccess) }) +export type ClientRequest__ExternalAgentConfigImportHistoryRecordTypeResultParams = { readonly "failures": ReadonlyArray, readonly "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, readonly "successes": ReadonlyArray } +export const ClientRequest__ExternalAgentConfigImportHistoryRecordTypeResultParams = Schema.Struct({ "failures": Schema.Array(ClientRequest__ExternalAgentConfigImportItemTypeFailure), "itemType": ClientRequest__ExternalAgentConfigMigrationItemType, "successes": Schema.Array(ClientRequest__ExternalAgentConfigImportHistoryRecordSuccessParams) }) export type ClientRequest__FunctionCallOutputBody = string | ReadonlyArray export const ClientRequest__FunctionCallOutputBody = Schema.Union([Schema.String, Schema.Array(ClientRequest__FunctionCallOutputContentItem)]) -export type ClientRequest__ThreadStartParams = { readonly "allowProviderModelFallback"?: boolean, readonly "approvalPolicy"?: ClientRequest__AskForApproval | null, readonly "approvalsReviewer"?: ClientRequest__ApprovalsReviewer | null, readonly "baseInstructions"?: string | null, readonly "config"?: { readonly [x: string]: Schema.Json } | null, readonly "cwd"?: string | null, readonly "developerInstructions"?: string | null, readonly "dynamicTools"?: ReadonlyArray | null, readonly "environments"?: ReadonlyArray | null, readonly "ephemeral"?: boolean | null, readonly "experimentalRawEvents"?: boolean, readonly "historyMode"?: ClientRequest__ThreadHistoryMode | null, readonly "mockExperimentalField"?: string | null, readonly "model"?: string | null, readonly "modelProvider"?: string | null, readonly "multiAgentMode"?: ClientRequest__MultiAgentMode | null, readonly "permissions"?: string | null, readonly "personality"?: ClientRequest__Personality | null, readonly "runtimeWorkspaceRoots"?: ReadonlyArray | null, readonly "sandbox"?: ClientRequest__SandboxMode | null, readonly "selectedCapabilityRoots"?: ReadonlyArray | null, readonly "serviceName"?: string | null, readonly "serviceTier"?: string | null, readonly "sessionStartSource"?: ClientRequest__ThreadStartSource | null, readonly "threadSource"?: ClientRequest__ThreadSource | null } -export const ClientRequest__ThreadStartParams = Schema.Struct({ "allowProviderModelFallback": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default." })), "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.Json), Schema.Null])), "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "developerInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "dynamicTools": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__DynamicToolSpec), Schema.Null])), "environments": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__TurnEnvironmentParams).annotate({ "description": "Optional sticky environments for this thread.\n\nOmitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment." }), Schema.Null])), "ephemeral": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "experimentalRawEvents": Schema.optionalKey(Schema.Boolean.annotate({ "description": "If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud)." })), "historyMode": Schema.optionalKey(Schema.Union([ClientRequest__ThreadHistoryMode, Schema.Null]).annotate({ "description": "Persisted thread history contract to use for this new thread." })), "mockExperimentalField": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "modelProvider": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "multiAgentMode": Schema.optionalKey(Schema.Union([ClientRequest__MultiAgentMode, Schema.Null]).annotate({ "description": "@deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior." })), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Named profile id for this thread. Cannot be combined with `sandbox`." }), Schema.Null])), "personality": Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ "description": "Replace the thread's runtime workspace roots. Paths must be absolute." }), Schema.Null])), "sandbox": Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), "selectedCapabilityRoots": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__SelectedCapabilityRoot).annotate({ "description": "Capability roots selected for this thread by the hosting platform." }), Schema.Null])), "serviceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "serviceTier": Schema.optionalKey(Schema.Union([Schema.String, 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__ThreadStartParams = { readonly "allowProviderModelFallback"?: boolean, readonly "approvalPolicy"?: ClientRequest__AskForApproval | null, readonly "approvalsReviewer"?: ClientRequest__ApprovalsReviewer | null, readonly "baseInstructions"?: string | null, readonly "config"?: { readonly [x: string]: Schema.Json } | null, readonly "cwd"?: string | null, readonly "developerInstructions"?: string | null, readonly "dynamicTools"?: ReadonlyArray | null, readonly "environments"?: ReadonlyArray | null, readonly "ephemeral"?: boolean | null, readonly "experimentalRawEvents"?: boolean, readonly "historyMode"?: ClientRequest__ThreadHistoryMode | null, readonly "mockExperimentalField"?: string | null, readonly "model"?: string | null, readonly "modelProvider"?: string | null, readonly "multiAgentMode"?: ClientRequest__MultiAgentMode | null, readonly "permissions"?: string | null, readonly "personality"?: ClientRequest__Personality | null, readonly "projectId"?: string | null, readonly "runtimeWorkspaceRoots"?: ReadonlyArray | null, readonly "sandbox"?: ClientRequest__SandboxMode | null, readonly "selectedCapabilityRoots"?: ReadonlyArray | null, readonly "serviceName"?: string | null, readonly "serviceTier"?: string | null, readonly "sessionStartSource"?: ClientRequest__ThreadStartSource | null, readonly "threadSource"?: ClientRequest__ThreadSource | null } +export const ClientRequest__ThreadStartParams = Schema.Struct({ "allowProviderModelFallback": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default." })), "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.Json), Schema.Null])), "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "developerInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "dynamicTools": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__DynamicToolSpec), Schema.Null])), "environments": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__TurnEnvironmentParams).annotate({ "description": "Optional sticky environments for this thread.\n\nOmitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment." }), Schema.Null])), "ephemeral": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "experimentalRawEvents": Schema.optionalKey(Schema.Boolean.annotate({ "description": "If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud)." })), "historyMode": Schema.optionalKey(Schema.Union([ClientRequest__ThreadHistoryMode, Schema.Null]).annotate({ "description": "Persisted thread history contract to use for this new thread." })), "mockExperimentalField": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "modelProvider": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "multiAgentMode": Schema.optionalKey(Schema.Union([ClientRequest__MultiAgentMode, Schema.Null]).annotate({ "description": "@deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior." })), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Named profile id for this thread. Cannot be combined with `sandbox`." }), Schema.Null])), "personality": Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])), "projectId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional project identity for this new thread. Durable threads persist the assignment; ephemeral threads expose it only in live responses." }), Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ "description": "Replace the thread's runtime workspace roots. Paths must be absolute." }), Schema.Null])), "sandbox": Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), "selectedCapabilityRoots": Schema.optionalKey(Schema.Union([Schema.Array(ClientRequest__SelectedCapabilityRoot).annotate({ "description": "Capability roots selected for this thread by the hosting platform." }), Schema.Null])), "serviceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "serviceTier": Schema.optionalKey(Schema.Union([Schema.String, 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__ConfigBatchWriteParams = { readonly "edits": ReadonlyArray, readonly "expectedVersion"?: string | null, readonly "filePath"?: string | null, readonly "reloadUserConfig"?: boolean } export const ClientRequest__ConfigBatchWriteParams = Schema.Struct({ "edits": Schema.Array(ClientRequest__ConfigEdit), "expectedVersion": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "filePath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Path to the config file to write; defaults to the user's `config.toml` when omitted." }), Schema.Null])), "reloadUserConfig": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, hot-reload updated runtime settings into loaded threads after writing. Session-static model, reasoning-effort, Plan-mode reasoning-effort, service-tier, and personality defaults are not reloaded." })) }) @@ -4338,6 +5223,12 @@ export const ClientRequest__CollaborationMode = Schema.Struct({ "mode": ClientRe 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__ThreadQueueAddParams = { readonly "clientUserMessageId": string, readonly "input": ReadonlyArray, readonly "threadId": string } +export const ClientRequest__ThreadQueueAddParams = Schema.Struct({ "clientUserMessageId": Schema.String, "input": Schema.Array(ClientRequest__UserInput), "threadId": Schema.String }) + +export type ClientRequest__ThreadQueueUpdateParams = { readonly "input": ReadonlyArray, readonly "queuedSubmissionId": string, readonly "threadId": string } +export const ClientRequest__ThreadQueueUpdateParams = Schema.Struct({ "input": Schema.Array(ClientRequest__UserInput), "queuedSubmissionId": Schema.String, "threadId": Schema.String }) + export type ClientRequest__TurnSteerParams = { readonly "additionalContext"?: { readonly [x: string]: ClientRequest__AdditionalContextEntry } | null, readonly "clientUserMessageId"?: string | null, readonly "expectedTurnId": string, readonly "input": ReadonlyArray, readonly "responsesapiClientMetadata"?: { readonly [x: string]: string } | null, readonly "threadId": string } export const ClientRequest__TurnSteerParams = Schema.Struct({ "additionalContext": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, ClientRequest__AdditionalContextEntry).annotate({ "description": "Optional client-provided context fragments keyed by an opaque source identifier." }), Schema.Null])), "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." }), "input": Schema.Array(ClientRequest__UserInput), "responsesapiClientMetadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String).annotate({ "description": "Optional metadata to enrich Codex's ResponsesAPI turn metadata.\n\nEntries are flattened into the JSON string sent as `client_metadata[\"x-codex-turn-metadata\"]` on ResponsesAPI HTTP and websocket requests.\n\nThey are not sent as top-level ResponsesAPI `client_metadata` keys, and reserved keys such as `session_id`, `thread_id`, `turn_id`, and `window_id` cannot be overridden." }), Schema.Null])), "threadId": Schema.String }) @@ -4350,8 +5241,8 @@ export const CommandExecutionRequestApprovalParams__CommandExecutionApprovalDeci export type CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision = "accept" | "acceptForSession" | { readonly "acceptWithExecpolicyAmendment": { readonly "execpolicy_amendment": ReadonlyArray } } | { readonly "applyNetworkPolicyAmendment": { readonly "network_policy_amendment": CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment } } | "decline" | "cancel" export const CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision = Schema.Union([Schema.Literal("accept").annotate({ "description": "User approved the command." }), Schema.Literal("acceptForSession").annotate({ "description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting." }), Schema.Struct({ "acceptWithExecpolicyAmendment": Schema.Struct({ "execpolicy_amendment": Schema.Array(Schema.String) }) }).annotate({ "title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision", "description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting." }), Schema.Struct({ "applyNetworkPolicyAmendment": Schema.Struct({ "network_policy_amendment": CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment }) }).annotate({ "title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision", "description": "User chose a persistent network policy rule (allow/deny) for this host." }), Schema.Literal("decline").annotate({ "description": "User denied the command. The agent will continue the turn." }), Schema.Literal("cancel").annotate({ "description": "User denied the command. The turn will also be immediately interrupted." })], { mode: "oneOf" }) -export type ExecCommandApprovalResponse__ReviewDecision = "approved" | { readonly "approved_execpolicy_amendment": { readonly "proposed_execpolicy_amendment": ReadonlyArray } } | "approved_for_session" | { readonly "network_policy_amendment": { readonly "network_policy_amendment": ExecCommandApprovalResponse__NetworkPolicyAmendment } } | { readonly "denied": { readonly "rejection": string } } | "timed_out" | "abort" -export const ExecCommandApprovalResponse__ReviewDecision = Schema.Union([Schema.Literal("approved").annotate({ "description": "User has approved this command and the agent should execute it." }), Schema.Struct({ "approved_execpolicy_amendment": Schema.Struct({ "proposed_execpolicy_amendment": Schema.Array(Schema.String) }) }).annotate({ "title": "ApprovedExecpolicyAmendmentReviewDecision", "description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted." }), Schema.Literal("approved_for_session").annotate({ "description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session." }), Schema.Struct({ "network_policy_amendment": Schema.Struct({ "network_policy_amendment": ExecCommandApprovalResponse__NetworkPolicyAmendment }) }).annotate({ "title": "NetworkPolicyAmendmentReviewDecision", "description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host." }), Schema.Struct({ "denied": Schema.Struct({ "rejection": Schema.String }) }).annotate({ "title": "DeniedReviewDecision", "description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else." }), Schema.Literal("timed_out").annotate({ "description": "Automatic approval review timed out before reaching a decision." }), Schema.Literal("abort").annotate({ "description": "User has denied this command and the agent should not do anything until the user's next command." })], { mode: "oneOf" }).annotate({ "description": "User's decision in response to an ExecApprovalRequest." }) +export type ExecCommandApprovalResponse__ReviewDecision = "approved" | { readonly "approved_execpolicy_amendment": { readonly "proposed_execpolicy_amendment": ReadonlyArray } } | "approved_for_session" | "approved_mcp_policy_amendment" | { readonly "network_policy_amendment": { readonly "network_policy_amendment": ExecCommandApprovalResponse__NetworkPolicyAmendment } } | { readonly "denied": { readonly "rejection": string } } | "timed_out" | "abort" +export const ExecCommandApprovalResponse__ReviewDecision = Schema.Union([Schema.Literal("approved").annotate({ "description": "User has approved this command and the agent should execute it." }), Schema.Struct({ "approved_execpolicy_amendment": Schema.Struct({ "proposed_execpolicy_amendment": Schema.Array(Schema.String) }) }).annotate({ "title": "ApprovedExecpolicyAmendmentReviewDecision", "description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted." }), Schema.Literal("approved_for_session").annotate({ "description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session." }), Schema.Literal("approved_mcp_policy_amendment").annotate({ "description": "User has approved this MCP tool call and wants to amend its policy so matching future calls are automatically approved across sessions." }), Schema.Struct({ "network_policy_amendment": Schema.Struct({ "network_policy_amendment": ExecCommandApprovalResponse__NetworkPolicyAmendment }) }).annotate({ "title": "NetworkPolicyAmendmentReviewDecision", "description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host." }), Schema.Struct({ "denied": Schema.Struct({ "rejection": Schema.String }) }).annotate({ "title": "DeniedReviewDecision", "description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else." }), Schema.Literal("timed_out").annotate({ "description": "Automatic approval review timed out before reaching a decision." }), Schema.Literal("abort").annotate({ "description": "User has denied this command and the agent should not do anything until the user's next command." })], { mode: "oneOf" }).annotate({ "description": "User's decision in response to an ExecApprovalRequest." }) export type McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema = { readonly "default"?: ReadonlyArray | null, readonly "description"?: string | null, readonly "items": McpServerElicitationRequestParams__McpElicitationTitledEnumItems, readonly "maxItems"?: number | null, readonly "minItems"?: number | null, readonly "title"?: string | null, readonly "type": McpServerElicitationRequestParams__McpElicitationArrayType } export const McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema = Schema.Struct({ "default": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "description": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "items": McpServerElicitationRequestParams__McpElicitationTitledEnumItems, "maxItems": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "minItems": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "title": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": McpServerElicitationRequestParams__McpElicitationArrayType }) @@ -4395,8 +5286,8 @@ export const ServerNotification__CollaborationMode = Schema.Struct({ "mode": Ser 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" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: ServerNotification__MemoryCitation | null, readonly "phase"?: ServerNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": ServerNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": ServerNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: ServerNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: ServerNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: ServerNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: ServerNotification__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(ServerNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([ServerNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([ServerNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(ServerNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": ServerNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(ServerNotification__FileUpdateChange), "id": Schema.String, "status": ServerNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([ServerNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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])), "server": Schema.String, "status": ServerNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(ServerNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, ServerNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type ServerNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: ServerNotification__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: ServerNotification__MemoryCitation | null, readonly "phase"?: ServerNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": ServerNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": ServerNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: ServerNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: ServerNotification__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: ServerNotification__McpToolCallResult | null, readonly "server": string, readonly "status": ServerNotification__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: ServerNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: ServerNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: ServerNotification__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: ServerNotification__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(ServerNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([ServerNotification__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([ServerNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([ServerNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(ServerNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": ServerNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(ServerNotification__FileUpdateChange), "id": Schema.String, "status": ServerNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([ServerNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([ServerNotification__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": ServerNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(ServerNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, ServerNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([ServerNotification__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([ServerNotification__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type ServerNotification__ConfigWarningNotification = { readonly "details"?: string | null, readonly "path"?: string | null, readonly "range"?: ServerNotification__TextRange | null, readonly "summary": string } export const ServerNotification__ConfigWarningNotification = Schema.Struct({ "details": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional extra guidance or error details." }), Schema.Null])), "path": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional path to the config file that triggered the warning." }), Schema.Null])), "range": Schema.optionalKey(Schema.Union([ServerNotification__TextRange, Schema.Null]).annotate({ "description": "Optional range for the error location inside the config file." })), "summary": Schema.String.annotate({ "description": "Concise summary of the warning." }) }) @@ -4407,6 +5298,12 @@ export const ServerNotification__ThreadStatusChangedNotification = Schema.Struct 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__ThreadRealtimeItemCompletedNotification = { readonly "item": ServerNotification__ThreadRealtimeItem, readonly "threadId": string } +export const ServerNotification__ThreadRealtimeItemCompletedNotification = Schema.Struct({ "item": ServerNotification__ThreadRealtimeItem, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - a realtime timeline item published after canonical commit." }) + +export type ServerNotification__ThreadRealtimeItemStartedNotification = { readonly "item": ServerNotification__ThreadRealtimeItem, readonly "threadId": string } +export const ServerNotification__ThreadRealtimeItemStartedNotification = Schema.Struct({ "item": ServerNotification__ThreadRealtimeItem, "threadId": Schema.String }).annotate({ "description": "EXPERIMENTAL - a realtime timeline item started before its content streams." }) + export type ServerNotification__ThreadTokenUsageUpdatedNotification = { readonly "threadId": string, readonly "tokenUsage": ServerNotification__ThreadTokenUsage, readonly "turnId": string } export const ServerNotification__ThreadTokenUsageUpdatedNotification = Schema.Struct({ "threadId": Schema.String, "tokenUsage": ServerNotification__ThreadTokenUsage, "turnId": Schema.String }) @@ -4428,8 +5325,8 @@ export const ServerRequest__McpElicitationSingleSelectEnumSchema = Schema.Union( export type ServerRequest__CommandExecutionApprovalDecision = "accept" | "acceptForSession" | { readonly "acceptWithExecpolicyAmendment": { readonly "execpolicy_amendment": ReadonlyArray } } | { readonly "applyNetworkPolicyAmendment": { readonly "network_policy_amendment": ServerRequest__NetworkPolicyAmendment } } | "decline" | "cancel" export const ServerRequest__CommandExecutionApprovalDecision = Schema.Union([Schema.Literal("accept").annotate({ "description": "User approved the command." }), Schema.Literal("acceptForSession").annotate({ "description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting." }), Schema.Struct({ "acceptWithExecpolicyAmendment": Schema.Struct({ "execpolicy_amendment": Schema.Array(Schema.String) }) }).annotate({ "title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision", "description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting." }), Schema.Struct({ "applyNetworkPolicyAmendment": Schema.Struct({ "network_policy_amendment": ServerRequest__NetworkPolicyAmendment }) }).annotate({ "title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision", "description": "User chose a persistent network policy rule (allow/deny) for this host." }), Schema.Literal("decline").annotate({ "description": "User denied the command. The agent will continue the turn." }), Schema.Literal("cancel").annotate({ "description": "User denied the command. The turn will also be immediately interrupted." })], { mode: "oneOf" }) -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, "turnId": Schema.String }).annotate({ "description": "EXPERIMENTAL. Params sent with a request_user_input event." }) +export type ServerRequest__ToolRequestUserInputParams = { readonly "autoResolutionMs"?: number | null, readonly "isBlocking": boolean, 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({ "description": "@deprecated Use `isBlocking` to decide whether the request should block.", "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "isBlocking": Schema.Boolean, "itemId": Schema.String, "questions": Schema.Array(ServerRequest__ToolRequestUserInputQuestion), "threadId": Schema.String, "turnId": Schema.String }).annotate({ "description": "EXPERIMENTAL. Params sent with a request_user_input event." }) export type V2AppListUpdatedNotification__AppInfo = { readonly "appMetadata"?: V2AppListUpdatedNotification__AppMetadata | null, 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, readonly "isEnabled"?: boolean, readonly "labels"?: { readonly [x: string]: string } | null, readonly "logoUrl"?: string | null, readonly "logoUrlDark"?: string | null, readonly "name": string, readonly "pluginDisplayNames"?: ReadonlyArray } export const V2AppListUpdatedNotification__AppInfo = Schema.Struct({ "appMetadata": Schema.optionalKey(Schema.Union([V2AppListUpdatedNotification__AppMetadata, Schema.Null])), "branding": Schema.optionalKey(Schema.Union([V2AppListUpdatedNotification__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 })), "isEnabled": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```", "default": true })), "labels": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "logoUrl": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "logoUrlDark": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "name": Schema.String, "pluginDisplayNames": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })) }).annotate({ "description": "EXPERIMENTAL - app metadata returned by app-list APIs." }) @@ -4443,14 +5340,26 @@ export const V2ConfigReadResponse__ConfigLayer = Schema.Struct({ "config": Schem export type V2ConfigReadResponse__ConfigLayerMetadata = { readonly "name": V2ConfigReadResponse__ConfigLayerSource, readonly "version": string } export const V2ConfigReadResponse__ConfigLayerMetadata = Schema.Struct({ "name": V2ConfigReadResponse__ConfigLayerSource, "version": Schema.String }) +export type V2ConfigReadResponse__BrowserUseConfig = { readonly "allow_history_access"?: boolean | null, readonly "default_origin_policy"?: V2ConfigReadResponse__BrowserUseOriginPolicyConfig | null, readonly "origins"?: { readonly [x: string]: V2ConfigReadResponse__BrowserUseOriginPolicyConfig } | null } +export const V2ConfigReadResponse__BrowserUseConfig = Schema.Struct({ "allow_history_access": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "default_origin_policy": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__BrowserUseOriginPolicyConfig, Schema.Null])), "origins": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, V2ConfigReadResponse__BrowserUseOriginPolicyConfig), Schema.Null])) }) + +export type V2ConfigReadResponse__ComputerUseWindowsConfig = { readonly "aumids"?: { readonly [x: string]: V2ConfigReadResponse__AllowDenyRequirement } | null, readonly "exes"?: ReadonlyArray | null } +export const V2ConfigReadResponse__ComputerUseWindowsConfig = Schema.Struct({ "aumids": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, V2ConfigReadResponse__AllowDenyRequirement), Schema.Null])), "exes": Schema.optionalKey(Schema.Union([Schema.Array(V2ConfigReadResponse__ComputerUseWindowsExeConfig), Schema.Null])) }) + export type V2ConfigReadResponse__AppsConfig = { readonly "_default"?: V2ConfigReadResponse__AppsDefaultConfig | null } export const V2ConfigReadResponse__AppsConfig = Schema.Struct({ "_default": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AppsDefaultConfig, Schema.Null])) }) export type V2ConfigReadResponse__ToolsV2 = { readonly "web_search"?: V2ConfigReadResponse__WebSearchToolConfig | null } export const V2ConfigReadResponse__ToolsV2 = Schema.Struct({ "web_search": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__WebSearchToolConfig, Schema.Null])) }) -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])) }) +export type V2ConfigRequirementsReadResponse__ComputerUseWindowsRequirements = { readonly "aumids"?: { readonly [x: string]: V2ConfigRequirementsReadResponse__AllowDenyRequirement } | null, readonly "exes"?: ReadonlyArray | null } +export const V2ConfigRequirementsReadResponse__ComputerUseWindowsRequirements = Schema.Struct({ "aumids": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, V2ConfigRequirementsReadResponse__AllowDenyRequirement), Schema.Null])), "exes": Schema.optionalKey(Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__ComputerUseWindowsExeRequirement), Schema.Null])) }) + +export type V2ConfigRequirementsReadResponse__BrowserUseRequirements = { readonly "allowGlobalPersistentApproval"?: boolean | null, readonly "allowHistoryAccess"?: boolean | null, readonly "defaultOriginPolicy"?: V2ConfigRequirementsReadResponse__BrowserUseOriginPolicy | null, readonly "disableAutoReview"?: boolean | null, readonly "origins"?: { readonly [x: string]: V2ConfigRequirementsReadResponse__BrowserUseOriginPolicy } | null } +export const V2ConfigRequirementsReadResponse__BrowserUseRequirements = Schema.Struct({ "allowGlobalPersistentApproval": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "allowHistoryAccess": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "defaultOriginPolicy": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__BrowserUseOriginPolicy, Schema.Null])), "disableAutoReview": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "origins": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, V2ConfigRequirementsReadResponse__BrowserUseOriginPolicy), Schema.Null])) }) + +export type V2ConfigRequirementsReadResponse__ManagedHooksRequirements = { readonly "Interrupt"?: ReadonlyArray, 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({ "Interrupt": Schema.optionalKey(Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup).annotate({ "default": [] })), "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])) }) export type V2ConfigRequirementsReadResponse__ModelsRequirements = { readonly "newThread"?: V2ConfigRequirementsReadResponse__NewThreadModelDefaults | null } export const V2ConfigRequirementsReadResponse__ModelsRequirements = Schema.Struct({ "newThread": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__NewThreadModelDefaults, Schema.Null])) }) @@ -4470,8 +5379,8 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory = { readonly "completedAtMs": number, readonly "failures": ReadonlyArray, readonly "importId": string, readonly "providerId"?: string | null, 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, "providerId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "successes": Schema.Array(V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess) }) -export type V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportTypeResult = { readonly "failures": ReadonlyArray, readonly "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, readonly "successes": ReadonlyArray } -export const V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportTypeResult = Schema.Struct({ "failures": Schema.Array(V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportItemTypeFailure), "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, "successes": Schema.Array(V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportItemTypeSuccess) }) +export type V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportHistoryRecordTypeResultParams = { readonly "failures": ReadonlyArray, readonly "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, readonly "successes": ReadonlyArray } +export const V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportHistoryRecordTypeResultParams = Schema.Struct({ "failures": Schema.Array(V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportItemTypeFailure), "itemType": V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType, "successes": Schema.Array(V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportHistoryRecordSuccessParams) }) 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 }) @@ -4491,8 +5400,8 @@ export const V2HooksListResponse__HooksListEntry = Schema.Struct({ "cwd": Schema export type V2HookStartedNotification__HookRunSummary = { readonly "completedAt"?: number | null, readonly "displayOrder": number, readonly "durationMs"?: number | null, readonly "entries": ReadonlyArray, readonly "eventName": V2HookStartedNotification__HookEventName, readonly "executionMode": V2HookStartedNotification__HookExecutionMode, 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 "startedAt": number, readonly "status": V2HookStartedNotification__HookRunStatus, readonly "statusMessage"?: string | null } export const V2HookStartedNotification__HookRunSummary = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "displayOrder": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "entries": Schema.Array(V2HookStartedNotification__HookOutputEntry), "eventName": V2HookStartedNotification__HookEventName, "executionMode": V2HookStartedNotification__HookExecutionMode, "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, "startedAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "status": V2HookStartedNotification__HookRunStatus, "statusMessage": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) -export type V2ItemCompletedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ItemCompletedNotification__MemoryCitation | null, readonly "phase"?: V2ItemCompletedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ItemCompletedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ItemCompletedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ItemCompletedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ItemCompletedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ItemCompletedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ItemCompletedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ItemCompletedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ItemCompletedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ItemCompletedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ItemCompletedNotification__FileUpdateChange), "id": Schema.String, "status": V2ItemCompletedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ItemCompletedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ItemCompletedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ItemCompletedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ItemCompletedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ItemCompletedNotification__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ItemCompletedNotification__MemoryCitation | null, readonly "phase"?: V2ItemCompletedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ItemCompletedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ItemCompletedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ItemCompletedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ItemCompletedNotification__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ItemCompletedNotification__McpToolCallResult | null, readonly "server": string, readonly "status": V2ItemCompletedNotification__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ItemCompletedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ItemCompletedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ItemCompletedNotification__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ItemCompletedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ItemCompletedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ItemCompletedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ItemCompletedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ItemCompletedNotification__FileUpdateChange), "id": Schema.String, "status": V2ItemCompletedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ItemCompletedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ItemCompletedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ItemCompletedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ItemCompletedNotification__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { 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" }) @@ -4500,11 +5409,11 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = 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" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ItemStartedNotification__MemoryCitation | null, readonly "phase"?: V2ItemStartedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ItemStartedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ItemStartedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ItemStartedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ItemStartedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ItemStartedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ItemStartedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ItemStartedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ItemStartedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ItemStartedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ItemStartedNotification__FileUpdateChange), "id": Schema.String, "status": V2ItemStartedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ItemStartedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ItemStartedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ItemStartedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ItemStartedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ItemStartedNotification__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ItemStartedNotification__MemoryCitation | null, readonly "phase"?: V2ItemStartedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ItemStartedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ItemStartedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ItemStartedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ItemStartedNotification__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ItemStartedNotification__McpToolCallResult | null, readonly "server": string, readonly "status": V2ItemStartedNotification__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ItemStartedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ItemStartedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ItemStartedNotification__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ItemStartedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ItemStartedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ItemStartedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ItemStartedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ItemStartedNotification__FileUpdateChange), "id": Schema.String, "status": V2ItemStartedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ItemStartedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ItemStartedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ItemStartedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ItemStartedNotification__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) -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, readonly "id": string, 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": [] })), "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, "id": Schema.String, "inputModalities": Schema.optionalKey(Schema.Array(V2ModelListResponse__InputModality).annotate({ "default": ["text","image"] })), "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])), "upgradeInfo": Schema.optionalKey(Schema.Union([V2ModelListResponse__ModelUpgradeInfo, Schema.Null])) }) +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, readonly "id": string, readonly "inputModalities"?: ReadonlyArray, readonly "isDefault": boolean, readonly "model": string, readonly "modelSpecialty"?: string | null, readonly "multiAgentVersion"?: V2ModelListResponse__MultiAgentVersion | null, 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": [] })), "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, "id": Schema.String, "inputModalities": Schema.optionalKey(Schema.Array(V2ModelListResponse__InputModality).annotate({ "default": ["text","image"] })), "isDefault": Schema.Boolean, "model": Schema.String, "modelSpecialty": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "multiAgentVersion": Schema.optionalKey(Schema.Union([V2ModelListResponse__MultiAgentVersion, Schema.Null]).annotate({ "description": "Multi-agent runtime declared by this model, when available." })), "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])), "upgradeInfo": Schema.optionalKey(Schema.Union([V2ModelListResponse__ModelUpgradeInfo, Schema.Null])) }) export type V2PluginInstalledResponse__PluginShareContext = { readonly "canPublishToWorkspace"?: boolean | null, 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({ "canPublishToWorkspace": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "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])) }) @@ -4521,47 +5430,80 @@ export const V2PluginReadResponse__PluginShareContext = Schema.Struct({ "canPubl export type V2PluginReadResponse__ScheduledTaskSummary = { readonly "key": string, readonly "name": string, readonly "prompt": string, readonly "schedule": V2PluginReadResponse__ScheduledTaskSchedule } export const V2PluginReadResponse__ScheduledTaskSummary = Schema.Struct({ "key": Schema.String, "name": Schema.String, "prompt": Schema.String, "schedule": V2PluginReadResponse__ScheduledTaskSchedule }) +export type V2PluginSearchResponse__PluginShareContext = { readonly "canPublishToWorkspace"?: boolean | null, readonly "creatorAccountUserId"?: string | null, readonly "creatorName"?: string | null, readonly "discoverability"?: V2PluginSearchResponse__PluginShareDiscoverability | null, readonly "remotePluginId": string, readonly "remoteVersion"?: string | null, readonly "sharePrincipals"?: ReadonlyArray | null, readonly "shareUrl"?: string | null } +export const V2PluginSearchResponse__PluginShareContext = Schema.Struct({ "canPublishToWorkspace": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "creatorAccountUserId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "creatorName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "discoverability": Schema.optionalKey(Schema.Union([V2PluginSearchResponse__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(V2PluginSearchResponse__PluginSharePrincipal), Schema.Null])), "shareUrl": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) + export type V2PluginShareListResponse__PluginShareContext = { readonly "canPublishToWorkspace"?: boolean | null, 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({ "canPublishToWorkspace": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "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])) }) +export type V2ProjectCreateResponse__Project = { readonly "createdAt": number, readonly "id": string, readonly "metadata": { readonly [x: string]: string }, readonly "name": string, readonly "position": number, readonly "roots": ReadonlyArray, readonly "updatedAt": number } +export const V2ProjectCreateResponse__Project = Schema.Struct({ "createdAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "id": Schema.String, "metadata": Schema.Record(Schema.String, Schema.String), "name": Schema.String, "position": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "roots": Schema.Array(V2ProjectCreateResponse__ProjectRoot), "updatedAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()) }) + +export type V2ProjectImportResponse__Project = { readonly "createdAt": number, readonly "id": string, readonly "metadata": { readonly [x: string]: string }, readonly "name": string, readonly "position": number, readonly "roots": ReadonlyArray, readonly "updatedAt": number } +export const V2ProjectImportResponse__Project = Schema.Struct({ "createdAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "id": Schema.String, "metadata": Schema.Record(Schema.String, Schema.String), "name": Schema.String, "position": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "roots": Schema.Array(V2ProjectImportResponse__ProjectRoot), "updatedAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()) }) + +export type V2ProjectListResponse__Project = { readonly "createdAt": number, readonly "id": string, readonly "metadata": { readonly [x: string]: string }, readonly "name": string, readonly "position": number, readonly "roots": ReadonlyArray, readonly "updatedAt": number } +export const V2ProjectListResponse__Project = Schema.Struct({ "createdAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "id": Schema.String, "metadata": Schema.Record(Schema.String, Schema.String), "name": Schema.String, "position": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "roots": Schema.Array(V2ProjectListResponse__ProjectRoot), "updatedAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()) }) + +export type V2ProjectReadResponse__Project = { readonly "createdAt": number, readonly "id": string, readonly "metadata": { readonly [x: string]: string }, readonly "name": string, readonly "position": number, readonly "roots": ReadonlyArray, readonly "updatedAt": number } +export const V2ProjectReadResponse__Project = Schema.Struct({ "createdAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "id": Schema.String, "metadata": Schema.Record(Schema.String, Schema.String), "name": Schema.String, "position": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "roots": Schema.Array(V2ProjectReadResponse__ProjectRoot), "updatedAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()) }) + +export type V2ProjectUpdateResponse__Project = { readonly "createdAt": number, readonly "id": string, readonly "metadata": { readonly [x: string]: string }, readonly "name": string, readonly "position": number, readonly "roots": ReadonlyArray, readonly "updatedAt": number } +export const V2ProjectUpdateResponse__Project = Schema.Struct({ "createdAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "id": Schema.String, "metadata": Schema.Record(Schema.String, Schema.String), "name": Schema.String, "position": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), "roots": Schema.Array(V2ProjectUpdateResponse__ProjectRoot), "updatedAt": Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()) }) + export type V2RawResponseItemCompletedNotification__FunctionCallOutputBody = string | ReadonlyArray export const V2RawResponseItemCompletedNotification__FunctionCallOutputBody = Schema.Union([Schema.String, Schema.Array(V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem)]) export type V2ReviewStartResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ReviewStartResponse__CodexErrorInfo | null, readonly "message": string } export const V2ReviewStartResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ReviewStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ReviewStartResponse__MemoryCitation | null, readonly "phase"?: V2ReviewStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ReviewStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ReviewStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ReviewStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ReviewStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ReviewStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ReviewStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ReviewStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ReviewStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ReviewStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ReviewStartResponse__FileUpdateChange), "id": Schema.String, "status": V2ReviewStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ReviewStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ReviewStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ReviewStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ReviewStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ReviewStartResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ReviewStartResponse__MemoryCitation | null, readonly "phase"?: V2ReviewStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ReviewStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ReviewStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ReviewStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ReviewStartResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ReviewStartResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ReviewStartResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ReviewStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ReviewStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ReviewStartResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ReviewStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ReviewStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ReviewStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ReviewStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ReviewStartResponse__FileUpdateChange), "id": Schema.String, "status": V2ReviewStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ReviewStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ReviewStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ReviewStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) -export type V2SkillsListResponse__SkillMetadata = { readonly "dependencies"?: V2SkillsListResponse__SkillDependencies | null, readonly "description": string, readonly "enabled": boolean, readonly "interface"?: V2SkillsListResponse__SkillInterface | null, readonly "name": string, readonly "path": V2SkillsListResponse__AbsolutePathBuf, readonly "scope": V2SkillsListResponse__SkillScope, readonly "shortDescription"?: string | null } -export const V2SkillsListResponse__SkillMetadata = Schema.Struct({ "dependencies": Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillDependencies, Schema.Null])), "description": Schema.String, "enabled": Schema.Boolean, "interface": Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillInterface, Schema.Null])), "name": Schema.String, "path": V2SkillsListResponse__AbsolutePathBuf, "scope": V2SkillsListResponse__SkillScope, "shortDescription": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description." }), Schema.Null])) }) +export type V2SkillsListResponse__SkillMetadata = { readonly "dependencies"?: V2SkillsListResponse__SkillDependencies | null, readonly "description": string, readonly "enabled": boolean, readonly "interface"?: V2SkillsListResponse__SkillInterface | null, readonly "name": string, readonly "path": V2SkillsListResponse__AbsolutePathBuf, readonly "pluginId"?: string | null, readonly "scope": V2SkillsListResponse__SkillScope, readonly "shortDescription"?: string | null } +export const V2SkillsListResponse__SkillMetadata = Schema.Struct({ "dependencies": Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillDependencies, Schema.Null])), "description": Schema.String, "enabled": Schema.Boolean, "interface": Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillInterface, Schema.Null])), "name": Schema.String, "path": V2SkillsListResponse__AbsolutePathBuf, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Owning plugin ID, matching `PluginSummary.id`, when known." }), Schema.Null])), "scope": V2SkillsListResponse__SkillScope, "shortDescription": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description." }), Schema.Null])) }) export type V2ThreadForkResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadForkResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadForkResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadForkResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadForkResponse__MemoryCitation | null, readonly "phase"?: V2ThreadForkResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadForkResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadForkResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadForkResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadForkResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadForkResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadForkResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadForkResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadForkResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadForkResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadForkResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadForkResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadForkResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadForkResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadForkResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadForkResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadForkResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadForkResponse__MemoryCitation | null, readonly "phase"?: V2ThreadForkResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadForkResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadForkResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadForkResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadForkResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadForkResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadForkResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadForkResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadForkResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadForkResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadForkResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadForkResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadForkResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadForkResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadForkResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadForkResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadForkResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadForkResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadForkResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) -export type V2ThreadItemsListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadItemsListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadItemsListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadItemsListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadItemsListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadItemsListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadItemsListResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "result"?: V2ThreadItemsListResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadItemsListResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadItemsListResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadItemsListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadItemsListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadItemsListResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadItemsListResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadItemsListResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadItemsListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -export const V2ThreadItemsListResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadItemsListResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadItemsListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadItemsListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadItemsListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadItemsListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadItemsListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__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([V2ThreadItemsListResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadItemsListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadItemsListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadItemsListResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadItemsListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadItemsListResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadItemsListResponse__LegacyAppPathString, "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([V2ThreadItemsListResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadItemsListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadItemsListResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadItemsListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadItemsListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadItemsListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadItemsListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadItemsListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadItemsListResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadItemsListResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadItemsListResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadItemsListResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadItemsListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadItemsListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadItemsListResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadItemsListResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadItemsListResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "failure"?: V2ThreadItemsListResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadItemsListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +export const V2ThreadItemsListResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadItemsListResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadItemsListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadItemsListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadItemsListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadItemsListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadItemsListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadItemsListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadItemsListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadItemsListResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadItemsListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadItemsListResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadItemsListResponse__LegacyAppPathString, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadItemsListResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadListResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadListResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadListResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadListResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadListResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadListResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadListResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadListResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadListResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadListResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadListResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadListResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadMetadataUpdateResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadMetadataUpdateResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadMetadataUpdateResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadMetadataUpdateResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadMetadataUpdateResponse__MemoryCitation | null, readonly "phase"?: V2ThreadMetadataUpdateResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadMetadataUpdateResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadMetadataUpdateResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadMetadataUpdateResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadMetadataUpdateResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadMetadataUpdateResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadMetadataUpdateResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadMetadataUpdateResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadMetadataUpdateResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadMetadataUpdateResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadMetadataUpdateResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadMetadataUpdateResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadMetadataUpdateResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadMetadataUpdateResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadMetadataUpdateResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadMetadataUpdateResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadMetadataUpdateResponse__MemoryCitation | null, readonly "phase"?: V2ThreadMetadataUpdateResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadMetadataUpdateResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadMetadataUpdateResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadMetadataUpdateResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadMetadataUpdateResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadMetadataUpdateResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadMetadataUpdateResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadMetadataUpdateResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadMetadataUpdateResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadMetadataUpdateResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadMetadataUpdateResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadMetadataUpdateResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadMetadataUpdateResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadMetadataUpdateResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadMetadataUpdateResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadMetadataUpdateResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadMetadataUpdateResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadMetadataUpdateResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) + +export type V2ThreadQueueAddResponse__QueuedSubmission = { readonly "clientUserMessageId": string, readonly "id": string, readonly "input": ReadonlyArray } +export const V2ThreadQueueAddResponse__QueuedSubmission = Schema.Struct({ "clientUserMessageId": Schema.String, "id": Schema.String, "input": Schema.Array(V2ThreadQueueAddResponse__UserInput) }) + +export type V2ThreadQueueListResponse__QueuedSubmission = { readonly "clientUserMessageId": string, readonly "id": string, readonly "input": ReadonlyArray } +export const V2ThreadQueueListResponse__QueuedSubmission = Schema.Struct({ "clientUserMessageId": Schema.String, "id": Schema.String, "input": Schema.Array(V2ThreadQueueListResponse__UserInput) }) + +export type V2ThreadQueueStartResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadQueueStartResponse__CodexErrorInfo | null, readonly "message": string } +export const V2ThreadQueueStartResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) + +export type V2ThreadQueueStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadQueueStartResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadQueueStartResponse__MemoryCitation | null, readonly "phase"?: V2ThreadQueueStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadQueueStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadQueueStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadQueueStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadQueueStartResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadQueueStartResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadQueueStartResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadQueueStartResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadQueueStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadQueueStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadQueueStartResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadQueueStartResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadQueueStartResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "failure"?: V2ThreadQueueStartResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadQueueStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +export const V2ThreadQueueStartResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadQueueStartResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadQueueStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadQueueStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadQueueStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadQueueStartResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadQueueStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadQueueStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadQueueStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadQueueStartResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadQueueStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadQueueStartResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadQueueStartResponse__LegacyAppPathString, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) + +export type V2ThreadQueueUpdateResponse__QueuedSubmission = { readonly "clientUserMessageId": string, readonly "id": string, readonly "input": ReadonlyArray } +export const V2ThreadQueueUpdateResponse__QueuedSubmission = Schema.Struct({ "clientUserMessageId": Schema.String, "id": Schema.String, "input": Schema.Array(V2ThreadQueueUpdateResponse__UserInput) }) export type V2ThreadReadResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadReadResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadReadResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadReadResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadReadResponse__MemoryCitation | null, readonly "phase"?: V2ThreadReadResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadReadResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadReadResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadReadResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadReadResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadReadResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadReadResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadReadResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadReadResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadReadResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadReadResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadReadResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadReadResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadReadResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadReadResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadReadResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadReadResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadReadResponse__MemoryCitation | null, readonly "phase"?: V2ThreadReadResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadReadResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadReadResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadReadResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadReadResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadReadResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadReadResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadReadResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadReadResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadReadResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadReadResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadReadResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadReadResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadReadResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadReadResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadReadResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadReadResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadReadResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadReadResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadResumeParams__FunctionCallOutputBody = string | ReadonlyArray export const V2ThreadResumeParams__FunctionCallOutputBody = Schema.Union([Schema.String, Schema.Array(V2ThreadResumeParams__FunctionCallOutputContentItem)]) @@ -4569,20 +5511,26 @@ export const V2ThreadResumeParams__FunctionCallOutputBody = Schema.Union([Schema export type V2ThreadResumeResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadResumeResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadResumeResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadResumeResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadResumeResponse__MemoryCitation | null, readonly "phase"?: V2ThreadResumeResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadResumeResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadResumeResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadResumeResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadResumeResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadResumeResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadResumeResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadResumeResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadResumeResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadResumeResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadResumeResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadResumeResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadResumeResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadResumeResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadResumeResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadResumeResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadResumeResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadResumeResponse__MemoryCitation | null, readonly "phase"?: V2ThreadResumeResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadResumeResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadResumeResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadResumeResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadResumeResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadResumeResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadResumeResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadResumeResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadResumeResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadResumeResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadResumeResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadResumeResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadResumeResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadResumeResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadResumeResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadResumeResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadResumeResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadResumeResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadResumeResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadRevertResponse__CodexErrorInfo | null, readonly "message": string } +export const V2ThreadRevertResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) + +export type V2ThreadRevertResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadRevertResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadRevertResponse__MemoryCitation | null, readonly "phase"?: V2ThreadRevertResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadRevertResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadRevertResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadRevertResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadRevertResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadRevertResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadRevertResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadRevertResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadRevertResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadRevertResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadRevertResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadRevertResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadRevertResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "failure"?: V2ThreadRevertResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadRevertResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +export const V2ThreadRevertResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadRevertResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadRevertResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadRevertResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadRevertResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadRevertResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadRevertResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadRevertResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadRevertResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadRevertResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadRevertResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadRevertResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadRevertResponse__LegacyAppPathString, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadRollbackResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadRollbackResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadRollbackResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadRollbackResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadRollbackResponse__MemoryCitation | null, readonly "phase"?: V2ThreadRollbackResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadRollbackResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadRollbackResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadRollbackResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadRollbackResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadRollbackResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadRollbackResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadRollbackResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadRollbackResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadRollbackResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadRollbackResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadRollbackResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadRollbackResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadRollbackResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadRollbackResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadRollbackResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadRollbackResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadRollbackResponse__MemoryCitation | null, readonly "phase"?: V2ThreadRollbackResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadRollbackResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadRollbackResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadRollbackResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadRollbackResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadRollbackResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadRollbackResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadRollbackResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadRollbackResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadRollbackResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadRollbackResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadRollbackResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadRollbackResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadRollbackResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadRollbackResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadRollbackResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadRollbackResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadRollbackResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadRollbackResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadSearchResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadSearchResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadSearchResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadSearchResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadSearchResponse__MemoryCitation | null, readonly "phase"?: V2ThreadSearchResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadSearchResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadSearchResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadSearchResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadSearchResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "result"?: V2ThreadSearchResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadSearchResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadSearchResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadSearchResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadSearchResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadSearchResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadSearchResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadSearchResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadSearchResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -export const V2ThreadSearchResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadSearchResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadSearchResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadSearchResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadSearchResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadSearchResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadSearchResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__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([V2ThreadSearchResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadSearchResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadSearchResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadSearchResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadSearchResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadSearchResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadSearchResponse__LegacyAppPathString, "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([V2ThreadSearchResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadSearchResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadSearchResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadSearchResponse__MemoryCitation | null, readonly "phase"?: V2ThreadSearchResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadSearchResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadSearchResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadSearchResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadSearchResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadSearchResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadSearchResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadSearchResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadSearchResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadSearchResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadSearchResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadSearchResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadSearchResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "failure"?: V2ThreadSearchResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadSearchResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +export const V2ThreadSearchResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadSearchResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadSearchResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadSearchResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadSearchResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadSearchResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadSearchResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadSearchResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadSearchResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadSearchResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadSearchResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadSearchResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadSearchResponse__LegacyAppPathString, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { 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." }) @@ -4593,38 +5541,44 @@ export const V2ThreadSettingsUpdateParams__CollaborationMode = Schema.Struct({ " export type V2ThreadStartedNotification__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadStartedNotification__CodexErrorInfo | null, readonly "message": string } export const V2ThreadStartedNotification__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadStartedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadStartedNotification__MemoryCitation | null, readonly "phase"?: V2ThreadStartedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadStartedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadStartedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadStartedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadStartedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadStartedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadStartedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadStartedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadStartedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadStartedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadStartedNotification__FileUpdateChange), "id": Schema.String, "status": V2ThreadStartedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadStartedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadStartedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadStartedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadStartedNotification__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadStartedNotification__MemoryCitation | null, readonly "phase"?: V2ThreadStartedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadStartedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadStartedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadStartedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadStartedNotification__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadStartedNotification__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadStartedNotification__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadStartedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadStartedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadStartedNotification__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadStartedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadStartedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadStartedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadStartedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadStartedNotification__FileUpdateChange), "id": Schema.String, "status": V2ThreadStartedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadStartedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadStartedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadStartResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadStartResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadStartResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadStartResponse__MemoryCitation | null, readonly "phase"?: V2ThreadStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadStartResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadStartResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadStartResponse__MemoryCitation | null, readonly "phase"?: V2ThreadStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadStartResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadStartResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadStartResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadStartResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadStartResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) + +export type V2ThreadTimelineListResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadTimelineListResponse__CodexErrorInfo | null, readonly "message": string } +export const V2ThreadTimelineListResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) + +export type V2ThreadTimelineListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadTimelineListResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadTimelineListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadTimelineListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadTimelineListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadTimelineListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadTimelineListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadTimelineListResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadTimelineListResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadTimelineListResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadTimelineListResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadTimelineListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadTimelineListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadTimelineListResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadTimelineListResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadTimelineListResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "failure"?: V2ThreadTimelineListResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadTimelineListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +export const V2ThreadTimelineListResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadTimelineListResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadTimelineListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadTimelineListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadTimelineListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadTimelineListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadTimelineListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadTimelineListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadTimelineListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadTimelineListResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadTimelineListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadTimelineListResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadTimelineListResponse__LegacyAppPathString, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadTurnsListResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadTurnsListResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadTurnsListResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadTurnsListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadTurnsListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadTurnsListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadTurnsListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadTurnsListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadTurnsListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadTurnsListResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "result"?: V2ThreadTurnsListResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadTurnsListResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadTurnsListResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadTurnsListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadTurnsListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadTurnsListResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadTurnsListResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadTurnsListResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadTurnsListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadTurnsListResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadTurnsListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadTurnsListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadTurnsListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadTurnsListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadTurnsListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__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([V2ThreadTurnsListResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadTurnsListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadTurnsListResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadTurnsListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadTurnsListResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadTurnsListResponse__LegacyAppPathString, "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([V2ThreadTurnsListResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadTurnsListResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadTurnsListResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadTurnsListResponse__MemoryCitation | null, readonly "phase"?: V2ThreadTurnsListResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadTurnsListResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadTurnsListResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadTurnsListResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadTurnsListResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadTurnsListResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadTurnsListResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, readonly "contentItems"?: ReadonlyArray | null, readonly "durationMs"?: number | null, readonly "id": string, readonly "namespace"?: string | null, readonly "status": V2ThreadTurnsListResponse__DynamicToolCallStatus, readonly "success"?: boolean | null, readonly "tool": string, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadTurnsListResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadTurnsListResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", readonly "type": "collabAgentToolCall" } | { readonly "agentPath": string, readonly "agentThreadId": string, readonly "id": string, readonly "kind": V2ThreadTurnsListResponse__SubAgentActivityKind, readonly "type": "subAgentActivity" } | { readonly "action"?: V2ThreadTurnsListResponse__WebSearchAction | null, readonly "id": string, readonly "query": string, readonly "results"?: ReadonlyArray | null, readonly "type": "webSearch" } | { readonly "id": string, readonly "path": V2ThreadTurnsListResponse__LegacyAppPathString, readonly "type": "imageView" } | { readonly "durationMs": number, readonly "id": string, readonly "type": "sleep" } | { readonly "failure"?: V2ThreadTurnsListResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadTurnsListResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union([Schema.Struct({ "clientId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "content": Schema.Array(V2ThreadTurnsListResponse__UserInput), "id": Schema.String, "type": Schema.Literal("userMessage").annotate({ "title": "UserMessageThreadItemType" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadTurnsListResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadTurnsListResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadTurnsListResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadTurnsListResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadTurnsListResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadTurnsListResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": V2ThreadTurnsListResponse__DynamicToolCallStatus, "success": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "tool": Schema.String, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadTurnsListResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "title": "CollabAgentToolCallThreadItemType" }) }).annotate({ "title": "CollabAgentToolCallThreadItem" }), Schema.Struct({ "agentPath": Schema.String, "agentThreadId": Schema.String, "id": Schema.String, "kind": V2ThreadTurnsListResponse__SubAgentActivityKind, "type": Schema.Literal("subAgentActivity").annotate({ "title": "SubAgentActivityThreadItemType" }) }).annotate({ "title": "SubAgentActivityThreadItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__WebSearchAction, Schema.Null])), "id": Schema.String, "query": Schema.String, "results": Schema.optionalKey(Schema.Union([Schema.Array(Schema.Json).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": V2ThreadTurnsListResponse__LegacyAppPathString, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2ThreadUnarchiveResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2ThreadUnarchiveResponse__CodexErrorInfo | null, readonly "message": string } export const V2ThreadUnarchiveResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2ThreadUnarchiveResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2ThreadUnarchiveResponse__MemoryCitation | null, readonly "phase"?: V2ThreadUnarchiveResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadUnarchiveResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadUnarchiveResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadUnarchiveResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadUnarchiveResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadUnarchiveResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadUnarchiveResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadUnarchiveResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadUnarchiveResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadUnarchiveResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadUnarchiveResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadUnarchiveResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2ThreadUnarchiveResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadUnarchiveResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2ThreadUnarchiveResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2ThreadUnarchiveResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2ThreadUnarchiveResponse__MemoryCitation | null, readonly "phase"?: V2ThreadUnarchiveResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2ThreadUnarchiveResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2ThreadUnarchiveResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2ThreadUnarchiveResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadUnarchiveResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2ThreadUnarchiveResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2ThreadUnarchiveResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2ThreadUnarchiveResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2ThreadUnarchiveResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2ThreadUnarchiveResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2ThreadUnarchiveResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2ThreadUnarchiveResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2ThreadUnarchiveResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2ThreadUnarchiveResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2ThreadUnarchiveResponse__FileUpdateChange), "id": Schema.String, "status": V2ThreadUnarchiveResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2ThreadUnarchiveResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2ThreadUnarchiveResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2TurnCompletedNotification__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2TurnCompletedNotification__CodexErrorInfo | null, readonly "message": string } export const V2TurnCompletedNotification__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2TurnCompletedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2TurnCompletedNotification__MemoryCitation | null, readonly "phase"?: V2TurnCompletedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2TurnCompletedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2TurnCompletedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2TurnCompletedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2TurnCompletedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2TurnCompletedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2TurnCompletedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2TurnCompletedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2TurnCompletedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2TurnCompletedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2TurnCompletedNotification__FileUpdateChange), "id": Schema.String, "status": V2TurnCompletedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2TurnCompletedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2TurnCompletedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2TurnCompletedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2TurnCompletedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2TurnCompletedNotification__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2TurnCompletedNotification__MemoryCitation | null, readonly "phase"?: V2TurnCompletedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2TurnCompletedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2TurnCompletedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2TurnCompletedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2TurnCompletedNotification__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2TurnCompletedNotification__McpToolCallResult | null, readonly "server": string, readonly "status": V2TurnCompletedNotification__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2TurnCompletedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2TurnCompletedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2TurnCompletedNotification__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2TurnCompletedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2TurnCompletedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2TurnCompletedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2TurnCompletedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2TurnCompletedNotification__FileUpdateChange), "id": Schema.String, "status": V2TurnCompletedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2TurnCompletedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2TurnCompletedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2TurnCompletedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2TurnCompletedNotification__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2TurnStartedNotification__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2TurnStartedNotification__CodexErrorInfo | null, readonly "message": string } export const V2TurnStartedNotification__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2TurnStartedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2TurnStartedNotification__MemoryCitation | null, readonly "phase"?: V2TurnStartedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2TurnStartedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2TurnStartedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2TurnStartedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2TurnStartedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2TurnStartedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2TurnStartedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2TurnStartedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2TurnStartedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2TurnStartedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2TurnStartedNotification__FileUpdateChange), "id": Schema.String, "status": V2TurnStartedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "server": Schema.String, "status": V2TurnStartedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2TurnStartedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2TurnStartedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2TurnStartedNotification__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2TurnStartedNotification__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2TurnStartedNotification__MemoryCitation | null, readonly "phase"?: V2TurnStartedNotification__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2TurnStartedNotification__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2TurnStartedNotification__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2TurnStartedNotification__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2TurnStartedNotification__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2TurnStartedNotification__McpToolCallResult | null, readonly "server": string, readonly "status": V2TurnStartedNotification__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2TurnStartedNotification__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2TurnStartedNotification__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2TurnStartedNotification__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2TurnStartedNotification__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2TurnStartedNotification__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2TurnStartedNotification__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2TurnStartedNotification__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2TurnStartedNotification__FileUpdateChange), "id": Schema.String, "status": V2TurnStartedNotification__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2TurnStartedNotification__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2TurnStartedNotification__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2TurnStartedNotification__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2TurnStartedNotification__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) export type V2TurnStartParams__CollaborationMode = { readonly "mode": V2TurnStartParams__ModeKind, readonly "settings": V2TurnStartParams__Settings } export const V2TurnStartParams__CollaborationMode = Schema.Struct({ "mode": V2TurnStartParams__ModeKind, "settings": V2TurnStartParams__Settings }).annotate({ "description": "Collaboration mode for a Codex session." }) @@ -4632,14 +5586,14 @@ export const V2TurnStartParams__CollaborationMode = Schema.Struct({ "mode": V2Tu export type V2TurnStartResponse__TurnError = { readonly "additionalDetails"?: string | null, readonly "codexErrorInfo"?: V2TurnStartResponse__CodexErrorInfo | null, readonly "message": string } export const V2TurnStartResponse__TurnError = Schema.Struct({ "additionalDetails": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "codexErrorInfo": Schema.optionalKey(Schema.Union([V2TurnStartResponse__CodexErrorInfo, Schema.Null])), "message": Schema.String }) -export type V2TurnStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "id": string, readonly "memoryCitation"?: V2TurnStartResponse__MemoryCitation | null, readonly "phase"?: V2TurnStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2TurnStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2TurnStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2TurnStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, 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, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2TurnStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2TurnStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2TurnStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } -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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2TurnStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2TurnStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2TurnStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2TurnStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2TurnStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2TurnStartResponse__FileUpdateChange), "id": Schema.String, "status": V2TurnStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2TurnStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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])), "server": Schema.String, "status": V2TurnStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2TurnStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2TurnStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2TurnStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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])), "status": Schema.String, "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) +export type V2TurnStartResponse__ThreadItem = { readonly "clientId"?: string | null, readonly "content": ReadonlyArray, readonly "id": string, readonly "type": "userMessage" } | { readonly "fragments": ReadonlyArray, readonly "id": string, readonly "type": "hookPrompt" } | { readonly "delivery"?: V2TurnStartResponse__AgentMessageDelivery | null, readonly "id": string, readonly "memoryCitation"?: V2TurnStartResponse__MemoryCitation | null, readonly "phase"?: V2TurnStartResponse__MessagePhase | null, readonly "text": string, readonly "type": "agentMessage" } | { readonly "id": string, readonly "text": string, readonly "type": "plan" } | { readonly "content"?: ReadonlyArray, readonly "id": string, readonly "summary"?: ReadonlyArray, readonly "type": "reasoning" } | { readonly "aggregatedOutput"?: string | null, readonly "command": string, readonly "commandActions": ReadonlyArray, readonly "cwd": string, readonly "durationMs"?: number | null, readonly "exitCode"?: number | null, readonly "id": string, readonly "pluginId"?: string | null, readonly "processId"?: string | null, readonly "scriptPath"?: string | null, readonly "source"?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction", readonly "status": V2TurnStartResponse__CommandExecutionStatus, readonly "type": "commandExecution" } | { readonly "changes": ReadonlyArray, readonly "id": string, readonly "status": V2TurnStartResponse__PatchApplyStatus, readonly "type": "fileChange" } | { readonly "appContext"?: V2TurnStartResponse__McpToolCallAppContext | null, readonly "arguments": Schema.Json, readonly "durationMs"?: number | null, readonly "error"?: V2TurnStartResponse__McpToolCallError | null, readonly "id": string, readonly "mcpAppResourceUri"?: string | null, readonly "pluginId"?: string | null, readonly "readOnlyHint"?: boolean | null, readonly "result"?: V2TurnStartResponse__McpToolCallResult | null, readonly "server": string, readonly "status": V2TurnStartResponse__McpToolCallStatus, readonly "tool": string, readonly "type": "mcpToolCall" } | { readonly "arguments": Schema.Json, 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, readonly "type": "dynamicToolCall" } | { readonly "agentsStates": { readonly [x: string]: V2TurnStartResponse__CollabAgentState }, readonly "id": string, readonly "model"?: string | null, readonly "prompt"?: string | null, readonly "reasoningEffort"?: V2TurnStartResponse__ReasoningEffort | null, readonly "receiverThreadIds": ReadonlyArray, readonly "senderThreadId": string, readonly "status": "inProgress" | "completed" | "failed" | "interrupted", readonly "tool": "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents", 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 "failure"?: V2TurnStartResponse__ImageGenerationFailure | null, readonly "id": string, readonly "result": string, readonly "revisedPrompt"?: string | null, readonly "savedPath"?: V2TurnStartResponse__AbsolutePathBuf | null, readonly "status": string, readonly "transparentBackground"?: boolean | null, readonly "type": "imageGeneration" } | { readonly "id": string, readonly "review": string, readonly "type": "enteredReviewMode" } | { readonly "id": string, readonly "review": string, readonly "type": "exitedReviewMode" } | { readonly "id": string, readonly "type": "contextCompaction" } +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" }) }).annotate({ "title": "UserMessageThreadItem" }), Schema.Struct({ "fragments": Schema.Array(V2TurnStartResponse__HookPromptFragment), "id": Schema.String, "type": Schema.Literal("hookPrompt").annotate({ "title": "HookPromptThreadItemType" }) }).annotate({ "title": "HookPromptThreadItem" }), Schema.Struct({ "delivery": Schema.optionalKey(Schema.Union([V2TurnStartResponse__AgentMessageDelivery, Schema.Null])), "id": Schema.String, "memoryCitation": Schema.optionalKey(Schema.Union([V2TurnStartResponse__MemoryCitation, Schema.Null])), "phase": Schema.optionalKey(Schema.Union([V2TurnStartResponse__MessagePhase, Schema.Null])), "text": Schema.String, "type": Schema.Literal("agentMessage").annotate({ "title": "AgentMessageThreadItemType" }) }).annotate({ "title": "AgentMessageThreadItem" }), Schema.Struct({ "id": Schema.String, "text": Schema.String, "type": Schema.Literal("plan").annotate({ "title": "PlanThreadItemType" }) }).annotate({ "title": "PlanThreadItem", "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text." }), Schema.Struct({ "content": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "id": Schema.String, "summary": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "default": [] })), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningThreadItemType" }) }).annotate({ "title": "ReasoningThreadItem" }), Schema.Struct({ "aggregatedOutput": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command's output, aggregated from stdout and stderr." }), Schema.Null])), "command": Schema.String.annotate({ "description": "The command to be executed." }), "commandActions": Schema.Array(V2TurnStartResponse__CommandAction).annotate({ "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together." }), "cwd": Schema.String.annotate({ "description": "The command's working directory." }), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the command execution in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "exitCode": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The command's exit code.", "format": "int32" }).check(Schema.isInt()), Schema.Null])), "id": Schema.String, "pluginId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Trusted first-party plugin id when this command resolves to one plugin script." }), Schema.Null])), "processId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Identifier for the underlying PTY process (when available)." }), Schema.Null])), "scriptPath": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Safe plugin-relative path when this command resolves to one plugin script." }), Schema.Null])), "source": Schema.optionalKey(Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]).annotate({ "default": "agent" })), "status": V2TurnStartResponse__CommandExecutionStatus, "type": Schema.Literal("commandExecution").annotate({ "title": "CommandExecutionThreadItemType" }) }).annotate({ "title": "CommandExecutionThreadItem" }), Schema.Struct({ "changes": Schema.Array(V2TurnStartResponse__FileUpdateChange), "id": Schema.String, "status": V2TurnStartResponse__PatchApplyStatus, "type": Schema.Literal("fileChange").annotate({ "title": "FileChangeThreadItemType" }) }).annotate({ "title": "FileChangeThreadItem" }), Schema.Struct({ "appContext": Schema.optionalKey(Schema.Union([V2TurnStartResponse__McpToolCallAppContext, Schema.Null])), "arguments": Schema.Json, "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the MCP tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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])), "readOnlyHint": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "result": Schema.optionalKey(Schema.Union([V2TurnStartResponse__McpToolCallResult, Schema.Null])), "server": Schema.String, "status": V2TurnStartResponse__McpToolCallStatus, "tool": Schema.String, "type": Schema.Literal("mcpToolCall").annotate({ "title": "McpToolCallThreadItemType" }) }).annotate({ "title": "McpToolCallThreadItem" }), Schema.Struct({ "arguments": Schema.Json, "contentItems": Schema.optionalKey(Schema.Union([Schema.Array(V2TurnStartResponse__DynamicToolCallOutputContentItem), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "The duration of the dynamic tool call in milliseconds.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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, "type": Schema.Literal("dynamicToolCall").annotate({ "title": "DynamicToolCallThreadItemType" }) }).annotate({ "title": "DynamicToolCallThreadItem" }), Schema.Struct({ "agentsStates": Schema.Record(Schema.String, V2TurnStartResponse__CollabAgentState).annotate({ "description": "Last known status of the target agents, when available." }), "id": Schema.String.annotate({ "description": "Unique identifier for this collab tool call." }), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Model requested for the spawned agent, when applicable." }), Schema.Null])), "prompt": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Prompt text sent as part of the collab tool call, when available." }), Schema.Null])), "reasoningEffort": Schema.optionalKey(Schema.Union([V2TurnStartResponse__ReasoningEffort, Schema.Null]).annotate({ "description": "Reasoning effort requested for the spawned agent, when applicable." })), "receiverThreadIds": Schema.Array(Schema.String).annotate({ "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent." }), "senderThreadId": Schema.String.annotate({ "description": "Thread ID of the agent issuing the collab request." }), "status": Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({ "description": "Current status of the collab tool call." }), "tool": Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]).annotate({ "description": "Name of the collab tool that was invoked." }), "type": Schema.Literal("collabAgentToolCall").annotate({ "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.Json).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, "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({ "failure": Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageGenerationFailure, Schema.Null])), "id": Schema.String, "result": Schema.String, "revisedPrompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "savedPath": Schema.optionalKey(Schema.Union([V2TurnStartResponse__AbsolutePathBuf, Schema.Null])), "status": Schema.String, "transparentBackground": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "type": Schema.Literal("imageGeneration").annotate({ "title": "ImageGenerationThreadItemType" }) }).annotate({ "title": "ImageGenerationThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("enteredReviewMode").annotate({ "title": "EnteredReviewModeThreadItemType" }) }).annotate({ "title": "EnteredReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "review": Schema.String, "type": Schema.Literal("exitedReviewMode").annotate({ "title": "ExitedReviewModeThreadItemType" }) }).annotate({ "title": "ExitedReviewModeThreadItem" }), Schema.Struct({ "id": Schema.String, "type": Schema.Literal("contextCompaction").annotate({ "title": "ContextCompactionThreadItemType" }) }).annotate({ "title": "ContextCompactionThreadItem" })], { mode: "oneOf" }) -export type ClientRequest__ExternalAgentConfigImportHistoryRecordParams = { readonly "itemTypeResults": ReadonlyArray, readonly "providerId": string } -export const ClientRequest__ExternalAgentConfigImportHistoryRecordParams = Schema.Struct({ "itemTypeResults": Schema.Array(ClientRequest__ExternalAgentConfigImportTypeResult).annotate({ "description": "Completed results grouped by imported item type." }), "providerId": Schema.String.annotate({ "description": "Opaque provider identifier for the externally completed import." }) }) +export type ClientRequest__ExternalAgentConfigImportHistoryRecordParams = { readonly "itemTypeResults": ReadonlyArray, readonly "providerId": string } +export const ClientRequest__ExternalAgentConfigImportHistoryRecordParams = Schema.Struct({ "itemTypeResults": Schema.Array(ClientRequest__ExternalAgentConfigImportHistoryRecordTypeResultParams).annotate({ "description": "Completed results grouped by imported item type." }), "providerId": Schema.String.annotate({ "description": "Opaque provider identifier for the externally completed import." }) }) -export type ClientRequest__ResponseItem = { readonly "content": ReadonlyArray, 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" } | { 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" } | { 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" } | { readonly "arguments": Schema.Json, 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" } | { 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" } | { 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" } | { 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 "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 "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])), "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" }), Schema.Struct({ "action": ClientRequest__LocalShellAction, "call_id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Set when using the Responses API." }), Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy id field retained for compatibility with older payloads." }), 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" }) }).annotate({ "title": "LocalShellCallResponseItem" }), 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])), "name": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("function_call").annotate({ "title": "FunctionCallResponseItemType" }) }).annotate({ "title": "FunctionCallResponseItem" }), Schema.Struct({ "arguments": Schema.Json, "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.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("tool_search_call").annotate({ "title": "ToolSearchCallResponseItemType" }) }).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" }) }).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])), "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" }) }).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({ "title": "CustomToolCallOutputResponseItemType" }) }).annotate({ "title": "CustomToolCallOutputResponseItem" }), 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.Json), "type": Schema.Literal("tool_search_output").annotate({ "title": "ToolSearchOutputResponseItemType" }) }).annotate({ "title": "ToolSearchOutputResponseItem" }), Schema.Struct({ "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])), "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])), "result": Schema.String, "revised_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": Schema.String, "type": Schema.Literal("image_generation_call").annotate({ "title": "ImageGenerationCallResponseItemType" }) }).annotate({ "title": "ImageGenerationCallResponseItem" }), 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" })], { mode: "oneOf" }) +export type ClientRequest__ResponseItem = { readonly "content": ReadonlyArray, 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" } | { 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" } | { readonly "arguments": string, readonly "call_id": string, readonly "encrypted_function_args"?: ReadonlyArray | null, readonly "id"?: string | null, readonly "internal_chat_message_metadata_passthrough"?: ClientRequest__InternalChatMessageMetadataPassthrough | null, readonly "name": string, readonly "namespace"?: string | null, readonly "type": "function_call" } | { readonly "arguments": Schema.Json, 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 | null, readonly "id"?: string | null, readonly "internal_chat_message_metadata_passthrough"?: ClientRequest__InternalChatMessageMetadataPassthrough | null, readonly "name"?: string | null, readonly "namespace"?: string | null, readonly "output": ClientRequest__FunctionCallOutputBody, readonly "type": "function_call_output" } | { 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" } | { 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" } | { 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 "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 "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])), "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" }), Schema.Struct({ "action": ClientRequest__LocalShellAction, "call_id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Set when using the Responses API." }), Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy id field retained for compatibility with older payloads." }), 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" }) }).annotate({ "title": "LocalShellCallResponseItem" }), Schema.Struct({ "arguments": Schema.String, "call_id": Schema.String, "encrypted_function_args": Schema.optionalKey(Schema.Union([Schema.Array(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])), "name": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("function_call").annotate({ "title": "FunctionCallResponseItemType" }) }).annotate({ "title": "FunctionCallResponseItem" }), Schema.Struct({ "arguments": Schema.Json, "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.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("tool_search_call").annotate({ "title": "ToolSearchCallResponseItemType" }) }).annotate({ "title": "ToolSearchCallResponseItem" }), Schema.Struct({ "call_id": 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])), "name": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "output": ClientRequest__FunctionCallOutputBody, "type": Schema.Literal("function_call_output").annotate({ "title": "FunctionCallOutputResponseItemType" }) }).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])), "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" }) }).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({ "title": "CustomToolCallOutputResponseItemType" }) }).annotate({ "title": "CustomToolCallOutputResponseItem" }), 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.Json), "type": Schema.Literal("tool_search_output").annotate({ "title": "ToolSearchOutputResponseItemType" }) }).annotate({ "title": "ToolSearchOutputResponseItem" }), Schema.Struct({ "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])), "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])), "result": Schema.String, "revised_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": Schema.String, "type": Schema.Literal("image_generation_call").annotate({ "title": "ImageGenerationCallResponseItemType" }) }).annotate({ "title": "ImageGenerationCallResponseItem" }), 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" })], { mode: "oneOf" }) export type ClientRequest__ThreadSettingsUpdateParams = { readonly "approvalPolicy"?: ClientRequest__AskForApproval | null, readonly "approvalsReviewer"?: ClientRequest__ApprovalsReviewer | null, readonly "collaborationMode"?: ClientRequest__CollaborationMode | null, readonly "cwd"?: string | null, readonly "effort"?: ClientRequest__ReasoningEffort | null, readonly "model"?: string | null, readonly "multiAgentMode"?: ClientRequest__MultiAgentMode | null, readonly "permissions"?: string | null, readonly "personality"?: ClientRequest__Personality | null, readonly "sandboxPolicy"?: ClientRequest__SandboxPolicy | null, readonly "serviceTier"?: string | null, readonly "summary"?: ClientRequest__ReasoningSummary | null, readonly "threadId": string } export const ClientRequest__ThreadSettingsUpdateParams = Schema.Struct({ "approvalPolicy": Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null]).annotate({ "description": "Override the approval policy for subsequent turns." })), "approvalsReviewer": Schema.optionalKey(Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({ "description": "Override where approval requests are routed for subsequent turns." })), "collaborationMode": Schema.optionalKey(Schema.Union([ClientRequest__CollaborationMode, Schema.Null]).annotate({ "description": "EXPERIMENTAL - Set a pre-set collaboration mode for subsequent turns.\n\nFor `collaboration_mode.settings.developer_instructions`, `null` means \"use the built-in instructions for the selected mode\"." })), "cwd": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Override the working directory for subsequent turns." }), Schema.Null])), "effort": Schema.optionalKey(Schema.Union([ClientRequest__ReasoningEffort, Schema.Null]).annotate({ "description": "Override the reasoning effort for subsequent turns." })), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Override the model for subsequent turns." }), Schema.Null])), "multiAgentMode": Schema.optionalKey(Schema.Union([ClientRequest__MultiAgentMode, Schema.Null]).annotate({ "description": "@deprecated Ignored. Use `effort: \"ultra\"` for proactive multi-agent behavior." })), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Select a named permissions profile id for subsequent turns. Cannot be combined with `sandboxPolicy`." }), Schema.Null])), "personality": Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null]).annotate({ "description": "Override the personality for subsequent turns." })), "sandboxPolicy": Schema.optionalKey(Schema.Union([ClientRequest__SandboxPolicy, Schema.Null]).annotate({ "description": "Override the sandbox policy for subsequent turns." })), "serviceTier": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Override the service tier for subsequent turns. `null` clears the current service tier; omission leaves it unchanged." }), Schema.Null])), "summary": Schema.optionalKey(Schema.Union([ClientRequest__ReasoningSummary, Schema.Null]).annotate({ "description": "Override the reasoning summary for subsequent turns." })), "threadId": Schema.String }) @@ -4701,11 +5655,11 @@ export const ServerRequest__FileSystemSandboxEntry = Schema.Struct({ "access": S export type ServerRequest__McpElicitationMultiSelectEnumSchema = ServerRequest__McpElicitationUntitledMultiSelectEnumSchema | ServerRequest__McpElicitationTitledMultiSelectEnumSchema export const ServerRequest__McpElicitationMultiSelectEnumSchema = Schema.Union([ServerRequest__McpElicitationUntitledMultiSelectEnumSchema, ServerRequest__McpElicitationTitledMultiSelectEnumSchema]) -export type V2ConfigReadResponse__Config = { readonly "analytics"?: V2ConfigReadResponse__AnalyticsConfig | null, readonly "approval_policy"?: V2ConfigReadResponse__AskForApproval | null, readonly "approvals_reviewer"?: V2ConfigReadResponse__ApprovalsReviewer | null, readonly "apps"?: V2ConfigReadResponse__AppsConfig | null, readonly "compact_prompt"?: string | null, readonly "desktop"?: { readonly [x: string]: Schema.Json } | 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 "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 "tools"?: V2ConfigReadResponse__ToolsV2 | null, readonly "web_search"?: V2ConfigReadResponse__WebSearchMode | null, readonly [x: string]: Schema.Json } -export const V2ConfigReadResponse__Config = 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." })), "apps": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AppsConfig, Schema.Null])), "compact_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "desktop": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json), 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])), "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])), "model_reasoning_summary": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ReasoningSummary, Schema.Null])), "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])), "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])) }), [Schema.Record(Schema.String, Schema.Json)]) +export type V2ConfigReadResponse__ComputerUseConfig = { readonly "default_app_access"?: V2ConfigReadResponse__AllowDenyRequirement | null, readonly "macos"?: V2ConfigReadResponse__ComputerUseMacosConfig | null, readonly "windows"?: V2ConfigReadResponse__ComputerUseWindowsConfig | null } +export const V2ConfigReadResponse__ComputerUseConfig = Schema.Struct({ "default_app_access": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AllowDenyRequirement, Schema.Null])), "macos": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ComputerUseMacosConfig, Schema.Null])), "windows": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ComputerUseWindowsConfig, Schema.Null])) }) -export type V2ConfigRequirementsReadResponse__ConfigRequirements = { readonly "allowAppshots"?: boolean | null, readonly "allowLoginShell"?: boolean | null, readonly "allowManagedHooksOnly"?: boolean | null, readonly "allowRemoteControl"?: boolean | null, readonly "allowedApprovalPolicies"?: ReadonlyArray | null, readonly "allowedApprovalsReviewers"?: ReadonlyArray | null, readonly "allowedPermissionProfiles"?: { readonly [x: string]: boolean } | null, readonly "allowedSandboxModes"?: ReadonlyArray | null, readonly "allowedWebSearchModes"?: ReadonlyArray | null, readonly "allowedWindowsSandboxImplementations"?: ReadonlyArray | null, readonly "browserUse"?: V2ConfigRequirementsReadResponse__BrowserUseRequirements | null, readonly "checkForUpdateOnStartup"?: boolean | null, readonly "computerUse"?: V2ConfigRequirementsReadResponse__ComputerUseRequirements | null, readonly "defaultPermissions"?: string | null, readonly "enforceResidency"?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null, readonly "featureRequirements"?: { readonly [x: string]: boolean } | null, readonly "feedback"?: V2ConfigRequirementsReadResponse__FeedbackRequirements | null, readonly "hooks"?: V2ConfigRequirementsReadResponse__ManagedHooksRequirements | null, readonly "logDir"?: string | null, readonly "modelCatalogJson"?: string | null, readonly "models"?: V2ConfigRequirementsReadResponse__ModelsRequirements | null, readonly "network"?: V2ConfigRequirementsReadResponse__NetworkRequirements | null, readonly "sqliteHome"?: string | null, readonly "windowsSandboxPrivateDesktop"?: boolean | null } -export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({ "allowAppshots": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "allowLoginShell": 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])), "allowedApprovalsReviewers": Schema.optionalKey(Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__ApprovalsReviewer), 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])), "browserUse": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__BrowserUseRequirements, Schema.Null])), "checkForUpdateOnStartup": Schema.optionalKey(Schema.Union([Schema.Boolean, 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])), "feedback": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__FeedbackRequirements, Schema.Null])), "hooks": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__ManagedHooksRequirements, Schema.Null])), "logDir": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "modelCatalogJson": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "models": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__ModelsRequirements, Schema.Null])), "network": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__NetworkRequirements, Schema.Null])), "sqliteHome": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "windowsSandboxPrivateDesktop": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }) +export type V2ConfigRequirementsReadResponse__ComputerUseRequirements = { readonly "allowLockedComputerUse"?: boolean | null, readonly "allowPersistentApproval"?: boolean | null, readonly "defaultAppAccess"?: V2ConfigRequirementsReadResponse__AllowDenyRequirement | null, readonly "macos"?: V2ConfigRequirementsReadResponse__ComputerUseMacosRequirements | null, readonly "windows"?: V2ConfigRequirementsReadResponse__ComputerUseWindowsRequirements | null } +export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema.Struct({ "allowLockedComputerUse": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "allowPersistentApproval": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "defaultAppAccess": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AllowDenyRequirement, Schema.Null])), "macos": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__ComputerUseMacosRequirements, Schema.Null])), "windows": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__ComputerUseWindowsRequirements, Schema.Null])) }) export type V2ConfigWriteResponse__OverriddenMetadata = { readonly "effectiveValue": Schema.Json, readonly "message": string, readonly "overridingLayer": V2ConfigWriteResponse__ConfigLayerMetadata } export const V2ConfigWriteResponse__OverriddenMetadata = Schema.Struct({ "effectiveValue": Schema.Json, "message": Schema.String, "overridingLayer": V2ConfigWriteResponse__ConfigLayerMetadata }) @@ -4716,20 +5670,23 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandbo 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, readonly "name": string, readonly "remotePluginId"?: string | null, readonly "shareContext"?: V2PluginInstalledResponse__PluginShareContext | null, readonly "source": V2PluginInstalledResponse__PluginSource, readonly "version"?: string | null } -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, "interface": Schema.optionalKey(Schema.Union([V2PluginInstalledResponse__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([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])) }) +export type V2PluginInstalledResponse__PluginSummary = { readonly "authPolicy": V2PluginInstalledResponse__PluginAuthPolicy, readonly "availability"?: "DISABLED_BY_ADMIN" | "AVAILABLE", readonly "disabledReason"?: V2PluginInstalledResponse__PluginDisabledReason | null, readonly "eligiblePlanTypes"?: ReadonlyArray | null, readonly "enabled": boolean, readonly "id": string, readonly "installPolicy": V2PluginInstalledResponse__PluginInstallPolicy, readonly "installPolicySource"?: V2PluginInstalledResponse__PluginInstallPolicySource | null, readonly "installed": boolean, readonly "installedAt"?: number | null, readonly "interface"?: V2PluginInstalledResponse__PluginInterface | null, readonly "keywords"?: ReadonlyArray, readonly "localVersion"?: string | null, readonly "mustShowInstallationInterstitial"?: boolean | null, readonly "name": string, readonly "remotePluginId"?: string | null, readonly "shareContext"?: V2PluginInstalledResponse__PluginShareContext | null, readonly "source": V2PluginInstalledResponse__PluginSource, readonly "version"?: string | null } +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" })), "disabledReason": Schema.optionalKey(Schema.Union([V2PluginInstalledResponse__PluginDisabledReason, Schema.Null]).annotate({ "description": "Why the remote plugin is unavailable, when provided by plugin-service." })), "eligiblePlanTypes": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Raw plugin-service plan identifiers eligible to install the plugin." }), Schema.Null])), "enabled": Schema.Boolean, "id": Schema.String, "installPolicy": V2PluginInstalledResponse__PluginInstallPolicy, "installPolicySource": Schema.optionalKey(Schema.Union([V2PluginInstalledResponse__PluginInstallPolicySource, Schema.Null])), "installed": Schema.Boolean, "installedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the remote plugin was installed, when available.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "interface": Schema.optionalKey(Schema.Union([V2PluginInstalledResponse__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([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])) }) + +export type V2PluginListResponse__PluginSummary = { readonly "authPolicy": V2PluginListResponse__PluginAuthPolicy, readonly "availability"?: "DISABLED_BY_ADMIN" | "AVAILABLE", readonly "disabledReason"?: V2PluginListResponse__PluginDisabledReason | null, readonly "eligiblePlanTypes"?: ReadonlyArray | null, readonly "enabled": boolean, readonly "id": string, readonly "installPolicy": V2PluginListResponse__PluginInstallPolicy, readonly "installPolicySource"?: V2PluginListResponse__PluginInstallPolicySource | null, readonly "installed": boolean, readonly "installedAt"?: number | null, 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 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" })), "disabledReason": Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginDisabledReason, Schema.Null]).annotate({ "description": "Why the remote plugin is unavailable, when provided by plugin-service." })), "eligiblePlanTypes": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Raw plugin-service plan identifiers eligible to install the plugin." }), Schema.Null])), "enabled": Schema.Boolean, "id": Schema.String, "installPolicy": V2PluginListResponse__PluginInstallPolicy, "installPolicySource": Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInstallPolicySource, Schema.Null])), "installed": Schema.Boolean, "installedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the remote plugin was installed, when available.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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 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 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 "disabledReason"?: V2PluginReadResponse__PluginDisabledReason | null, readonly "eligiblePlanTypes"?: ReadonlyArray | null, readonly "enabled": boolean, readonly "id": string, readonly "installPolicy": V2PluginReadResponse__PluginInstallPolicy, readonly "installPolicySource"?: V2PluginReadResponse__PluginInstallPolicySource | null, readonly "installed": boolean, readonly "installedAt"?: number | null, 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" })), "disabledReason": Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginDisabledReason, Schema.Null]).annotate({ "description": "Why the remote plugin is unavailable, when provided by plugin-service." })), "eligiblePlanTypes": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Raw plugin-service plan identifiers eligible to install the plugin." }), Schema.Null])), "enabled": Schema.Boolean, "id": Schema.String, "installPolicy": V2PluginReadResponse__PluginInstallPolicy, "installPolicySource": Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInstallPolicySource, Schema.Null])), "installed": Schema.Boolean, "installedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the remote plugin was installed, when available.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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 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 V2PluginSearchResponse__PluginSummary = { readonly "authPolicy": V2PluginSearchResponse__PluginAuthPolicy, readonly "availability"?: "DISABLED_BY_ADMIN" | "AVAILABLE", readonly "disabledReason"?: V2PluginSearchResponse__PluginDisabledReason | null, readonly "eligiblePlanTypes"?: ReadonlyArray | null, readonly "enabled": boolean, readonly "id": string, readonly "installPolicy": V2PluginSearchResponse__PluginInstallPolicy, readonly "installPolicySource"?: V2PluginSearchResponse__PluginInstallPolicySource | null, readonly "installed": boolean, readonly "installedAt"?: number | null, readonly "interface"?: V2PluginSearchResponse__PluginInterface | null, readonly "keywords"?: ReadonlyArray, readonly "localVersion"?: string | null, readonly "mustShowInstallationInterstitial"?: boolean | null, readonly "name": string, readonly "remotePluginId"?: string | null, readonly "shareContext"?: V2PluginSearchResponse__PluginShareContext | null, readonly "source": V2PluginSearchResponse__PluginSource, readonly "version"?: string | null } +export const V2PluginSearchResponse__PluginSummary = Schema.Struct({ "authPolicy": V2PluginSearchResponse__PluginAuthPolicy, "availability": Schema.optionalKey(Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({ "description": "Availability state for installing and using the plugin.", "default": "AVAILABLE" })), "disabledReason": Schema.optionalKey(Schema.Union([V2PluginSearchResponse__PluginDisabledReason, Schema.Null]).annotate({ "description": "Why the remote plugin is unavailable, when provided by plugin-service." })), "eligiblePlanTypes": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Raw plugin-service plan identifiers eligible to install the plugin." }), Schema.Null])), "enabled": Schema.Boolean, "id": Schema.String, "installPolicy": V2PluginSearchResponse__PluginInstallPolicy, "installPolicySource": Schema.optionalKey(Schema.Union([V2PluginSearchResponse__PluginInstallPolicySource, Schema.Null])), "installed": Schema.Boolean, "installedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the remote plugin was installed, when available.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "interface": Schema.optionalKey(Schema.Union([V2PluginSearchResponse__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([V2PluginSearchResponse__PluginShareContext, Schema.Null]).annotate({ "description": "Remote sharing context associated with this plugin when available." })), "source": V2PluginSearchResponse__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 type V2PluginShareListResponse__PluginSummary = { readonly "authPolicy": V2PluginShareListResponse__PluginAuthPolicy, readonly "availability"?: "DISABLED_BY_ADMIN" | "AVAILABLE", readonly "disabledReason"?: V2PluginShareListResponse__PluginDisabledReason | null, readonly "eligiblePlanTypes"?: ReadonlyArray | null, readonly "enabled": boolean, readonly "id": string, readonly "installPolicy": V2PluginShareListResponse__PluginInstallPolicy, readonly "installPolicySource"?: V2PluginShareListResponse__PluginInstallPolicySource | null, readonly "installed": boolean, readonly "installedAt"?: number | null, 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" })), "disabledReason": Schema.optionalKey(Schema.Union([V2PluginShareListResponse__PluginDisabledReason, Schema.Null]).annotate({ "description": "Why the remote plugin is unavailable, when provided by plugin-service." })), "eligiblePlanTypes": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Raw plugin-service plan identifiers eligible to install the plugin." }), Schema.Null])), "enabled": Schema.Boolean, "id": Schema.String, "installPolicy": V2PluginShareListResponse__PluginInstallPolicy, "installPolicySource": Schema.optionalKey(Schema.Union([V2PluginShareListResponse__PluginInstallPolicySource, Schema.Null])), "installed": Schema.Boolean, "installedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the remote plugin was installed, when available.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "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 type V2RawResponseItemCompletedNotification__ResponseItem = { readonly "content": ReadonlyArray, 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" } | { 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" } | { 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" } | { readonly "arguments": Schema.Json, 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" } | { 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" } | { 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" } | { 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 "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 "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])), "phase": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__MessagePhase, Schema.Null])), "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([Schema.Array(V2RawResponseItemCompletedNotification__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([V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, Schema.Null])), "summary": Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningResponseItemType" }) }).annotate({ "title": "ReasoningResponseItem" }), Schema.Struct({ "action": V2RawResponseItemCompletedNotification__LocalShellAction, "call_id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Set when using the Responses API." }), Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy id field retained for compatibility with older payloads." }), 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" }) }).annotate({ "title": "LocalShellCallResponseItem" }), 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])), "name": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("function_call").annotate({ "title": "FunctionCallResponseItemType" }) }).annotate({ "title": "FunctionCallResponseItem" }), Schema.Struct({ "arguments": Schema.Json, "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.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("tool_search_call").annotate({ "title": "ToolSearchCallResponseItemType" }) }).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" }) }).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])), "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" }) }).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({ "title": "CustomToolCallOutputResponseItemType" }) }).annotate({ "title": "CustomToolCallOutputResponseItem" }), 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.Json), "type": Schema.Literal("tool_search_output").annotate({ "title": "ToolSearchOutputResponseItemType" }) }).annotate({ "title": "ToolSearchOutputResponseItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction, Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "internal_chat_message_metadata_passthrough": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, 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])), "result": Schema.String, "revised_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": Schema.String, "type": Schema.Literal("image_generation_call").annotate({ "title": "ImageGenerationCallResponseItemType" }) }).annotate({ "title": "ImageGenerationCallResponseItem" }), 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" })], { mode: "oneOf" }) +export type V2RawResponseItemCompletedNotification__ResponseItem = { readonly "content": ReadonlyArray, 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" } | { 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" } | { readonly "arguments": string, readonly "call_id": string, readonly "encrypted_function_args"?: ReadonlyArray | null, readonly "id"?: string | null, readonly "internal_chat_message_metadata_passthrough"?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null, readonly "name": string, readonly "namespace"?: string | null, readonly "type": "function_call" } | { readonly "arguments": Schema.Json, 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 | null, readonly "id"?: string | null, readonly "internal_chat_message_metadata_passthrough"?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null, readonly "name"?: string | null, readonly "namespace"?: string | null, readonly "output": V2RawResponseItemCompletedNotification__FunctionCallOutputBody, readonly "type": "function_call_output" } | { 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" } | { 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" } | { 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 "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 "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])), "phase": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__MessagePhase, Schema.Null])), "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([Schema.Array(V2RawResponseItemCompletedNotification__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([V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, Schema.Null])), "summary": Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary), "type": Schema.Literal("reasoning").annotate({ "title": "ReasoningResponseItemType" }) }).annotate({ "title": "ReasoningResponseItem" }), Schema.Struct({ "action": V2RawResponseItemCompletedNotification__LocalShellAction, "call_id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Set when using the Responses API." }), Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy id field retained for compatibility with older payloads." }), 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" }) }).annotate({ "title": "LocalShellCallResponseItem" }), Schema.Struct({ "arguments": Schema.String, "call_id": Schema.String, "encrypted_function_args": Schema.optionalKey(Schema.Union([Schema.Array(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])), "name": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("function_call").annotate({ "title": "FunctionCallResponseItemType" }) }).annotate({ "title": "FunctionCallResponseItem" }), Schema.Struct({ "arguments": Schema.Json, "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.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("tool_search_call").annotate({ "title": "ToolSearchCallResponseItemType" }) }).annotate({ "title": "ToolSearchCallResponseItem" }), Schema.Struct({ "call_id": 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])), "name": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "output": V2RawResponseItemCompletedNotification__FunctionCallOutputBody, "type": Schema.Literal("function_call_output").annotate({ "title": "FunctionCallOutputResponseItemType" }) }).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])), "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" }) }).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({ "title": "CustomToolCallOutputResponseItemType" }) }).annotate({ "title": "CustomToolCallOutputResponseItem" }), 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.Json), "type": Schema.Literal("tool_search_output").annotate({ "title": "ToolSearchOutputResponseItemType" }) }).annotate({ "title": "ToolSearchOutputResponseItem" }), Schema.Struct({ "action": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction, Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "internal_chat_message_metadata_passthrough": Schema.optionalKey(Schema.Union([V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough, 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])), "result": Schema.String, "revised_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": Schema.String, "type": Schema.Literal("image_generation_call").annotate({ "title": "ImageGenerationCallResponseItemType" }) }).annotate({ "title": "ImageGenerationCallResponseItem" }), 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" })], { mode: "oneOf" }) export type V2ReviewStartResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ReviewStartResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ReviewStartResponse__TurnStatus } export const V2ReviewStartResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ReviewStartResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ReviewStartResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ReviewStartResponse__TurnStatus }) @@ -4749,15 +5706,21 @@ export const V2ThreadListResponse__Turn = Schema.Struct({ "completedAt": Schema. export type V2ThreadMetadataUpdateResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadMetadataUpdateResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadMetadataUpdateResponse__TurnStatus } export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadMetadataUpdateResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadMetadataUpdateResponse__TurnStatus }) +export type V2ThreadQueueStartResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadQueueStartResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadQueueStartResponse__TurnStatus } +export const V2ThreadQueueStartResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadQueueStartResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadQueueStartResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadQueueStartResponse__TurnStatus }) + export type V2ThreadReadResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadReadResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadReadResponse__TurnStatus } export const V2ThreadReadResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadReadResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadReadResponse__TurnStatus }) -export type V2ThreadResumeParams__ResponseItem = { readonly "content": ReadonlyArray, 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" } | { 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" } | { 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" } | { readonly "arguments": Schema.Json, 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" } | { 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" } | { 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" } | { 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 "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 "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])), "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" }), Schema.Struct({ "action": V2ThreadResumeParams__LocalShellAction, "call_id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Set when using the Responses API." }), Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy id field retained for compatibility with older payloads." }), 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" }) }).annotate({ "title": "LocalShellCallResponseItem" }), 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])), "name": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("function_call").annotate({ "title": "FunctionCallResponseItemType" }) }).annotate({ "title": "FunctionCallResponseItem" }), Schema.Struct({ "arguments": Schema.Json, "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.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("tool_search_call").annotate({ "title": "ToolSearchCallResponseItemType" }) }).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" }) }).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])), "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" }) }).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({ "title": "CustomToolCallOutputResponseItemType" }) }).annotate({ "title": "CustomToolCallOutputResponseItem" }), 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.Json), "type": Schema.Literal("tool_search_output").annotate({ "title": "ToolSearchOutputResponseItemType" }) }).annotate({ "title": "ToolSearchOutputResponseItem" }), Schema.Struct({ "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])), "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])), "result": Schema.String, "revised_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": Schema.String, "type": Schema.Literal("image_generation_call").annotate({ "title": "ImageGenerationCallResponseItemType" }) }).annotate({ "title": "ImageGenerationCallResponseItem" }), 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" })], { mode: "oneOf" }) +export type V2ThreadResumeParams__ResponseItem = { readonly "content": ReadonlyArray, 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" } | { 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" } | { readonly "arguments": string, readonly "call_id": string, readonly "encrypted_function_args"?: ReadonlyArray | null, readonly "id"?: string | null, readonly "internal_chat_message_metadata_passthrough"?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null, readonly "name": string, readonly "namespace"?: string | null, readonly "type": "function_call" } | { readonly "arguments": Schema.Json, 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 | null, readonly "id"?: string | null, readonly "internal_chat_message_metadata_passthrough"?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null, readonly "name"?: string | null, readonly "namespace"?: string | null, readonly "output": V2ThreadResumeParams__FunctionCallOutputBody, readonly "type": "function_call_output" } | { 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" } | { 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" } | { 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 "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 "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])), "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" }), Schema.Struct({ "action": V2ThreadResumeParams__LocalShellAction, "call_id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Set when using the Responses API." }), Schema.Null])), "id": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Legacy id field retained for compatibility with older payloads." }), 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" }) }).annotate({ "title": "LocalShellCallResponseItem" }), Schema.Struct({ "arguments": Schema.String, "call_id": Schema.String, "encrypted_function_args": Schema.optionalKey(Schema.Union([Schema.Array(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])), "name": Schema.String, "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("function_call").annotate({ "title": "FunctionCallResponseItemType" }) }).annotate({ "title": "FunctionCallResponseItem" }), Schema.Struct({ "arguments": Schema.Json, "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.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("tool_search_call").annotate({ "title": "ToolSearchCallResponseItemType" }) }).annotate({ "title": "ToolSearchCallResponseItem" }), Schema.Struct({ "call_id": 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])), "name": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "namespace": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "output": V2ThreadResumeParams__FunctionCallOutputBody, "type": Schema.Literal("function_call_output").annotate({ "title": "FunctionCallOutputResponseItemType" }) }).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])), "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" }) }).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({ "title": "CustomToolCallOutputResponseItemType" }) }).annotate({ "title": "CustomToolCallOutputResponseItem" }), 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.Json), "type": Schema.Literal("tool_search_output").annotate({ "title": "ToolSearchOutputResponseItemType" }) }).annotate({ "title": "ToolSearchOutputResponseItem" }), Schema.Struct({ "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])), "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])), "result": Schema.String, "revised_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "status": Schema.String, "type": Schema.Literal("image_generation_call").annotate({ "title": "ImageGenerationCallResponseItemType" }) }).annotate({ "title": "ImageGenerationCallResponseItem" }), 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" })], { mode: "oneOf" }) export type V2ThreadResumeResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadResumeResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadResumeResponse__TurnStatus } export const V2ThreadResumeResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadResumeResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadResumeResponse__TurnStatus }) +export type V2ThreadRevertResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadRevertResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadRevertResponse__TurnStatus } +export const V2ThreadRevertResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadRevertResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadRevertResponse__TurnStatus }) + export type V2ThreadRollbackResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadRollbackResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadRollbackResponse__TurnStatus } export const V2ThreadRollbackResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadRollbackResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadRollbackResponse__TurnStatus }) @@ -4773,6 +5736,9 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({ "completedAt": export type V2ThreadStartResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadStartResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadStartResponse__TurnStatus } export const V2ThreadStartResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadStartResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadStartResponse__TurnStatus }) +export type V2ThreadTimelineListResponse__ThreadTimelineEntry = { readonly "item": V2ThreadTimelineListResponse__ThreadItem, readonly "position": number, readonly "turnId": string, readonly "type": "item" } | { readonly "item": V2ThreadTimelineListResponse__ThreadRealtimeItem, readonly "position": number, readonly "type": "realtime" } | { readonly "position": number, readonly "started_at"?: number | null, readonly "turn_id": string, readonly "type": "turnStarted" } | { readonly "completed_at"?: number | null, readonly "duration_ms"?: number | null, readonly "error"?: V2ThreadTimelineListResponse__TurnError | null, readonly "position": number, readonly "started_at"?: number | null, readonly "status": V2ThreadTimelineListResponse__TurnStatus, readonly "turn_id": string, readonly "type": "turnCompleted" } +export const V2ThreadTimelineListResponse__ThreadTimelineEntry = Schema.Union([Schema.Struct({ "item": V2ThreadTimelineListResponse__ThreadItem, "position": Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "turnId": Schema.String, "type": Schema.Literal("item").annotate({ "title": "ItemThreadTimelineEntryType" }) }).annotate({ "title": "ItemThreadTimelineEntry" }), Schema.Struct({ "item": V2ThreadTimelineListResponse__ThreadRealtimeItem, "position": Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "type": Schema.Literal("realtime").annotate({ "title": "RealtimeThreadTimelineEntryType" }) }).annotate({ "title": "RealtimeThreadTimelineEntry" }), Schema.Struct({ "position": Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "started_at": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "turn_id": Schema.String, "type": Schema.Literal("turnStarted").annotate({ "title": "TurnStartedThreadTimelineEntryType" }) }).annotate({ "title": "TurnStartedThreadTimelineEntry" }), Schema.Struct({ "completed_at": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "duration_ms": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadTimelineListResponse__TurnError, Schema.Null])), "position": Schema.Number.annotate({ "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "started_at": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadTimelineListResponse__TurnStatus, "turn_id": Schema.String, "type": Schema.Literal("turnCompleted").annotate({ "title": "TurnCompletedThreadTimelineEntryType" }) }).annotate({ "title": "TurnCompletedThreadTimelineEntry" })], { mode: "oneOf" }).annotate({ "description": "EXPERIMENTAL - one item or turn boundary in canonical rollout order." }) + export type V2ThreadTurnsListResponse__Turn = { readonly "completedAt"?: number | null, readonly "durationMs"?: number | null, readonly "error"?: V2ThreadTurnsListResponse__TurnError | null, readonly "id": string, readonly "items": ReadonlyArray, readonly "itemsView"?: "notLoaded" | "summary" | "full", readonly "startedAt"?: number | null, readonly "status": V2ThreadTurnsListResponse__TurnStatus } export const V2ThreadTurnsListResponse__Turn = Schema.Struct({ "completedAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the turn completed.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "durationMs": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Duration between turn start and completion in milliseconds, if known.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "error": Schema.optionalKey(Schema.Union([V2ThreadTurnsListResponse__TurnError, Schema.Null]).annotate({ "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." }), "items": Schema.Array(V2ThreadTurnsListResponse__ThreadItem).annotate({ "description": "Thread items currently included in this turn payload." }), "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({ "description": "Unix timestamp (in seconds) when the turn started.", "format": "int64" }).check(Schema.isInt()), Schema.Null])), "status": V2ThreadTurnsListResponse__TurnStatus }) @@ -4809,8 +5775,8 @@ export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct 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, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: ServerNotification__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: ServerNotification__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": ServerNotification__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: ServerNotification__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const ServerNotification__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([ServerNotification__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([ServerNotification__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": ServerNotification__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(ServerNotification__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type ServerNotification__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: ServerNotification__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: ServerNotification__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: ServerNotification__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": ServerNotification__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: ServerNotification__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const ServerNotification__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([ServerNotification__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([ServerNotification__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([ServerNotification__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": ServerNotification__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(ServerNotification__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) export type ServerNotification__TurnCompletedNotification = { readonly "threadId": string, readonly "turn": ServerNotification__Turn } export const ServerNotification__TurnCompletedNotification = Schema.Struct({ "threadId": Schema.String, "turn": ServerNotification__Turn }) @@ -4824,6 +5790,12 @@ export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({ "e export type ServerRequest__McpElicitationEnumSchema = ServerRequest__McpElicitationSingleSelectEnumSchema | ServerRequest__McpElicitationMultiSelectEnumSchema | ServerRequest__McpElicitationLegacyTitledEnumSchema export const ServerRequest__McpElicitationEnumSchema = Schema.Union([ServerRequest__McpElicitationSingleSelectEnumSchema, ServerRequest__McpElicitationMultiSelectEnumSchema, ServerRequest__McpElicitationLegacyTitledEnumSchema]) +export type V2ConfigReadResponse__Config = { readonly "analytics"?: V2ConfigReadResponse__AnalyticsConfig | null, readonly "approval_policy"?: V2ConfigReadResponse__AskForApproval | null, readonly "approvals_reviewer"?: V2ConfigReadResponse__ApprovalsReviewer | null, readonly "apps"?: V2ConfigReadResponse__AppsConfig | null, readonly "browser_use"?: V2ConfigReadResponse__BrowserUseConfig | null, readonly "compact_prompt"?: string | null, readonly "computer_use"?: V2ConfigReadResponse__ComputerUseConfig | null, readonly "desktop"?: { readonly [x: string]: Schema.Json } | 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 "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 "tools"?: V2ConfigReadResponse__ToolsV2 | null, readonly "web_search"?: V2ConfigReadResponse__WebSearchMode | null, readonly [x: string]: Schema.Json } +export const V2ConfigReadResponse__Config = 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." })), "apps": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__AppsConfig, Schema.Null])), "browser_use": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__BrowserUseConfig, Schema.Null])), "compact_prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "computer_use": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ComputerUseConfig, Schema.Null])), "desktop": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json), 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])), "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])), "model_reasoning_summary": Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ReasoningSummary, Schema.Null])), "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])), "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])) }), [Schema.Record(Schema.String, Schema.Json)]) + +export type V2ConfigRequirementsReadResponse__ConfigRequirements = { readonly "additionalDeveloperInstructions"?: string | null, readonly "allowAppshots"?: boolean | null, readonly "allowBrowserAndComputerUse"?: boolean | null, readonly "allowLoginShell"?: boolean | null, readonly "allowManagedHooksOnly"?: boolean | null, readonly "allowRemoteControl"?: boolean | null, readonly "allowedApprovalPolicies"?: ReadonlyArray | null, readonly "allowedApprovalsReviewers"?: ReadonlyArray | null, readonly "allowedPermissionProfiles"?: { readonly [x: string]: boolean } | null, readonly "allowedSandboxModes"?: ReadonlyArray | null, readonly "allowedWebSearchModes"?: ReadonlyArray | null, readonly "allowedWindowsSandboxImplementations"?: ReadonlyArray | null, readonly "autoReview"?: V2ConfigRequirementsReadResponse__AutoReviewRequirements | null, readonly "browserUse"?: V2ConfigRequirementsReadResponse__BrowserUseRequirements | null, readonly "chatgptBaseUrl"?: string | null, readonly "checkForUpdateOnStartup"?: boolean | null, readonly "cliAuthCredentialsStore"?: V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode | null, readonly "computerUse"?: V2ConfigRequirementsReadResponse__ComputerUseRequirements | null, readonly "defaultPermissions"?: string | null, readonly "enforceResidency"?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null, readonly "featureRequirements"?: { readonly [x: string]: boolean } | null, readonly "feedback"?: V2ConfigRequirementsReadResponse__FeedbackRequirements | null, readonly "hooks"?: V2ConfigRequirementsReadResponse__ManagedHooksRequirements | null, readonly "inAppBrowser"?: V2ConfigRequirementsReadResponse__InAppBrowserRequirements | null, readonly "logDir"?: string | null, readonly "modelCatalogJson"?: string | null, readonly "models"?: V2ConfigRequirementsReadResponse__ModelsRequirements | null, readonly "network"?: V2ConfigRequirementsReadResponse__NetworkRequirements | null, readonly "sqliteHome"?: string | null, readonly "windowsSandboxPrivateDesktop"?: boolean | null } +export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({ "additionalDeveloperInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "allowAppshots": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "allowBrowserAndComputerUse": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "allowLoginShell": 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])), "allowedApprovalsReviewers": Schema.optionalKey(Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__ApprovalsReviewer), 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])), "autoReview": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__AutoReviewRequirements, Schema.Null])), "browserUse": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__BrowserUseRequirements, Schema.Null])), "chatgptBaseUrl": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "checkForUpdateOnStartup": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "cliAuthCredentialsStore": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode, 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])), "feedback": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__FeedbackRequirements, Schema.Null])), "hooks": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__ManagedHooksRequirements, Schema.Null])), "inAppBrowser": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__InAppBrowserRequirements, Schema.Null])), "logDir": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "modelCatalogJson": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "models": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__ModelsRequirements, Schema.Null])), "network": Schema.optionalKey(Schema.Union([V2ConfigRequirementsReadResponse__NetworkRequirements, Schema.Null])), "sqliteHome": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "windowsSandboxPrivateDesktop": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }) + export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = { readonly "entries"?: ReadonlyArray | null, readonly "globScanMaxDepth"?: number | null, readonly "read"?: ReadonlyArray | null, readonly "write"?: ReadonlyArray | null } export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = Schema.Struct({ "entries": Schema.optionalKey(Schema.Union([Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__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(V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString).annotate({ "description": "This will be removed in favor of `entries`." }), Schema.Null])), "write": Schema.optionalKey(Schema.Union([Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString).annotate({ "description": "This will be removed in favor of `entries`." }), Schema.Null])) }) @@ -4839,38 +5811,41 @@ export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({ "int 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 V2PluginSearchResponse__PluginSearchResult = { readonly "marketplaceName": string, readonly "marketplacePath"?: V2PluginSearchResponse__AbsolutePathBuf | null, readonly "plugin": V2PluginSearchResponse__PluginSummary } +export const V2PluginSearchResponse__PluginSearchResult = Schema.Struct({ "marketplaceName": Schema.String, "marketplacePath": Schema.optionalKey(Schema.Union([V2PluginSearchResponse__AbsolutePathBuf, Schema.Null])), "plugin": V2PluginSearchResponse__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 }) -export type V2ThreadForkResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadForkResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadForkResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadForkResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadForkResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadForkResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadForkResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadForkResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadForkResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadForkResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadForkResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadForkResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadForkResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadForkResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadForkResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadForkResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadForkResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadListResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadListResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadListResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadListResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadListResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadListResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadListResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadListResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadListResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadListResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadListResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadListResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadListResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadListResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadListResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadListResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadListResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadListResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadListResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadListResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadMetadataUpdateResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadMetadataUpdateResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadMetadataUpdateResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadMetadataUpdateResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadMetadataUpdateResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadMetadataUpdateResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadMetadataUpdateResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadMetadataUpdateResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadMetadataUpdateResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadMetadataUpdateResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadMetadataUpdateResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadMetadataUpdateResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadMetadataUpdateResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadMetadataUpdateResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadMetadataUpdateResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadReadResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadReadResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadReadResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadReadResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadReadResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadReadResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadReadResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadReadResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadReadResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadReadResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadReadResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadReadResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadReadResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadReadResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadReadResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadReadResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadReadResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadResumeResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadResumeResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadResumeResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadResumeResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadResumeResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadResumeResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadResumeResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadResumeResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadResumeResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadResumeResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadResumeResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadResumeResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadResumeResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadResumeResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadResumeResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadResumeResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadResumeResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) 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 V2ThreadSearchResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadSearchResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadSearchResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadSearchResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadSearchResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadSearchResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadSearchResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadSearchResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { mode: "oneOf" }).annotate({ "description": "Current runtime status for the thread." }), "threadSource": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ThreadSource, Schema.Null]).annotate({ "description": "Optional analytics source classification for this thread." })), "turns": Schema.Array(V2ThreadSearchResponse__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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadSearchResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadSearchResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadSearchResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadSearchResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadSearchResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadSearchResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadSearchResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadSearchResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadSearchResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { mode: "oneOf" }).annotate({ "description": "Current runtime status for the thread." }), "threadSource": Schema.optionalKey(Schema.Union([V2ThreadSearchResponse__ThreadSource, Schema.Null]).annotate({ "description": "Optional analytics source classification for this thread." })), "turns": Schema.Array(V2ThreadSearchResponse__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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadStartedNotification__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadStartedNotification__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadStartedNotification__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadStartedNotification__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadStartedNotification__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadStartedNotification__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadStartedNotification__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadStartedNotification__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadStartedNotification__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadStartedNotification__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadStartedNotification__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadStartedNotification__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadStartedNotification__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadStartedNotification__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadStartedNotification__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadStartedNotification__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadStartedNotification__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadStartedNotification__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadStartResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadStartResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadStartResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadStartResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadStartResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadStartResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadStartResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadStartResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadStartResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadStartResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadStartResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadStartResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadStartResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadStartResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadStartResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadStartResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadStartResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) -export type V2ThreadUnarchiveResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadUnarchiveResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadUnarchiveResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadUnarchiveResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadUnarchiveResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadUnarchiveResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadUnarchiveResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadUnarchiveResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadUnarchiveResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadUnarchiveResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadUnarchiveResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadUnarchiveResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadUnarchiveResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadUnarchiveResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadUnarchiveResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadUnarchiveResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) export type CommandExecutionRequestApprovalParams__AdditionalPermissionProfile = { readonly "fileSystem"?: CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions | null, readonly "network"?: CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions | null } export const CommandExecutionRequestApprovalParams__AdditionalPermissionProfile = Schema.Struct({ "fileSystem": Schema.optionalKey(Schema.Union([CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null])), "network": Schema.optionalKey(Schema.Union([CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]).annotate({ "description": "Partial overlay used for per-command permission requests." })) }) @@ -4911,11 +5886,11 @@ export const V2ThreadSearchResponse__ThreadSearchResult = Schema.Struct({ "snipp export type McpServerElicitationRequestParams__McpElicitationSchema = { readonly "$schema"?: string | null, readonly "properties": { readonly [x: string]: McpServerElicitationRequestParams__McpElicitationPrimitiveSchema }, readonly "required"?: ReadonlyArray | null, readonly "type": McpServerElicitationRequestParams__McpElicitationObjectType } export const McpServerElicitationRequestParams__McpElicitationSchema = Schema.Struct({ "$schema": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "properties": Schema.Record(Schema.String, McpServerElicitationRequestParams__McpElicitationPrimitiveSchema), "required": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "type": McpServerElicitationRequestParams__McpElicitationObjectType }).annotate({ "description": "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 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 "approvalId": string, readonly "cwd": ServerNotification__LegacyAppPathString, readonly "processId": string, readonly "stdin": string, readonly "type": "writeStdin" } | { 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({ "approvalId": Schema.String, "cwd": ServerNotification__LegacyAppPathString, "processId": Schema.String, "stdin": Schema.String, "type": Schema.Literal("writeStdin").annotate({ "title": "WriteStdinGuardianApprovalReviewActionType" }) }).annotate({ "title": "WriteStdinGuardianApprovalReviewAction", "description": "A child approval for input to an existing command execution item." }), 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__CommandExecutionRequestApprovalParams = { readonly "additionalPermissions"?: ServerRequest__AdditionalPermissionProfile | null, readonly "approvalId"?: string | null, readonly "availableDecisions"?: ReadonlyArray | null, readonly "command"?: string | null, readonly "commandActions"?: ReadonlyArray | null, readonly "cwd"?: ServerRequest__LegacyAppPathString | null, readonly "environmentId"?: 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 } -export const ServerRequest__CommandExecutionRequestApprovalParams = Schema.Struct({ "additionalPermissions": Schema.optionalKey(Schema.Union([ServerRequest__AdditionalPermissionProfile, Schema.Null]).annotate({ "description": "Optional additional permissions requested for this command." })), "approvalId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing." }), Schema.Null])), "availableDecisions": Schema.optionalKey(Schema.Union([Schema.Array(ServerRequest__CommandExecutionApprovalDecision).annotate({ "description": "Ordered list of decisions the client may present for this prompt." }), Schema.Null])), "command": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command to be executed." }), Schema.Null])), "commandActions": Schema.optionalKey(Schema.Union([Schema.Array(ServerRequest__CommandAction).annotate({ "description": "Best-effort parsed command actions for friendly display." }), Schema.Null])), "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.Null])), "itemId": Schema.String, "networkApprovalContext": Schema.optionalKey(Schema.Union([ServerRequest__NetworkApprovalContext, Schema.Null]).annotate({ "description": "Optional context for a managed-network approval prompt." })), "proposedExecpolicyAmendment": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional proposed execpolicy amendment to allow similar commands without prompting." }), Schema.Null])), "proposedNetworkPolicyAmendments": Schema.optionalKey(Schema.Union([Schema.Array(ServerRequest__NetworkPolicyAmendment).annotate({ "description": "Optional proposed network policy amendments (allow/deny host) for future requests." }), Schema.Null])), "reason": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional explanatory reason (e.g. request for network access)." }), 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__CommandExecutionRequestApprovalParams = { readonly "additionalPermissions"?: ServerRequest__AdditionalPermissionProfile | null, readonly "approvalId"?: string | null, readonly "availableDecisions"?: ReadonlyArray | null, readonly "command"?: string | null, readonly "commandActions"?: ReadonlyArray | null, readonly "cwd"?: ServerRequest__LegacyAppPathString | null, readonly "environmentId"?: string | null, readonly "itemId": string, readonly "kind"?: "command" | "writeStdin", 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 } +export const ServerRequest__CommandExecutionRequestApprovalParams = Schema.Struct({ "additionalPermissions": Schema.optionalKey(Schema.Union([ServerRequest__AdditionalPermissionProfile, Schema.Null]).annotate({ "description": "Optional additional permissions requested for this command." })), "approvalId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing. Stdin approvals also use a distinct callback id; inspect `kind` to distinguish them." }), Schema.Null])), "availableDecisions": Schema.optionalKey(Schema.Union([Schema.Array(ServerRequest__CommandExecutionApprovalDecision).annotate({ "description": "Ordered list of decisions the client may present for this prompt." }), Schema.Null])), "command": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command to be executed." }), Schema.Null])), "commandActions": Schema.optionalKey(Schema.Union([Schema.Array(ServerRequest__CommandAction).annotate({ "description": "Best-effort parsed command actions for friendly display." }), Schema.Null])), "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.Null])), "itemId": Schema.String, "kind": Schema.optionalKey(Schema.Literals(["command", "writeStdin"]).annotate({ "description": "Distinguishes a command approval from input sent to an existing terminal.", "default": "command" })), "networkApprovalContext": Schema.optionalKey(Schema.Union([ServerRequest__NetworkApprovalContext, Schema.Null]).annotate({ "description": "Optional context for a managed-network approval prompt." })), "proposedExecpolicyAmendment": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional proposed execpolicy amendment to allow similar commands without prompting." }), Schema.Null])), "proposedNetworkPolicyAmendments": Schema.optionalKey(Schema.Union([Schema.Array(ServerRequest__NetworkPolicyAmendment).annotate({ "description": "Optional proposed network policy amendments (allow/deny host) for future requests." }), Schema.Null])), "reason": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional explanatory reason (e.g. request for network access)." }), 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__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 }) @@ -4923,17 +5898,17 @@ export const ServerRequest__PermissionsRequestApprovalParams = Schema.Struct({ " export type ServerRequest__McpElicitationSchema = { readonly "$schema"?: string | null, readonly "properties": { readonly [x: string]: ServerRequest__McpElicitationPrimitiveSchema }, readonly "required"?: ReadonlyArray | null, readonly "type": ServerRequest__McpElicitationObjectType } export const ServerRequest__McpElicitationSchema = Schema.Struct({ "$schema": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "properties": Schema.Record(Schema.String, ServerRequest__McpElicitationPrimitiveSchema), "required": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), "type": ServerRequest__McpElicitationObjectType }).annotate({ "description": "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 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 "approvalId": string, readonly "cwd": V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, readonly "processId": string, readonly "stdin": string, readonly "type": "writeStdin" } | { 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({ "approvalId": Schema.String, "cwd": V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, "processId": Schema.String, "stdin": Schema.String, "type": Schema.Literal("writeStdin").annotate({ "title": "WriteStdinGuardianApprovalReviewActionType" }) }).annotate({ "title": "WriteStdinGuardianApprovalReviewAction", "description": "A child approval for input to an existing command execution item." }), 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 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 "approvalId": string, readonly "cwd": V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, readonly "processId": string, readonly "stdin": string, readonly "type": "writeStdin" } | { 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({ "approvalId": Schema.String, "cwd": V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, "processId": Schema.String, "stdin": Schema.String, "type": Schema.Literal("writeStdin").annotate({ "title": "WriteStdinGuardianApprovalReviewActionType" }) }).annotate({ "title": "WriteStdinGuardianApprovalReviewAction", "description": "A child approval for input to an existing command execution item." }), 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 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) - stdin reviews, which refer to the existing parent command item and have a separate approval ID in the action payload - 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 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) - stdin reviews, which refer to the existing parent command item and have a separate approval ID in the action payload - 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"?: Schema.Json, readonly "message": string, readonly "mode": "form", readonly "requestedSchema": ServerRequest__McpElicitationSchema, readonly "serverName": string, readonly "threadId": string, readonly "turnId"?: string | null } | { readonly "_meta"?: Schema.Json, readonly "message": string, readonly "mode": "openai/form", readonly "requestedSchema": Schema.Json, readonly "serverName": string, readonly "threadId": string, readonly "turnId"?: string | null } | { readonly "_meta"?: Schema.Json, readonly "elicitationId": string, readonly "message": string, readonly "mode": "url", readonly "url": string, readonly "serverName": string, readonly "threadId": string, readonly "turnId"?: string | null } export const ServerRequest__McpServerElicitationRequestParams = Schema.Union([Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "message": Schema.String, "mode": Schema.Literal("form"), "requestedSchema": ServerRequest__McpElicitationSchema, "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.Json), "message": Schema.String, "mode": Schema.Literal("openai/form"), "requestedSchema": Schema.Json, "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.Json), "elicitationId": Schema.String, "message": Schema.String, "mode": Schema.Literal("url"), "url": Schema.String, "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])) })], { mode: "oneOf" }) @@ -4959,8 +5934,8 @@ export const ChatgptAuthTokensRefreshResponse = Schema.Struct({ "accessToken": S export type ClientNotification = { readonly "method": "initialized" } export const ClientNotification = Schema.Union([Schema.Struct({ "method": Schema.Literal("initialized").annotate({ "title": "InitializedNotificationMethod" }) }).annotate({ "title": "InitializedNotification" })], { mode: "oneOf" }).annotate({ "title": "ClientNotification" }) -export type ClientRequest = { readonly "id": ClientRequest__RequestId, readonly "method": "initialize", readonly "params": ClientRequest__InitializeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/start", readonly "params": ClientRequest__ThreadStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/resume", readonly "params": ClientRequest__ThreadResumeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/fork", readonly "params": ClientRequest__ThreadForkParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__ThreadUnsubscribeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/increment_elicitation", readonly "params": ClientRequest__ThreadIncrementElicitationParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/decrement_elicitation", readonly "params": ClientRequest__ThreadDecrementElicitationParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__ThreadMetadataUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/settings/update", readonly "params": ClientRequest__ThreadSettingsUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/memoryMode/set", readonly "params": ClientRequest__ThreadMemoryModeSetParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "memory/reset", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/unarchive", readonly "params": ClientRequest__ThreadUnarchiveParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/compact/start", readonly "params": ClientRequest__ThreadCompactStartParams } | { readonly "id": ClientRequest__RequestId, 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/backgroundTerminals/clean", readonly "params": ClientRequest__ThreadBackgroundTerminalsCleanParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/backgroundTerminals/list", readonly "params": ClientRequest__ThreadBackgroundTerminalsListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/backgroundTerminals/terminate", readonly "params": ClientRequest__ThreadBackgroundTerminalsTerminateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/rollback", readonly "params": ClientRequest__ThreadRollbackParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/list", readonly "params": ClientRequest__ThreadListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/search", readonly "params": ClientRequest__ThreadSearchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/searchOccurrences", readonly "params": ClientRequest__ThreadSearchOccurrencesParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/loaded/list", readonly "params": ClientRequest__ThreadLoadedListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/read", readonly "params": ClientRequest__ThreadReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/turns/list", readonly "params": ClientRequest__ThreadTurnsListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/items/list", readonly "params": ClientRequest__ThreadItemsListParams } | { 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", readonly "params": ClientRequest__FsReadFileParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/writeFile", readonly "params": ClientRequest__FsWriteFileParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/createDirectory", readonly "params": ClientRequest__FsCreateDirectoryParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/getMetadata", readonly "params": ClientRequest__FsGetMetadataParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/readDirectory", readonly "params": ClientRequest__FsReadDirectoryParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/remove", readonly "params": ClientRequest__FsRemoveParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/copy", readonly "params": ClientRequest__FsCopyParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/watch", readonly "params": ClientRequest__FsWatchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/unwatch", readonly "params": ClientRequest__FsUnwatchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "skills/config/write", readonly "params": ClientRequest__SkillsConfigWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "plugin/install", readonly "params": ClientRequest__PluginInstallParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "plugin/uninstall", readonly "params": ClientRequest__PluginUninstallParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "turn/start", readonly "params": ClientRequest__TurnStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "turn/steer", readonly "params": ClientRequest__TurnSteerParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "turn/interrupt", readonly "params": ClientRequest__TurnInterruptParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/start", readonly "params": ClientRequest__ThreadRealtimeStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/appendAudio", readonly "params": ClientRequest__ThreadRealtimeAppendAudioParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/appendText", readonly "params": ClientRequest__ThreadRealtimeAppendTextParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/appendSpeech", readonly "params": ClientRequest__ThreadRealtimeAppendSpeechParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/stop", readonly "params": ClientRequest__ThreadRealtimeStopParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/listVoices", readonly "params": ClientRequest__ThreadRealtimeListVoicesParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "review/start", readonly "params": ClientRequest__ReviewStartParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__ExperimentalFeatureEnablementSetParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/enable", readonly "params"?: ClientRequest__RemoteControlEnableParams | null } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/disable", readonly "params"?: ClientRequest__RemoteControlDisableParams | null } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/status/read", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/pairing/start", readonly "params": ClientRequest__RemoteControlPairingStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/pairing/status", readonly "params": ClientRequest__RemoteControlPairingStatusParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/client/list", readonly "params": ClientRequest__RemoteControlClientsListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/client/revoke", readonly "params": ClientRequest__RemoteControlClientsRevokeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "collaborationMode/list", readonly "params": ClientRequest__CollaborationModeListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mock/experimentalMethod", readonly "params": ClientRequest__MockExperimentalMethodParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "environment/add", readonly "params": ClientRequest__EnvironmentAddParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "environment/info", readonly "params": ClientRequest__EnvironmentInfoParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "environment/status", readonly "params": ClientRequest__EnvironmentStatusParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/oauth/login", readonly "params": ClientRequest__McpServerOauthLoginParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/mcpServer/reload", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServerStatus/list", readonly "params": ClientRequest__ListMcpServerStatusParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/resource/read", readonly "params": ClientRequest__McpResourceReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/tool/call", readonly "params": ClientRequest__McpServerToolCallParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__LoginAccountParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/login/cancel", readonly "params": ClientRequest__CancelLoginAccountParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/logout", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__FeedbackUploadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec", readonly "params": ClientRequest__CommandExecParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec/write", readonly "params": ClientRequest__CommandExecWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec/terminate", readonly "params": ClientRequest__CommandExecTerminateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec/resize", readonly "params": ClientRequest__CommandExecResizeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/spawn", readonly "params": ClientRequest__ProcessSpawnParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/writeStdin", readonly "params": ClientRequest__ProcessWriteStdinParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/kill", readonly "params": ClientRequest__ProcessKillParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/resizePty", readonly "params": ClientRequest__ProcessResizePtyParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/read", readonly "params": ClientRequest__ConfigReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/detect", readonly "params": ClientRequest__ExternalAgentConfigDetectParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/import", readonly "params": ClientRequest__ExternalAgentConfigImportParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/import/recordHistory", readonly "params": ClientRequest__ExternalAgentConfigImportHistoryRecordParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/import/readHistories", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/value/write", readonly "params": ClientRequest__ConfigValueWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/batchWrite", readonly "params": ClientRequest__ConfigBatchWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "configRequirements/read", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/read", readonly "params": ClientRequest__GetAccountParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch", readonly "params": ClientRequest__FuzzyFileSearchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch/sessionStart", readonly "params": ClientRequest__FuzzyFileSearchSessionStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch/sessionUpdate", readonly "params": ClientRequest__FuzzyFileSearchSessionUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch/sessionStop", readonly "params": ClientRequest__FuzzyFileSearchSessionStopParams } -export const ClientRequest = Schema.Union([Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("initialize").annotate({ "title": "InitializeRequestMethod" }), "params": ClientRequest__InitializeParams }).annotate({ "title": "InitializeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/start").annotate({ "title": "Thread/startRequestMethod" }), "params": ClientRequest__ThreadStartParams }).annotate({ "title": "Thread/startRequest", "description": "NEW APIs" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/resume").annotate({ "title": "Thread/resumeRequestMethod" }), "params": ClientRequest__ThreadResumeParams }).annotate({ "title": "Thread/resumeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/fork").annotate({ "title": "Thread/forkRequestMethod" }), "params": ClientRequest__ThreadForkParams }).annotate({ "title": "Thread/forkRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "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({ "title": "Thread/unsubscribeRequestMethod" }), "params": ClientRequest__ThreadUnsubscribeParams }).annotate({ "title": "Thread/unsubscribeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/increment_elicitation").annotate({ "title": "Thread/incrementElicitationRequestMethod" }), "params": ClientRequest__ThreadIncrementElicitationParams }).annotate({ "title": "Thread/incrementElicitationRequest", "description": "Increment the thread-local out-of-band elicitation counter.\n\nThis is used by external helpers to pause timeout accounting while a user approval or other elicitation is pending outside the app-server request flow." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/decrement_elicitation").annotate({ "title": "Thread/decrementElicitationRequestMethod" }), "params": ClientRequest__ThreadDecrementElicitationParams }).annotate({ "title": "Thread/decrementElicitationRequest", "description": "Decrement the thread-local out-of-band elicitation counter.\n\nWhen the count reaches zero, timeout accounting resumes for the thread." }), Schema.Struct({ "id": ClientRequest__RequestId, "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({ "title": "Thread/metadata/updateRequestMethod" }), "params": ClientRequest__ThreadMetadataUpdateParams }).annotate({ "title": "Thread/metadata/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/settings/update").annotate({ "title": "Thread/settings/updateRequestMethod" }), "params": ClientRequest__ThreadSettingsUpdateParams }).annotate({ "title": "Thread/settings/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/memoryMode/set").annotate({ "title": "Thread/memoryMode/setRequestMethod" }), "params": ClientRequest__ThreadMemoryModeSetParams }).annotate({ "title": "Thread/memoryMode/setRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("memory/reset").annotate({ "title": "Memory/resetRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "Memory/resetRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/unarchive").annotate({ "title": "Thread/unarchiveRequestMethod" }), "params": ClientRequest__ThreadUnarchiveParams }).annotate({ "title": "Thread/unarchiveRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/compact/start").annotate({ "title": "Thread/compact/startRequestMethod" }), "params": ClientRequest__ThreadCompactStartParams }).annotate({ "title": "Thread/compact/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/shellCommand").annotate({ "title": "Thread/shellCommandRequestMethod" }), "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/backgroundTerminals/clean").annotate({ "title": "Thread/backgroundTerminals/cleanRequestMethod" }), "params": ClientRequest__ThreadBackgroundTerminalsCleanParams }).annotate({ "title": "Thread/backgroundTerminals/cleanRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/backgroundTerminals/list").annotate({ "title": "Thread/backgroundTerminals/listRequestMethod" }), "params": ClientRequest__ThreadBackgroundTerminalsListParams }).annotate({ "title": "Thread/backgroundTerminals/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/backgroundTerminals/terminate").annotate({ "title": "Thread/backgroundTerminals/terminateRequestMethod" }), "params": ClientRequest__ThreadBackgroundTerminalsTerminateParams }).annotate({ "title": "Thread/backgroundTerminals/terminateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/rollback").annotate({ "title": "Thread/rollbackRequestMethod" }), "params": ClientRequest__ThreadRollbackParams }).annotate({ "title": "Thread/rollbackRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/list").annotate({ "title": "Thread/listRequestMethod" }), "params": ClientRequest__ThreadListParams }).annotate({ "title": "Thread/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/search").annotate({ "title": "Thread/searchRequestMethod" }), "params": ClientRequest__ThreadSearchParams }).annotate({ "title": "Thread/searchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/searchOccurrences").annotate({ "title": "Thread/searchOccurrencesRequestMethod" }), "params": ClientRequest__ThreadSearchOccurrencesParams }).annotate({ "title": "Thread/searchOccurrencesRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/loaded/list").annotate({ "title": "Thread/loaded/listRequestMethod" }), "params": ClientRequest__ThreadLoadedListParams }).annotate({ "title": "Thread/loaded/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "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/turns/list").annotate({ "title": "Thread/turns/listRequestMethod" }), "params": ClientRequest__ThreadTurnsListParams }).annotate({ "title": "Thread/turns/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/items/list").annotate({ "title": "Thread/items/listRequestMethod" }), "params": ClientRequest__ThreadItemsListParams }).annotate({ "title": "Thread/items/listRequest" }), 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" }), "params": ClientRequest__FsReadFileParams }).annotate({ "title": "Fs/readFileRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/writeFile").annotate({ "title": "Fs/writeFileRequestMethod" }), "params": ClientRequest__FsWriteFileParams }).annotate({ "title": "Fs/writeFileRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/createDirectory").annotate({ "title": "Fs/createDirectoryRequestMethod" }), "params": ClientRequest__FsCreateDirectoryParams }).annotate({ "title": "Fs/createDirectoryRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/getMetadata").annotate({ "title": "Fs/getMetadataRequestMethod" }), "params": ClientRequest__FsGetMetadataParams }).annotate({ "title": "Fs/getMetadataRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/readDirectory").annotate({ "title": "Fs/readDirectoryRequestMethod" }), "params": ClientRequest__FsReadDirectoryParams }).annotate({ "title": "Fs/readDirectoryRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/remove").annotate({ "title": "Fs/removeRequestMethod" }), "params": ClientRequest__FsRemoveParams }).annotate({ "title": "Fs/removeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/copy").annotate({ "title": "Fs/copyRequestMethod" }), "params": ClientRequest__FsCopyParams }).annotate({ "title": "Fs/copyRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/watch").annotate({ "title": "Fs/watchRequestMethod" }), "params": ClientRequest__FsWatchParams }).annotate({ "title": "Fs/watchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/unwatch").annotate({ "title": "Fs/unwatchRequestMethod" }), "params": ClientRequest__FsUnwatchParams }).annotate({ "title": "Fs/unwatchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("skills/config/write").annotate({ "title": "Skills/config/writeRequestMethod" }), "params": ClientRequest__SkillsConfigWriteParams }).annotate({ "title": "Skills/config/writeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("plugin/install").annotate({ "title": "Plugin/installRequestMethod" }), "params": ClientRequest__PluginInstallParams }).annotate({ "title": "Plugin/installRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("plugin/uninstall").annotate({ "title": "Plugin/uninstallRequestMethod" }), "params": ClientRequest__PluginUninstallParams }).annotate({ "title": "Plugin/uninstallRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("turn/start").annotate({ "title": "Turn/startRequestMethod" }), "params": ClientRequest__TurnStartParams }).annotate({ "title": "Turn/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("turn/steer").annotate({ "title": "Turn/steerRequestMethod" }), "params": ClientRequest__TurnSteerParams }).annotate({ "title": "Turn/steerRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("turn/interrupt").annotate({ "title": "Turn/interruptRequestMethod" }), "params": ClientRequest__TurnInterruptParams }).annotate({ "title": "Turn/interruptRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/start").annotate({ "title": "Thread/realtime/startRequestMethod" }), "params": ClientRequest__ThreadRealtimeStartParams }).annotate({ "title": "Thread/realtime/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/appendAudio").annotate({ "title": "Thread/realtime/appendAudioRequestMethod" }), "params": ClientRequest__ThreadRealtimeAppendAudioParams }).annotate({ "title": "Thread/realtime/appendAudioRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/appendText").annotate({ "title": "Thread/realtime/appendTextRequestMethod" }), "params": ClientRequest__ThreadRealtimeAppendTextParams }).annotate({ "title": "Thread/realtime/appendTextRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/appendSpeech").annotate({ "title": "Thread/realtime/appendSpeechRequestMethod" }), "params": ClientRequest__ThreadRealtimeAppendSpeechParams }).annotate({ "title": "Thread/realtime/appendSpeechRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/stop").annotate({ "title": "Thread/realtime/stopRequestMethod" }), "params": ClientRequest__ThreadRealtimeStopParams }).annotate({ "title": "Thread/realtime/stopRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/listVoices").annotate({ "title": "Thread/realtime/listVoicesRequestMethod" }), "params": ClientRequest__ThreadRealtimeListVoicesParams }).annotate({ "title": "Thread/realtime/listVoicesRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("review/start").annotate({ "title": "Review/startRequestMethod" }), "params": ClientRequest__ReviewStartParams }).annotate({ "title": "Review/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "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({ "title": "ExperimentalFeature/listRequestMethod" }), "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({ "title": "ExperimentalFeature/enablement/setRequestMethod" }), "params": ClientRequest__ExperimentalFeatureEnablementSetParams }).annotate({ "title": "ExperimentalFeature/enablement/setRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/enable").annotate({ "title": "RemoteControl/enableRequestMethod" }), "params": Schema.optionalKey(Schema.Union([ClientRequest__RemoteControlEnableParams, Schema.Null])) }).annotate({ "title": "RemoteControl/enableRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/disable").annotate({ "title": "RemoteControl/disableRequestMethod" }), "params": Schema.optionalKey(Schema.Union([ClientRequest__RemoteControlDisableParams, Schema.Null])) }).annotate({ "title": "RemoteControl/disableRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/status/read").annotate({ "title": "RemoteControl/status/readRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "RemoteControl/status/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/pairing/start").annotate({ "title": "RemoteControl/pairing/startRequestMethod" }), "params": ClientRequest__RemoteControlPairingStartParams }).annotate({ "title": "RemoteControl/pairing/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/pairing/status").annotate({ "title": "RemoteControl/pairing/statusRequestMethod" }), "params": ClientRequest__RemoteControlPairingStatusParams }).annotate({ "title": "RemoteControl/pairing/statusRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/client/list").annotate({ "title": "RemoteControl/client/listRequestMethod" }), "params": ClientRequest__RemoteControlClientsListParams }).annotate({ "title": "RemoteControl/client/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/client/revoke").annotate({ "title": "RemoteControl/client/revokeRequestMethod" }), "params": ClientRequest__RemoteControlClientsRevokeParams }).annotate({ "title": "RemoteControl/client/revokeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("collaborationMode/list").annotate({ "title": "CollaborationMode/listRequestMethod" }), "params": ClientRequest__CollaborationModeListParams }).annotate({ "title": "CollaborationMode/listRequest", "description": "Lists collaboration mode presets." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mock/experimentalMethod").annotate({ "title": "Mock/experimentalMethodRequestMethod" }), "params": ClientRequest__MockExperimentalMethodParams }).annotate({ "title": "Mock/experimentalMethodRequest", "description": "Test-only method used to validate experimental gating." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("environment/add").annotate({ "title": "Environment/addRequestMethod" }), "params": ClientRequest__EnvironmentAddParams }).annotate({ "title": "Environment/addRequest", "description": "Adds or replaces a remote environment by id for later selection." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("environment/info").annotate({ "title": "Environment/infoRequestMethod" }), "params": ClientRequest__EnvironmentInfoParams }).annotate({ "title": "Environment/infoRequest", "description": "Reads information from a configured execution environment." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("environment/status").annotate({ "title": "Environment/statusRequestMethod" }), "params": ClientRequest__EnvironmentStatusParams }).annotate({ "title": "Environment/statusRequest", "description": "Reads the current status of a configured execution environment." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/oauth/login").annotate({ "title": "McpServer/oauth/loginRequestMethod" }), "params": ClientRequest__McpServerOauthLoginParams }).annotate({ "title": "McpServer/oauth/loginRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("config/mcpServer/reload").annotate({ "title": "Config/mcpServer/reloadRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "Config/mcpServer/reloadRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServerStatus/list").annotate({ "title": "McpServerStatus/listRequestMethod" }), "params": ClientRequest__ListMcpServerStatusParams }).annotate({ "title": "McpServerStatus/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/resource/read").annotate({ "title": "McpServer/resource/readRequestMethod" }), "params": ClientRequest__McpResourceReadParams }).annotate({ "title": "McpServer/resource/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/tool/call").annotate({ "title": "McpServer/tool/callRequestMethod" }), "params": ClientRequest__McpServerToolCallParams }).annotate({ "title": "McpServer/tool/callRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("windowsSandbox/setupStart").annotate({ "title": "WindowsSandbox/setupStartRequestMethod" }), "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({ "title": "Account/login/startRequestMethod" }), "params": ClientRequest__LoginAccountParams }).annotate({ "title": "Account/login/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/login/cancel").annotate({ "title": "Account/login/cancelRequestMethod" }), "params": ClientRequest__CancelLoginAccountParams }).annotate({ "title": "Account/login/cancelRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/logout").annotate({ "title": "Account/logoutRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "Account/logoutRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/rateLimits/read").annotate({ "title": "Account/rateLimits/readRequestMethod" }), "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" }), "params": ClientRequest__FeedbackUploadParams }).annotate({ "title": "Feedback/uploadRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec").annotate({ "title": "Command/execRequestMethod" }), "params": ClientRequest__CommandExecParams }).annotate({ "title": "Command/execRequest", "description": "Execute a standalone command (argv vector) under the server's sandbox." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec/write").annotate({ "title": "Command/exec/writeRequestMethod" }), "params": ClientRequest__CommandExecWriteParams }).annotate({ "title": "Command/exec/writeRequest", "description": "Write stdin bytes to a running `command/exec` session or close stdin." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec/terminate").annotate({ "title": "Command/exec/terminateRequestMethod" }), "params": ClientRequest__CommandExecTerminateParams }).annotate({ "title": "Command/exec/terminateRequest", "description": "Terminate a running `command/exec` session by client-supplied `processId`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec/resize").annotate({ "title": "Command/exec/resizeRequestMethod" }), "params": ClientRequest__CommandExecResizeParams }).annotate({ "title": "Command/exec/resizeRequest", "description": "Resize a running PTY-backed `command/exec` session by client-supplied `processId`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/spawn").annotate({ "title": "Process/spawnRequestMethod" }), "params": ClientRequest__ProcessSpawnParams }).annotate({ "title": "Process/spawnRequest", "description": "Spawn a standalone process (argv vector) without a Codex sandbox." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/writeStdin").annotate({ "title": "Process/writeStdinRequestMethod" }), "params": ClientRequest__ProcessWriteStdinParams }).annotate({ "title": "Process/writeStdinRequest", "description": "Write stdin bytes to a running `process/spawn` session or close stdin." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/kill").annotate({ "title": "Process/killRequestMethod" }), "params": ClientRequest__ProcessKillParams }).annotate({ "title": "Process/killRequest", "description": "Terminate a running `process/spawn` session by client-supplied `processHandle`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/resizePty").annotate({ "title": "Process/resizePtyRequestMethod" }), "params": ClientRequest__ProcessResizePtyParams }).annotate({ "title": "Process/resizePtyRequest", "description": "Resize a running PTY-backed `process/spawn` session by client-supplied `processHandle`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("config/read").annotate({ "title": "Config/readRequestMethod" }), "params": ClientRequest__ConfigReadParams }).annotate({ "title": "Config/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("externalAgentConfig/detect").annotate({ "title": "ExternalAgentConfig/detectRequestMethod" }), "params": ClientRequest__ExternalAgentConfigDetectParams }).annotate({ "title": "ExternalAgentConfig/detectRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("externalAgentConfig/import").annotate({ "title": "ExternalAgentConfig/importRequestMethod" }), "params": ClientRequest__ExternalAgentConfigImportParams }).annotate({ "title": "ExternalAgentConfig/importRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("externalAgentConfig/import/recordHistory").annotate({ "title": "ExternalAgentConfig/import/recordHistoryRequestMethod" }), "params": ClientRequest__ExternalAgentConfigImportHistoryRecordParams }).annotate({ "title": "ExternalAgentConfig/import/recordHistoryRequest" }), 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({ "title": "Config/value/writeRequestMethod" }), "params": ClientRequest__ConfigValueWriteParams }).annotate({ "title": "Config/value/writeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("config/batchWrite").annotate({ "title": "Config/batchWriteRequestMethod" }), "params": ClientRequest__ConfigBatchWriteParams }).annotate({ "title": "Config/batchWriteRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("configRequirements/read").annotate({ "title": "ConfigRequirements/readRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "ConfigRequirements/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/read").annotate({ "title": "Account/readRequestMethod" }), "params": ClientRequest__GetAccountParams }).annotate({ "title": "Account/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch").annotate({ "title": "FuzzyFileSearchRequestMethod" }), "params": ClientRequest__FuzzyFileSearchParams }).annotate({ "title": "FuzzyFileSearchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch/sessionStart").annotate({ "title": "FuzzyFileSearch/sessionStartRequestMethod" }), "params": ClientRequest__FuzzyFileSearchSessionStartParams }).annotate({ "title": "FuzzyFileSearch/sessionStartRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch/sessionUpdate").annotate({ "title": "FuzzyFileSearch/sessionUpdateRequestMethod" }), "params": ClientRequest__FuzzyFileSearchSessionUpdateParams }).annotate({ "title": "FuzzyFileSearch/sessionUpdateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch/sessionStop").annotate({ "title": "FuzzyFileSearch/sessionStopRequestMethod" }), "params": ClientRequest__FuzzyFileSearchSessionStopParams }).annotate({ "title": "FuzzyFileSearch/sessionStopRequest" })], { mode: "oneOf" }).annotate({ "title": "ClientRequest", "description": "Request from the client to the server." }) +export type ClientRequest = { readonly "id": ClientRequest__RequestId, readonly "method": "initialize", readonly "params": ClientRequest__InitializeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "server/diagnostics", readonly "params": ClientRequest__ServerDiagnosticsParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/start", readonly "params": ClientRequest__ThreadStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/resume", readonly "params": ClientRequest__ThreadResumeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/fork", readonly "params": ClientRequest__ThreadForkParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__ThreadUnsubscribeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/increment_elicitation", readonly "params": ClientRequest__ThreadIncrementElicitationParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/decrement_elicitation", readonly "params": ClientRequest__ThreadDecrementElicitationParams } | { readonly "id": ClientRequest__RequestId, 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/queue/add", readonly "params": ClientRequest__ThreadQueueAddParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/queue/list", readonly "params": ClientRequest__ThreadQueueListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/queue/update", readonly "params": ClientRequest__ThreadQueueUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/queue/delete", readonly "params": ClientRequest__ThreadQueueDeleteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/queue/reorder", readonly "params": ClientRequest__ThreadQueueReorderParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/queue/start", readonly "params": ClientRequest__ThreadQueueStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/metadata/update", readonly "params": ClientRequest__ThreadMetadataUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/section/move", readonly "params": ClientRequest__ThreadSectionMoveParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/settings/update", readonly "params": ClientRequest__ThreadSettingsUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/memoryMode/set", readonly "params": ClientRequest__ThreadMemoryModeSetParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "memory/reset", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/unarchive", readonly "params": ClientRequest__ThreadUnarchiveParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/compact/start", readonly "params": ClientRequest__ThreadCompactStartParams } | { readonly "id": ClientRequest__RequestId, 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/backgroundTerminals/clean", readonly "params": ClientRequest__ThreadBackgroundTerminalsCleanParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/backgroundTerminals/list", readonly "params": ClientRequest__ThreadBackgroundTerminalsListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/backgroundTerminals/terminate", readonly "params": ClientRequest__ThreadBackgroundTerminalsTerminateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/rollback", readonly "params": ClientRequest__ThreadRollbackParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/revert", readonly "params": ClientRequest__ThreadRevertParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/list", readonly "params": ClientRequest__ThreadListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/list", readonly "params": ClientRequest__ProjectListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/read", readonly "params": ClientRequest__ProjectReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/create", readonly "params": ClientRequest__ProjectCreateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/import", readonly "params": ClientRequest__ProjectImportParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/update", readonly "params": ClientRequest__ProjectUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/move", readonly "params": ClientRequest__ProjectMoveParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "project/delete", readonly "params": ClientRequest__ProjectDeleteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "threadSection/list", readonly "params": ClientRequest__ThreadSectionListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "threadSection/create", readonly "params": ClientRequest__ThreadSectionCreateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "threadSection/update", readonly "params": ClientRequest__ThreadSectionUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "threadSection/delete", readonly "params": ClientRequest__ThreadSectionDeleteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/search", readonly "params": ClientRequest__ThreadSearchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/searchOccurrences", readonly "params": ClientRequest__ThreadSearchOccurrencesParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/loaded/list", readonly "params": ClientRequest__ThreadLoadedListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/read", readonly "params": ClientRequest__ThreadReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/turns/list", readonly "params": ClientRequest__ThreadTurnsListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/items/list", readonly "params": ClientRequest__ThreadItemsListParams } | { 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/search", readonly "params": ClientRequest__PluginSearchParams } | { 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", readonly "params": ClientRequest__FsReadFileParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/writeFile", readonly "params": ClientRequest__FsWriteFileParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/createDirectory", readonly "params": ClientRequest__FsCreateDirectoryParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/getMetadata", readonly "params": ClientRequest__FsGetMetadataParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/readDirectory", readonly "params": ClientRequest__FsReadDirectoryParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/remove", readonly "params": ClientRequest__FsRemoveParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/copy", readonly "params": ClientRequest__FsCopyParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/watch", readonly "params": ClientRequest__FsWatchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fs/unwatch", readonly "params": ClientRequest__FsUnwatchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "skills/config/write", readonly "params": ClientRequest__SkillsConfigWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "plugin/install", readonly "params": ClientRequest__PluginInstallParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "plugin/uninstall", readonly "params": ClientRequest__PluginUninstallParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "turn/start", readonly "params": ClientRequest__TurnStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "turn/steer", readonly "params": ClientRequest__TurnSteerParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "turn/interrupt", readonly "params": ClientRequest__TurnInterruptParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/start", readonly "params": ClientRequest__ThreadRealtimeStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/appendAudio", readonly "params": ClientRequest__ThreadRealtimeAppendAudioParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/appendText", readonly "params": ClientRequest__ThreadRealtimeAppendTextParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/appendSpeech", readonly "params": ClientRequest__ThreadRealtimeAppendSpeechParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/stop", readonly "params": ClientRequest__ThreadRealtimeStopParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/timeline/list", readonly "params": ClientRequest__ThreadTimelineListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "thread/realtime/listVoices", readonly "params": ClientRequest__ThreadRealtimeListVoicesParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "review/start", readonly "params": ClientRequest__ReviewStartParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__ExperimentalFeatureEnablementSetParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/enable", readonly "params"?: ClientRequest__RemoteControlEnableParams | null } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/disable", readonly "params"?: ClientRequest__RemoteControlDisableParams | null } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/status/read", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/pairing/start", readonly "params": ClientRequest__RemoteControlPairingStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/pairing/status", readonly "params": ClientRequest__RemoteControlPairingStatusParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/client/list", readonly "params": ClientRequest__RemoteControlClientsListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "remoteControl/client/revoke", readonly "params": ClientRequest__RemoteControlClientsRevokeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "collaborationMode/list", readonly "params": ClientRequest__CollaborationModeListParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mock/experimentalMethod", readonly "params": ClientRequest__MockExperimentalMethodParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "environment/add", readonly "params": ClientRequest__EnvironmentAddParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "environment/info", readonly "params": ClientRequest__EnvironmentInfoParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "environment/status", readonly "params": ClientRequest__EnvironmentStatusParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/oauth/login", readonly "params": ClientRequest__McpServerOauthLoginParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/mcpServer/reload", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServerStatus/list", readonly "params": ClientRequest__ListMcpServerStatusParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/resource/read", readonly "params": ClientRequest__McpResourceReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/event/stream/start", readonly "params": ClientRequest__McpServerEventStreamStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/event/stream/stop", readonly "params": ClientRequest__McpServerEventStreamStopParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "mcpServer/tool/call", readonly "params": ClientRequest__McpServerToolCallParams } | { readonly "id": ClientRequest__RequestId, 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", readonly "params": ClientRequest__LoginAccountParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/bedrock/discover", readonly "params": ClientRequest__BedrockDiscoverParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/bedrock/setup", readonly "params": ClientRequest__BedrockSetupParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/login/cancel", readonly "params": ClientRequest__CancelLoginAccountParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/logout", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, 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"?: ClientRequest__GetAccountTokenUsageParams | 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", readonly "params": ClientRequest__FeedbackUploadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec", readonly "params": ClientRequest__CommandExecParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec/write", readonly "params": ClientRequest__CommandExecWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec/terminate", readonly "params": ClientRequest__CommandExecTerminateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "command/exec/resize", readonly "params": ClientRequest__CommandExecResizeParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/spawn", readonly "params": ClientRequest__ProcessSpawnParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/writeStdin", readonly "params": ClientRequest__ProcessWriteStdinParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/kill", readonly "params": ClientRequest__ProcessKillParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "process/resizePty", readonly "params": ClientRequest__ProcessResizePtyParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/read", readonly "params": ClientRequest__ConfigReadParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/detect", readonly "params": ClientRequest__ExternalAgentConfigDetectParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/import", readonly "params": ClientRequest__ExternalAgentConfigImportParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/import/recordHistory", readonly "params": ClientRequest__ExternalAgentConfigImportHistoryRecordParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "externalAgentConfig/import/readHistories", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/value/write", readonly "params": ClientRequest__ConfigValueWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "config/batchWrite", readonly "params": ClientRequest__ConfigBatchWriteParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "configRequirements/read", readonly "params"?: null } | { readonly "id": ClientRequest__RequestId, readonly "method": "account/read", readonly "params": ClientRequest__GetAccountParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch", readonly "params": ClientRequest__FuzzyFileSearchParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch/sessionStart", readonly "params": ClientRequest__FuzzyFileSearchSessionStartParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch/sessionUpdate", readonly "params": ClientRequest__FuzzyFileSearchSessionUpdateParams } | { readonly "id": ClientRequest__RequestId, readonly "method": "fuzzyFileSearch/sessionStop", readonly "params": ClientRequest__FuzzyFileSearchSessionStopParams } +export const ClientRequest = Schema.Union([Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("initialize").annotate({ "title": "InitializeRequestMethod" }), "params": ClientRequest__InitializeParams }).annotate({ "title": "InitializeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("server/diagnostics").annotate({ "title": "Server/diagnosticsRequestMethod" }), "params": ClientRequest__ServerDiagnosticsParams }).annotate({ "title": "Server/diagnosticsRequest", "description": "Read content-free, process-local diagnostics." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/start").annotate({ "title": "Thread/startRequestMethod" }), "params": ClientRequest__ThreadStartParams }).annotate({ "title": "Thread/startRequest", "description": "NEW APIs" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/resume").annotate({ "title": "Thread/resumeRequestMethod" }), "params": ClientRequest__ThreadResumeParams }).annotate({ "title": "Thread/resumeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/fork").annotate({ "title": "Thread/forkRequestMethod" }), "params": ClientRequest__ThreadForkParams }).annotate({ "title": "Thread/forkRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "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({ "title": "Thread/unsubscribeRequestMethod" }), "params": ClientRequest__ThreadUnsubscribeParams }).annotate({ "title": "Thread/unsubscribeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/increment_elicitation").annotate({ "title": "Thread/incrementElicitationRequestMethod" }), "params": ClientRequest__ThreadIncrementElicitationParams }).annotate({ "title": "Thread/incrementElicitationRequest", "description": "Increment the thread-local out-of-band elicitation counter.\n\nThis is used by external helpers to pause timeout accounting while a user approval or other elicitation is pending outside the app-server request flow." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/decrement_elicitation").annotate({ "title": "Thread/decrementElicitationRequestMethod" }), "params": ClientRequest__ThreadDecrementElicitationParams }).annotate({ "title": "Thread/decrementElicitationRequest", "description": "Decrement the thread-local out-of-band elicitation counter.\n\nWhen the count reaches zero, timeout accounting resumes for the thread." }), Schema.Struct({ "id": ClientRequest__RequestId, "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/queue/add").annotate({ "title": "Thread/queue/addRequestMethod" }), "params": ClientRequest__ThreadQueueAddParams }).annotate({ "title": "Thread/queue/addRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/queue/list").annotate({ "title": "Thread/queue/listRequestMethod" }), "params": ClientRequest__ThreadQueueListParams }).annotate({ "title": "Thread/queue/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/queue/update").annotate({ "title": "Thread/queue/updateRequestMethod" }), "params": ClientRequest__ThreadQueueUpdateParams }).annotate({ "title": "Thread/queue/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/queue/delete").annotate({ "title": "Thread/queue/deleteRequestMethod" }), "params": ClientRequest__ThreadQueueDeleteParams }).annotate({ "title": "Thread/queue/deleteRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/queue/reorder").annotate({ "title": "Thread/queue/reorderRequestMethod" }), "params": ClientRequest__ThreadQueueReorderParams }).annotate({ "title": "Thread/queue/reorderRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/queue/start").annotate({ "title": "Thread/queue/startRequestMethod" }), "params": ClientRequest__ThreadQueueStartParams }).annotate({ "title": "Thread/queue/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/metadata/update").annotate({ "title": "Thread/metadata/updateRequestMethod" }), "params": ClientRequest__ThreadMetadataUpdateParams }).annotate({ "title": "Thread/metadata/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/section/move").annotate({ "title": "Thread/section/moveRequestMethod" }), "params": ClientRequest__ThreadSectionMoveParams }).annotate({ "title": "Thread/section/moveRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/settings/update").annotate({ "title": "Thread/settings/updateRequestMethod" }), "params": ClientRequest__ThreadSettingsUpdateParams }).annotate({ "title": "Thread/settings/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/memoryMode/set").annotate({ "title": "Thread/memoryMode/setRequestMethod" }), "params": ClientRequest__ThreadMemoryModeSetParams }).annotate({ "title": "Thread/memoryMode/setRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("memory/reset").annotate({ "title": "Memory/resetRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "Memory/resetRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/unarchive").annotate({ "title": "Thread/unarchiveRequestMethod" }), "params": ClientRequest__ThreadUnarchiveParams }).annotate({ "title": "Thread/unarchiveRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/compact/start").annotate({ "title": "Thread/compact/startRequestMethod" }), "params": ClientRequest__ThreadCompactStartParams }).annotate({ "title": "Thread/compact/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/shellCommand").annotate({ "title": "Thread/shellCommandRequestMethod" }), "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/backgroundTerminals/clean").annotate({ "title": "Thread/backgroundTerminals/cleanRequestMethod" }), "params": ClientRequest__ThreadBackgroundTerminalsCleanParams }).annotate({ "title": "Thread/backgroundTerminals/cleanRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/backgroundTerminals/list").annotate({ "title": "Thread/backgroundTerminals/listRequestMethod" }), "params": ClientRequest__ThreadBackgroundTerminalsListParams }).annotate({ "title": "Thread/backgroundTerminals/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/backgroundTerminals/terminate").annotate({ "title": "Thread/backgroundTerminals/terminateRequestMethod" }), "params": ClientRequest__ThreadBackgroundTerminalsTerminateParams }).annotate({ "title": "Thread/backgroundTerminals/terminateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/rollback").annotate({ "title": "Thread/rollbackRequestMethod" }), "params": ClientRequest__ThreadRollbackParams }).annotate({ "title": "Thread/rollbackRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/revert").annotate({ "title": "Thread/revertRequestMethod" }), "params": ClientRequest__ThreadRevertParams }).annotate({ "title": "Thread/revertRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/list").annotate({ "title": "Thread/listRequestMethod" }), "params": ClientRequest__ThreadListParams }).annotate({ "title": "Thread/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/list").annotate({ "title": "Project/listRequestMethod" }), "params": ClientRequest__ProjectListParams }).annotate({ "title": "Project/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/read").annotate({ "title": "Project/readRequestMethod" }), "params": ClientRequest__ProjectReadParams }).annotate({ "title": "Project/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/create").annotate({ "title": "Project/createRequestMethod" }), "params": ClientRequest__ProjectCreateParams }).annotate({ "title": "Project/createRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/import").annotate({ "title": "Project/importRequestMethod" }), "params": ClientRequest__ProjectImportParams }).annotate({ "title": "Project/importRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/update").annotate({ "title": "Project/updateRequestMethod" }), "params": ClientRequest__ProjectUpdateParams }).annotate({ "title": "Project/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/move").annotate({ "title": "Project/moveRequestMethod" }), "params": ClientRequest__ProjectMoveParams }).annotate({ "title": "Project/moveRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("project/delete").annotate({ "title": "Project/deleteRequestMethod" }), "params": ClientRequest__ProjectDeleteParams }).annotate({ "title": "Project/deleteRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("threadSection/list").annotate({ "title": "ThreadSection/listRequestMethod" }), "params": ClientRequest__ThreadSectionListParams }).annotate({ "title": "ThreadSection/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("threadSection/create").annotate({ "title": "ThreadSection/createRequestMethod" }), "params": ClientRequest__ThreadSectionCreateParams }).annotate({ "title": "ThreadSection/createRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("threadSection/update").annotate({ "title": "ThreadSection/updateRequestMethod" }), "params": ClientRequest__ThreadSectionUpdateParams }).annotate({ "title": "ThreadSection/updateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("threadSection/delete").annotate({ "title": "ThreadSection/deleteRequestMethod" }), "params": ClientRequest__ThreadSectionDeleteParams }).annotate({ "title": "ThreadSection/deleteRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/search").annotate({ "title": "Thread/searchRequestMethod" }), "params": ClientRequest__ThreadSearchParams }).annotate({ "title": "Thread/searchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/searchOccurrences").annotate({ "title": "Thread/searchOccurrencesRequestMethod" }), "params": ClientRequest__ThreadSearchOccurrencesParams }).annotate({ "title": "Thread/searchOccurrencesRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/loaded/list").annotate({ "title": "Thread/loaded/listRequestMethod" }), "params": ClientRequest__ThreadLoadedListParams }).annotate({ "title": "Thread/loaded/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "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/turns/list").annotate({ "title": "Thread/turns/listRequestMethod" }), "params": ClientRequest__ThreadTurnsListParams }).annotate({ "title": "Thread/turns/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/items/list").annotate({ "title": "Thread/items/listRequestMethod" }), "params": ClientRequest__ThreadItemsListParams }).annotate({ "title": "Thread/items/listRequest" }), 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/search").annotate({ "title": "Plugin/searchRequestMethod" }), "params": ClientRequest__PluginSearchParams }).annotate({ "title": "Plugin/searchRequest" }), 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" }), "params": ClientRequest__FsReadFileParams }).annotate({ "title": "Fs/readFileRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/writeFile").annotate({ "title": "Fs/writeFileRequestMethod" }), "params": ClientRequest__FsWriteFileParams }).annotate({ "title": "Fs/writeFileRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/createDirectory").annotate({ "title": "Fs/createDirectoryRequestMethod" }), "params": ClientRequest__FsCreateDirectoryParams }).annotate({ "title": "Fs/createDirectoryRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/getMetadata").annotate({ "title": "Fs/getMetadataRequestMethod" }), "params": ClientRequest__FsGetMetadataParams }).annotate({ "title": "Fs/getMetadataRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/readDirectory").annotate({ "title": "Fs/readDirectoryRequestMethod" }), "params": ClientRequest__FsReadDirectoryParams }).annotate({ "title": "Fs/readDirectoryRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/remove").annotate({ "title": "Fs/removeRequestMethod" }), "params": ClientRequest__FsRemoveParams }).annotate({ "title": "Fs/removeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/copy").annotate({ "title": "Fs/copyRequestMethod" }), "params": ClientRequest__FsCopyParams }).annotate({ "title": "Fs/copyRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/watch").annotate({ "title": "Fs/watchRequestMethod" }), "params": ClientRequest__FsWatchParams }).annotate({ "title": "Fs/watchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fs/unwatch").annotate({ "title": "Fs/unwatchRequestMethod" }), "params": ClientRequest__FsUnwatchParams }).annotate({ "title": "Fs/unwatchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("skills/config/write").annotate({ "title": "Skills/config/writeRequestMethod" }), "params": ClientRequest__SkillsConfigWriteParams }).annotate({ "title": "Skills/config/writeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("plugin/install").annotate({ "title": "Plugin/installRequestMethod" }), "params": ClientRequest__PluginInstallParams }).annotate({ "title": "Plugin/installRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("plugin/uninstall").annotate({ "title": "Plugin/uninstallRequestMethod" }), "params": ClientRequest__PluginUninstallParams }).annotate({ "title": "Plugin/uninstallRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("turn/start").annotate({ "title": "Turn/startRequestMethod" }), "params": ClientRequest__TurnStartParams }).annotate({ "title": "Turn/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("turn/steer").annotate({ "title": "Turn/steerRequestMethod" }), "params": ClientRequest__TurnSteerParams }).annotate({ "title": "Turn/steerRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("turn/interrupt").annotate({ "title": "Turn/interruptRequestMethod" }), "params": ClientRequest__TurnInterruptParams }).annotate({ "title": "Turn/interruptRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/start").annotate({ "title": "Thread/realtime/startRequestMethod" }), "params": ClientRequest__ThreadRealtimeStartParams }).annotate({ "title": "Thread/realtime/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/appendAudio").annotate({ "title": "Thread/realtime/appendAudioRequestMethod" }), "params": ClientRequest__ThreadRealtimeAppendAudioParams }).annotate({ "title": "Thread/realtime/appendAudioRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/appendText").annotate({ "title": "Thread/realtime/appendTextRequestMethod" }), "params": ClientRequest__ThreadRealtimeAppendTextParams }).annotate({ "title": "Thread/realtime/appendTextRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/appendSpeech").annotate({ "title": "Thread/realtime/appendSpeechRequestMethod" }), "params": ClientRequest__ThreadRealtimeAppendSpeechParams }).annotate({ "title": "Thread/realtime/appendSpeechRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/stop").annotate({ "title": "Thread/realtime/stopRequestMethod" }), "params": ClientRequest__ThreadRealtimeStopParams }).annotate({ "title": "Thread/realtime/stopRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/timeline/list").annotate({ "title": "Thread/timeline/listRequestMethod" }), "params": ClientRequest__ThreadTimelineListParams }).annotate({ "title": "Thread/timeline/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("thread/realtime/listVoices").annotate({ "title": "Thread/realtime/listVoicesRequestMethod" }), "params": ClientRequest__ThreadRealtimeListVoicesParams }).annotate({ "title": "Thread/realtime/listVoicesRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("review/start").annotate({ "title": "Review/startRequestMethod" }), "params": ClientRequest__ReviewStartParams }).annotate({ "title": "Review/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "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({ "title": "ExperimentalFeature/listRequestMethod" }), "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({ "title": "ExperimentalFeature/enablement/setRequestMethod" }), "params": ClientRequest__ExperimentalFeatureEnablementSetParams }).annotate({ "title": "ExperimentalFeature/enablement/setRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/enable").annotate({ "title": "RemoteControl/enableRequestMethod" }), "params": Schema.optionalKey(Schema.Union([ClientRequest__RemoteControlEnableParams, Schema.Null])) }).annotate({ "title": "RemoteControl/enableRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/disable").annotate({ "title": "RemoteControl/disableRequestMethod" }), "params": Schema.optionalKey(Schema.Union([ClientRequest__RemoteControlDisableParams, Schema.Null])) }).annotate({ "title": "RemoteControl/disableRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/status/read").annotate({ "title": "RemoteControl/status/readRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "RemoteControl/status/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/pairing/start").annotate({ "title": "RemoteControl/pairing/startRequestMethod" }), "params": ClientRequest__RemoteControlPairingStartParams }).annotate({ "title": "RemoteControl/pairing/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/pairing/status").annotate({ "title": "RemoteControl/pairing/statusRequestMethod" }), "params": ClientRequest__RemoteControlPairingStatusParams }).annotate({ "title": "RemoteControl/pairing/statusRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/client/list").annotate({ "title": "RemoteControl/client/listRequestMethod" }), "params": ClientRequest__RemoteControlClientsListParams }).annotate({ "title": "RemoteControl/client/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("remoteControl/client/revoke").annotate({ "title": "RemoteControl/client/revokeRequestMethod" }), "params": ClientRequest__RemoteControlClientsRevokeParams }).annotate({ "title": "RemoteControl/client/revokeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("collaborationMode/list").annotate({ "title": "CollaborationMode/listRequestMethod" }), "params": ClientRequest__CollaborationModeListParams }).annotate({ "title": "CollaborationMode/listRequest", "description": "Lists collaboration mode presets." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mock/experimentalMethod").annotate({ "title": "Mock/experimentalMethodRequestMethod" }), "params": ClientRequest__MockExperimentalMethodParams }).annotate({ "title": "Mock/experimentalMethodRequest", "description": "Test-only method used to validate experimental gating." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("environment/add").annotate({ "title": "Environment/addRequestMethod" }), "params": ClientRequest__EnvironmentAddParams }).annotate({ "title": "Environment/addRequest", "description": "Adds or replaces a remote environment by id for later selection." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("environment/info").annotate({ "title": "Environment/infoRequestMethod" }), "params": ClientRequest__EnvironmentInfoParams }).annotate({ "title": "Environment/infoRequest", "description": "Reads information from a configured execution environment." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("environment/status").annotate({ "title": "Environment/statusRequestMethod" }), "params": ClientRequest__EnvironmentStatusParams }).annotate({ "title": "Environment/statusRequest", "description": "Reads the current status of a configured execution environment." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/oauth/login").annotate({ "title": "McpServer/oauth/loginRequestMethod" }), "params": ClientRequest__McpServerOauthLoginParams }).annotate({ "title": "McpServer/oauth/loginRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("config/mcpServer/reload").annotate({ "title": "Config/mcpServer/reloadRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "Config/mcpServer/reloadRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServerStatus/list").annotate({ "title": "McpServerStatus/listRequestMethod" }), "params": ClientRequest__ListMcpServerStatusParams }).annotate({ "title": "McpServerStatus/listRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/resource/read").annotate({ "title": "McpServer/resource/readRequestMethod" }), "params": ClientRequest__McpResourceReadParams }).annotate({ "title": "McpServer/resource/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/event/stream/start").annotate({ "title": "McpServer/event/stream/startRequestMethod" }), "params": ClientRequest__McpServerEventStreamStartParams }).annotate({ "title": "McpServer/event/stream/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/event/stream/stop").annotate({ "title": "McpServer/event/stream/stopRequestMethod" }), "params": ClientRequest__McpServerEventStreamStopParams }).annotate({ "title": "McpServer/event/stream/stopRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("mcpServer/tool/call").annotate({ "title": "McpServer/tool/callRequestMethod" }), "params": ClientRequest__McpServerToolCallParams }).annotate({ "title": "McpServer/tool/callRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("windowsSandbox/setupStart").annotate({ "title": "WindowsSandbox/setupStartRequestMethod" }), "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({ "title": "Account/login/startRequestMethod" }), "params": ClientRequest__LoginAccountParams }).annotate({ "title": "Account/login/startRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/bedrock/discover").annotate({ "title": "Account/bedrock/discoverRequestMethod" }), "params": ClientRequest__BedrockDiscoverParams }).annotate({ "title": "Account/bedrock/discoverRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/bedrock/setup").annotate({ "title": "Account/bedrock/setupRequestMethod" }), "params": ClientRequest__BedrockSetupParams }).annotate({ "title": "Account/bedrock/setupRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/login/cancel").annotate({ "title": "Account/login/cancelRequestMethod" }), "params": ClientRequest__CancelLoginAccountParams }).annotate({ "title": "Account/login/cancelRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/logout").annotate({ "title": "Account/logoutRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "Account/logoutRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/rateLimits/read").annotate({ "title": "Account/rateLimits/readRequestMethod" }), "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.Union([ClientRequest__GetAccountTokenUsageParams, 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" }), "params": ClientRequest__FeedbackUploadParams }).annotate({ "title": "Feedback/uploadRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec").annotate({ "title": "Command/execRequestMethod" }), "params": ClientRequest__CommandExecParams }).annotate({ "title": "Command/execRequest", "description": "Execute a standalone command (argv vector) under the server's sandbox." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec/write").annotate({ "title": "Command/exec/writeRequestMethod" }), "params": ClientRequest__CommandExecWriteParams }).annotate({ "title": "Command/exec/writeRequest", "description": "Write stdin bytes to a running `command/exec` session or close stdin." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec/terminate").annotate({ "title": "Command/exec/terminateRequestMethod" }), "params": ClientRequest__CommandExecTerminateParams }).annotate({ "title": "Command/exec/terminateRequest", "description": "Terminate a running `command/exec` session by client-supplied `processId`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("command/exec/resize").annotate({ "title": "Command/exec/resizeRequestMethod" }), "params": ClientRequest__CommandExecResizeParams }).annotate({ "title": "Command/exec/resizeRequest", "description": "Resize a running PTY-backed `command/exec` session by client-supplied `processId`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/spawn").annotate({ "title": "Process/spawnRequestMethod" }), "params": ClientRequest__ProcessSpawnParams }).annotate({ "title": "Process/spawnRequest", "description": "Spawn a standalone process (argv vector) without a Codex sandbox." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/writeStdin").annotate({ "title": "Process/writeStdinRequestMethod" }), "params": ClientRequest__ProcessWriteStdinParams }).annotate({ "title": "Process/writeStdinRequest", "description": "Write stdin bytes to a running `process/spawn` session or close stdin." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/kill").annotate({ "title": "Process/killRequestMethod" }), "params": ClientRequest__ProcessKillParams }).annotate({ "title": "Process/killRequest", "description": "Terminate a running `process/spawn` session by client-supplied `processHandle`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("process/resizePty").annotate({ "title": "Process/resizePtyRequestMethod" }), "params": ClientRequest__ProcessResizePtyParams }).annotate({ "title": "Process/resizePtyRequest", "description": "Resize a running PTY-backed `process/spawn` session by client-supplied `processHandle`." }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("config/read").annotate({ "title": "Config/readRequestMethod" }), "params": ClientRequest__ConfigReadParams }).annotate({ "title": "Config/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("externalAgentConfig/detect").annotate({ "title": "ExternalAgentConfig/detectRequestMethod" }), "params": ClientRequest__ExternalAgentConfigDetectParams }).annotate({ "title": "ExternalAgentConfig/detectRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("externalAgentConfig/import").annotate({ "title": "ExternalAgentConfig/importRequestMethod" }), "params": ClientRequest__ExternalAgentConfigImportParams }).annotate({ "title": "ExternalAgentConfig/importRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("externalAgentConfig/import/recordHistory").annotate({ "title": "ExternalAgentConfig/import/recordHistoryRequestMethod" }), "params": ClientRequest__ExternalAgentConfigImportHistoryRecordParams }).annotate({ "title": "ExternalAgentConfig/import/recordHistoryRequest" }), 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({ "title": "Config/value/writeRequestMethod" }), "params": ClientRequest__ConfigValueWriteParams }).annotate({ "title": "Config/value/writeRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("config/batchWrite").annotate({ "title": "Config/batchWriteRequestMethod" }), "params": ClientRequest__ConfigBatchWriteParams }).annotate({ "title": "Config/batchWriteRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("configRequirements/read").annotate({ "title": "ConfigRequirements/readRequestMethod" }), "params": Schema.optionalKey(Schema.Null) }).annotate({ "title": "ConfigRequirements/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("account/read").annotate({ "title": "Account/readRequestMethod" }), "params": ClientRequest__GetAccountParams }).annotate({ "title": "Account/readRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch").annotate({ "title": "FuzzyFileSearchRequestMethod" }), "params": ClientRequest__FuzzyFileSearchParams }).annotate({ "title": "FuzzyFileSearchRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch/sessionStart").annotate({ "title": "FuzzyFileSearch/sessionStartRequestMethod" }), "params": ClientRequest__FuzzyFileSearchSessionStartParams }).annotate({ "title": "FuzzyFileSearch/sessionStartRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch/sessionUpdate").annotate({ "title": "FuzzyFileSearch/sessionUpdateRequestMethod" }), "params": ClientRequest__FuzzyFileSearchSessionUpdateParams }).annotate({ "title": "FuzzyFileSearch/sessionUpdateRequest" }), Schema.Struct({ "id": ClientRequest__RequestId, "method": Schema.Literal("fuzzyFileSearch/sessionStop").annotate({ "title": "FuzzyFileSearch/sessionStopRequestMethod" }), "params": ClientRequest__FuzzyFileSearchSessionStopParams }).annotate({ "title": "FuzzyFileSearch/sessionStopRequest" })], { mode: "oneOf" }).annotate({ "title": "ClientRequest", "description": "Request from the client to the server." }) export type ClientRequest__ByteRange = { readonly "end": number, readonly "start": number } export const ClientRequest__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) @@ -4974,8 +5949,11 @@ export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enab export type ClientRequest__RealtimeOutputModality = "text" | "audio" export const ClientRequest__RealtimeOutputModality = Schema.Literals(["text", "audio"]) -export type CommandExecutionRequestApprovalParams = { readonly "additionalPermissions"?: CommandExecutionRequestApprovalParams__AdditionalPermissionProfile | null, readonly "approvalId"?: string | null, readonly "availableDecisions"?: ReadonlyArray | null, readonly "command"?: string | null, readonly "commandActions"?: ReadonlyArray | null, readonly "cwd"?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null, readonly "environmentId"?: 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 } -export const CommandExecutionRequestApprovalParams = Schema.Struct({ "additionalPermissions": Schema.optionalKey(Schema.Union([CommandExecutionRequestApprovalParams__AdditionalPermissionProfile, Schema.Null]).annotate({ "description": "Optional additional permissions requested for this command." })), "approvalId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing." }), Schema.Null])), "availableDecisions": Schema.optionalKey(Schema.Union([Schema.Array(CommandExecutionRequestApprovalParams__CommandExecutionApprovalDecision).annotate({ "description": "Ordered list of decisions the client may present for this prompt." }), Schema.Null])), "command": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command to be executed." }), Schema.Null])), "commandActions": Schema.optionalKey(Schema.Union([Schema.Array(CommandExecutionRequestApprovalParams__CommandAction).annotate({ "description": "Best-effort parsed command actions for friendly display." }), Schema.Null])), "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.Null])), "itemId": Schema.String, "networkApprovalContext": Schema.optionalKey(Schema.Union([CommandExecutionRequestApprovalParams__NetworkApprovalContext, Schema.Null]).annotate({ "description": "Optional context for a managed-network approval prompt." })), "proposedExecpolicyAmendment": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional proposed execpolicy amendment to allow similar commands without prompting." }), Schema.Null])), "proposedNetworkPolicyAmendments": Schema.optionalKey(Schema.Union([Schema.Array(CommandExecutionRequestApprovalParams__NetworkPolicyAmendment).annotate({ "description": "Optional proposed network policy amendments (allow/deny host) for future requests." }), Schema.Null])), "reason": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional explanatory reason (e.g. request for network access)." }), 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" }) +export type CommandExecutionRequestApprovalParams = { readonly "additionalPermissions"?: CommandExecutionRequestApprovalParams__AdditionalPermissionProfile | null, readonly "approvalId"?: string | null, readonly "availableDecisions"?: ReadonlyArray | null, readonly "command"?: string | null, readonly "commandActions"?: ReadonlyArray | null, readonly "cwd"?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null, readonly "environmentId"?: string | null, readonly "itemId": string, readonly "kind"?: "command" | "writeStdin", 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 } +export const CommandExecutionRequestApprovalParams = Schema.Struct({ "additionalPermissions": Schema.optionalKey(Schema.Union([CommandExecutionRequestApprovalParams__AdditionalPermissionProfile, Schema.Null]).annotate({ "description": "Optional additional permissions requested for this command." })), "approvalId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing. Stdin approvals also use a distinct callback id; inspect `kind` to distinguish them." }), Schema.Null])), "availableDecisions": Schema.optionalKey(Schema.Union([Schema.Array(CommandExecutionRequestApprovalParams__CommandExecutionApprovalDecision).annotate({ "description": "Ordered list of decisions the client may present for this prompt." }), Schema.Null])), "command": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "The command to be executed." }), Schema.Null])), "commandActions": Schema.optionalKey(Schema.Union([Schema.Array(CommandExecutionRequestApprovalParams__CommandAction).annotate({ "description": "Best-effort parsed command actions for friendly display." }), Schema.Null])), "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.Null])), "itemId": Schema.String, "kind": Schema.optionalKey(Schema.Literals(["command", "writeStdin"]).annotate({ "description": "Distinguishes a command approval from input sent to an existing terminal.", "default": "command" })), "networkApprovalContext": Schema.optionalKey(Schema.Union([CommandExecutionRequestApprovalParams__NetworkApprovalContext, Schema.Null]).annotate({ "description": "Optional context for a managed-network approval prompt." })), "proposedExecpolicyAmendment": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional proposed execpolicy amendment to allow similar commands without prompting." }), Schema.Null])), "proposedNetworkPolicyAmendments": Schema.optionalKey(Schema.Union([Schema.Array(CommandExecutionRequestApprovalParams__NetworkPolicyAmendment).annotate({ "description": "Optional proposed network policy amendments (allow/deny host) for future requests." }), Schema.Null])), "reason": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional explanatory reason (e.g. request for network access)." }), 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" }) + +export type CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind = "command" | "writeStdin" +export const CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind = Schema.Literals(["command", "writeStdin"]).annotate({ "description": "Distinguishes a command approval from input sent to an existing terminal." }) export type CommandExecutionRequestApprovalResponse = { readonly "decision": CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision } export const CommandExecutionRequestApprovalResponse = Schema.Struct({ "decision": CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision }).annotate({ "title": "CommandExecutionRequestApprovalResponse" }) @@ -5088,8 +6066,8 @@ export const PermissionsRequestApprovalResponse__PermissionGrantScope = Schema.L export type RequestId = string | number export const RequestId = Schema.Union([Schema.String, Schema.Number.annotate({ "format": "int64" }).check(Schema.isInt())]).annotate({ "title": "RequestId" }) -export type ServerNotification = { readonly "method": "error", readonly "params": ServerNotification__ErrorNotification, readonly "emittedAtMs"?: number } | { 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": "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/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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), Schema.Struct({ "method": Schema.Literal("thread/realtime/transcript/delta").annotate({ "title": "Thread/realtime/transcript/deltaNotificationMethod" }), "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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." })], { mode: "oneOf" }) +export type ServerNotification = { readonly "method": "error", readonly "params": ServerNotification__ErrorNotification, readonly "emittedAtMs"?: number } | { 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": "thread/reverted", readonly "params": ServerNotification__ThreadRevertedNotification, 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/queue/changed", readonly "params": ServerNotification__ThreadQueueChangedNotification, readonly "emittedAtMs"?: number } | { readonly "method": "project/changed", readonly "params": ServerNotification__ProjectChangedNotification, readonly "emittedAtMs"?: number } | { readonly "method": "thread/project/updated", readonly "params": ServerNotification__ThreadProjectUpdatedNotification, 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": "autoApprovalReview/strictReviewRequired", readonly "params": ServerNotification__StrictReviewRequiredNotification, 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": "mcpServer/event/stream/notification", readonly "params": ServerNotification__McpServerEventStreamNotification, 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": "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/item/started", readonly "params": ServerNotification__ThreadRealtimeItemStartedNotification, readonly "emittedAtMs"?: number } | { readonly "method": "thread/realtime/item/transcript/delta", readonly "params": ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification, readonly "emittedAtMs"?: number } | { readonly "method": "thread/realtime/item/completed", readonly "params": ServerNotification__ThreadRealtimeItemCompletedNotification, 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/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." }), 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." }), 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." }), 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." }), 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." }), 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." }), Schema.Struct({ "method": Schema.Literal("thread/reverted").annotate({ "title": "Thread/revertedNotificationMethod" }), "params": ServerNotification__ThreadRevertedNotification, "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("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." }), 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/queue/changed").annotate({ "title": "Thread/queue/changedNotificationMethod" }), "params": ServerNotification__ThreadQueueChangedNotification, "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("project/changed").annotate({ "title": "Project/changedNotificationMethod" }), "params": ServerNotification__ProjectChangedNotification, "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/project/updated").annotate({ "title": "Thread/project/updatedNotificationMethod" }), "params": ServerNotification__ThreadProjectUpdatedNotification, "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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), Schema.Struct({ "method": Schema.Literal("autoApprovalReview/strictReviewRequired").annotate({ "title": "AutoApprovalReview/strictReviewRequiredNotificationMethod" }), "params": ServerNotification__StrictReviewRequiredNotification, "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/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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), Schema.Struct({ "method": Schema.Literal("mcpServer/event/stream/notification").annotate({ "title": "McpServer/event/stream/notificationNotificationMethod" }), "params": ServerNotification__McpServerEventStreamNotification, "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("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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), Schema.Struct({ "method": Schema.Literal("thread/realtime/item/started").annotate({ "title": "Thread/realtime/item/startedNotificationMethod" }), "params": ServerNotification__ThreadRealtimeItemStartedNotification, "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/item/transcript/delta").annotate({ "title": "Thread/realtime/item/transcript/deltaNotificationMethod" }), "params": ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification, "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/item/completed").annotate({ "title": "Thread/realtime/item/completedNotificationMethod" }), "params": ServerNotification__ThreadRealtimeItemCompletedNotification, "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/delta").annotate({ "title": "Thread/realtime/transcript/deltaNotificationMethod" }), "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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." }), 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." })], { mode: "oneOf" }) export type ServerNotification__ByteRange = { readonly "end": number, readonly "start": number } export const ServerNotification__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) @@ -5130,8 +6108,11 @@ export const ServerNotification__TurnItemsView = Schema.Literals(["notLoaded", " export type ServerRequest = { readonly "id": ServerRequest__RequestId, readonly "method": "item/commandExecution/requestApproval", readonly "params": ServerRequest__CommandExecutionRequestApprovalParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "item/fileChange/requestApproval", readonly "params": ServerRequest__FileChangeRequestApprovalParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "item/tool/requestUserInput", readonly "params": ServerRequest__ToolRequestUserInputParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "mcpServer/elicitation/request", readonly "params": ServerRequest__McpServerElicitationRequestParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "item/permissions/requestApproval", readonly "params": ServerRequest__PermissionsRequestApprovalParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "item/tool/call", readonly "params": ServerRequest__DynamicToolCallParams } | { readonly "id": ServerRequest__RequestId, 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": "currentTime/read", readonly "params": ServerRequest__CurrentTimeReadParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "applyPatchApproval", readonly "params": ServerRequest__ApplyPatchApprovalParams } | { readonly "id": ServerRequest__RequestId, readonly "method": "execCommandApproval", readonly "params": ServerRequest__ExecCommandApprovalParams } export const ServerRequest = Schema.Union([Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("item/commandExecution/requestApproval").annotate({ "title": "Item/commandExecution/requestApprovalRequestMethod" }), "params": ServerRequest__CommandExecutionRequestApprovalParams }).annotate({ "title": "Item/commandExecution/requestApprovalRequest", "description": "NEW APIs Sent when approval is requested for a specific command execution. This request is used for Turns started via turn/start." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("item/fileChange/requestApproval").annotate({ "title": "Item/fileChange/requestApprovalRequestMethod" }), "params": ServerRequest__FileChangeRequestApprovalParams }).annotate({ "title": "Item/fileChange/requestApprovalRequest", "description": "Sent when approval is requested for a specific file change. This request is used for Turns started via turn/start." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("item/tool/requestUserInput").annotate({ "title": "Item/tool/requestUserInputRequestMethod" }), "params": ServerRequest__ToolRequestUserInputParams }).annotate({ "title": "Item/tool/requestUserInputRequest", "description": "EXPERIMENTAL - Request input from the user for a tool call." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("mcpServer/elicitation/request").annotate({ "title": "McpServer/elicitation/requestRequestMethod" }), "params": ServerRequest__McpServerElicitationRequestParams }).annotate({ "title": "McpServer/elicitation/requestRequest", "description": "Request input for an MCP server elicitation." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("item/permissions/requestApproval").annotate({ "title": "Item/permissions/requestApprovalRequestMethod" }), "params": ServerRequest__PermissionsRequestApprovalParams }).annotate({ "title": "Item/permissions/requestApprovalRequest", "description": "Request approval for additional permissions from the user." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("item/tool/call").annotate({ "title": "Item/tool/callRequestMethod" }), "params": ServerRequest__DynamicToolCallParams }).annotate({ "title": "Item/tool/callRequest", "description": "Execute a dynamic tool call on the client." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("account/chatgptAuthTokens/refresh").annotate({ "title": "Account/chatgptAuthTokens/refreshRequestMethod" }), "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("currentTime/read").annotate({ "title": "CurrentTime/readRequestMethod" }), "params": ServerRequest__CurrentTimeReadParams }).annotate({ "title": "CurrentTime/readRequest", "description": "Read the current time from an external clock owned by the client." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("applyPatchApproval").annotate({ "title": "ApplyPatchApprovalRequestMethod" }), "params": ServerRequest__ApplyPatchApprovalParams }).annotate({ "title": "ApplyPatchApprovalRequest", "description": "DEPRECATED APIs below Request to approve a patch. This request is used for Turns started via the legacy APIs (i.e. SendUserTurn, SendUserMessage)." }), Schema.Struct({ "id": ServerRequest__RequestId, "method": Schema.Literal("execCommandApproval").annotate({ "title": "ExecCommandApprovalRequestMethod" }), "params": ServerRequest__ExecCommandApprovalParams }).annotate({ "title": "ExecCommandApprovalRequest", "description": "Request to exec a command. This request is used for Turns started via the legacy APIs (i.e. SendUserTurn, SendUserMessage)." })], { mode: "oneOf" }).annotate({ "title": "ServerRequest", "description": "Request initiated from the server and sent to the client." }) -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, "turnId": Schema.String }).annotate({ "title": "ToolRequestUserInputParams", "description": "EXPERIMENTAL. Params sent with a request_user_input event." }) +export type ServerRequest__CommandExecutionApprovalKind = "command" | "writeStdin" +export const ServerRequest__CommandExecutionApprovalKind = Schema.Literals(["command", "writeStdin"]).annotate({ "description": "Distinguishes a command approval from input sent to an existing terminal." }) + +export type ToolRequestUserInputParams = { readonly "autoResolutionMs"?: number | null, readonly "isBlocking": boolean, 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({ "description": "@deprecated Use `isBlocking` to decide whether the request should block.", "format": "uint64" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "isBlocking": Schema.Boolean, "itemId": Schema.String, "questions": Schema.Array(ToolRequestUserInputParams__ToolRequestUserInputQuestion), "threadId": Schema.String, "turnId": Schema.String }).annotate({ "title": "ToolRequestUserInputParams", "description": "EXPERIMENTAL. Params sent with a request_user_input event." }) export type ToolRequestUserInputResponse = { readonly "answers": { readonly [x: string]: ToolRequestUserInputResponse__ToolRequestUserInputAnswer } } export const ToolRequestUserInputResponse = Schema.Struct({ "answers": Schema.Record(Schema.String, ToolRequestUserInputResponse__ToolRequestUserInputAnswer) }).annotate({ "title": "ToolRequestUserInputResponse", "description": "EXPERIMENTAL. Response payload mapping question ids to answers." }) @@ -5145,8 +6126,8 @@ export const V1InitializeResponse = Schema.Struct({ "codexHome": Schema.String.a export type V1InitializeResponse__AbsolutePathBuf = string export const V1InitializeResponse__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 V2AccountLoginCompletedNotification = { readonly "error"?: string | null, readonly "loginId"?: string | null, readonly "success": boolean } -export const V2AccountLoginCompletedNotification = Schema.Struct({ "error": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "loginId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "success": Schema.Boolean }).annotate({ "title": "AccountLoginCompletedNotification" }) +export type V2AccountLoginCompletedNotification = { readonly "error"?: string | null, readonly "loginId"?: string | null, readonly "onboardingEntrypoint"?: V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint | null, readonly "success": boolean } +export const V2AccountLoginCompletedNotification = Schema.Struct({ "error": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "loginId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "onboardingEntrypoint": Schema.optionalKey(Schema.Union([V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint, Schema.Null])), "success": Schema.Boolean }).annotate({ "title": "AccountLoginCompletedNotification" }) export type V2AccountRateLimitsUpdatedNotification = { readonly "rateLimits": V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot } 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." }) @@ -5172,12 +6153,24 @@ export const V2AppsListParams = Schema.Struct({ "cursor": Schema.optionalKey(Sch export type V2AppsListResponse = { readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } export const V2AppsListResponse = Schema.Struct({ "data": Schema.Array(V2AppsListResponse__AppInfo), "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": "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 V2AppsReadParams = { readonly "appIds": ReadonlyArray, readonly "includeTools"?: boolean, readonly "threadId"?: string | null } +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." })), "threadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional loaded thread id used to evaluate effective app configuration." }), Schema.Null])) }).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 V2BedrockDiscoverParams = { } +export const V2BedrockDiscoverParams = Schema.Struct({ }).annotate({ "title": "BedrockDiscoverParams" }) + +export type V2BedrockDiscoverResponse = { readonly "environmentCredentials": ReadonlyArray, readonly "profiles": ReadonlyArray } +export const V2BedrockDiscoverResponse = Schema.Struct({ "environmentCredentials": Schema.Array(V2BedrockDiscoverResponse__BedrockEnvironmentCredential), "profiles": Schema.Array(V2BedrockDiscoverResponse__BedrockAwsProfile) }).annotate({ "title": "BedrockDiscoverResponse" }) + +export type V2BedrockSetupParams = { readonly "profile": string, readonly "region": string, readonly "type": "profile" } | { readonly "region": string, readonly "type": "environment" } +export const V2BedrockSetupParams = Schema.Union([Schema.Struct({ "profile": Schema.String, "region": Schema.String, "type": Schema.Literal("profile").annotate({ "title": "Profilev2::BedrockSetupParamsType" }) }).annotate({ "title": "Profilev2::BedrockSetupParams" }), Schema.Struct({ "region": Schema.String, "type": Schema.Literal("environment").annotate({ "title": "Environmentv2::BedrockSetupParamsType" }) }).annotate({ "title": "Environmentv2::BedrockSetupParams" })], { mode: "oneOf" }).annotate({ "title": "BedrockSetupParams" }) + +export type V2BedrockSetupResponse = { } +export const V2BedrockSetupResponse = Schema.Struct({ }).annotate({ "title": "BedrockSetupResponse" }) + export type V2CancelLoginAccountParams = { readonly "loginId": string } export const V2CancelLoginAccountParams = Schema.Struct({ "loginId": Schema.String }).annotate({ "title": "CancelLoginAccountParams" }) @@ -5313,8 +6306,8 @@ export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schem export type V2ExternalAgentConfigDetectParams = { readonly "cwds"?: ReadonlyArray | null, readonly "includeHome"?: boolean, readonly "maxSessionAgeDays"?: number | null, readonly "maxSessions"?: number | null, readonly "migrationSource"?: string | null, readonly "source"?: string | null } export const V2ExternalAgentConfigDetectParams = Schema.Struct({ "cwds": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Zero or more working directories to include for repo-scoped detection." }), Schema.Null])), "includeHome": Schema.optionalKey(Schema.Boolean.annotate({ "description": "If true, include detection under the user's home directory." })), "maxSessionAgeDays": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Maximum age in days for detected sessions. Missing values use the default limit.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "maxSessions": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Maximum number of sessions to detect. Missing values use the default limit.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "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 = { readonly "items": ReadonlyArray } -export const V2ExternalAgentConfigDetectResponse = Schema.Struct({ "items": Schema.Array(V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem) }).annotate({ "title": "ExternalAgentConfigDetectResponse" }) +export type V2ExternalAgentConfigDetectResponse = { readonly "connectors"?: ReadonlyArray, readonly "items": ReadonlyArray } +export const V2ExternalAgentConfigDetectResponse = Schema.Struct({ "connectors": Schema.optionalKey(Schema.Array(V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorCandidate).annotate({ "default": [] })), "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" }) @@ -5322,8 +6315,8 @@ export const V2ExternalAgentConfigImportCompletedNotification = Schema.Struct({ 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 V2ExternalAgentConfigImportHistoryRecordParams = { readonly "itemTypeResults": ReadonlyArray, readonly "providerId": string } -export const V2ExternalAgentConfigImportHistoryRecordParams = Schema.Struct({ "itemTypeResults": Schema.Array(V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportTypeResult).annotate({ "description": "Completed results grouped by imported item type." }), "providerId": Schema.String.annotate({ "description": "Opaque provider identifier for the externally completed import." }) }).annotate({ "title": "ExternalAgentConfigImportHistoryRecordParams" }) +export type V2ExternalAgentConfigImportHistoryRecordParams = { readonly "itemTypeResults": ReadonlyArray, readonly "providerId": string } +export const V2ExternalAgentConfigImportHistoryRecordParams = Schema.Struct({ "itemTypeResults": Schema.Array(V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigImportHistoryRecordTypeResultParams).annotate({ "description": "Completed results grouped by imported item type." }), "providerId": Schema.String.annotate({ "description": "Opaque provider identifier for the externally completed import." }) }).annotate({ "title": "ExternalAgentConfigImportHistoryRecordParams" }) export type V2ExternalAgentConfigImportHistoryRecordResponse = { readonly "importId": string } export const V2ExternalAgentConfigImportHistoryRecordResponse = Schema.Struct({ "importId": Schema.String }).annotate({ "title": "ExternalAgentConfigImportHistoryRecordResponse" }) @@ -5442,8 +6435,8 @@ export const V2GetAccountRateLimitsResponse = Schema.Struct({ "rateLimitResetCre export type V2GetAccountResponse = { readonly "account"?: V2GetAccountResponse__Account | null, readonly "requiresOpenaiAuth": boolean } export const V2GetAccountResponse = Schema.Struct({ "account": Schema.optionalKey(Schema.Union([V2GetAccountResponse__Account, Schema.Null])), "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 V2GetAccountTokenUsageResponse = { readonly "dailyUsageBuckets"?: ReadonlyArray | null, readonly "summary": V2GetAccountTokenUsageResponse__AccountTokenUsageSummary, readonly "threadUsage"?: V2GetAccountTokenUsageResponse__ThreadUsage | null } +export const V2GetAccountTokenUsageResponse = Schema.Struct({ "dailyUsageBuckets": Schema.optionalKey(Schema.Union([Schema.Array(V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket), Schema.Null])), "summary": V2GetAccountTokenUsageResponse__AccountTokenUsageSummary, "threadUsage": Schema.optionalKey(Schema.Union([V2GetAccountTokenUsageResponse__ThreadUsage, Schema.Null]).annotate({ "description": "Estimated usage when a thread was requested and its billing route is available." })) }).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" }) @@ -5485,10 +6478,10 @@ export type V2ItemCompletedNotification__CommandExecutionSource = "agent" | "use export const V2ItemCompletedNotification__CommandExecutionSource = Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]) 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({ "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({ "title": "ItemGuardianApprovalReviewCompletedNotification", "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon." }) +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({ "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) - stdin reviews, which refer to the existing parent command item and have a separate approval ID in the action payload - 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({ "title": "ItemGuardianApprovalReviewCompletedNotification", "description": "[UNSTABLE] Temporary notification payload for approval auto-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 } -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({ "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({ "title": "ItemGuardianApprovalReviewStartedNotification", "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon." }) +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({ "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) - stdin reviews, which refer to the existing parent command item and have a separate approval ID in the action payload - 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({ "title": "ItemGuardianApprovalReviewStartedNotification", "description": "[UNSTABLE] Temporary notification payload for approval auto-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" }) @@ -5511,8 +6504,8 @@ export const V2ListMcpServerStatusParams = Schema.Struct({ "cursor": Schema.opti export type V2ListMcpServerStatusResponse = { readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } export const V2ListMcpServerStatusResponse = Schema.Struct({ "data": Schema.Array(V2ListMcpServerStatusResponse__McpServerStatus), "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": "ListMcpServerStatusResponse" }) -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": "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({ "apiKey": Schema.String, "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({ "title": "ChatgptDeviceCodev2::LoginAccountParamsType" }) }).annotate({ "title": "ChatgptDeviceCodev2::LoginAccountParams" }), 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": "ChatgptAuthTokensv2::LoginAccountParamsType" }) }).annotate({ "title": "ChatgptAuthTokensv2::LoginAccountParams", "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" }) +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": "chatgptDeviceCode" } | { readonly "accessToken": string, readonly "chatgptAccountId": string, readonly "chatgptPlanType"?: string | null, readonly "type": "chatgptAuthTokens" } | { readonly "apiKey": string, readonly "region": string, readonly "type": "amazonBedrock" } | { readonly "accessKeyId": string, readonly "region": string, readonly "secretAccessKey": string, readonly "sessionToken"?: string | null, readonly "type": "amazonBedrockAccessKeys" } +export const V2LoginAccountParams = Schema.Union([Schema.Struct({ "apiKey": Schema.String, "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({ "title": "ChatgptDeviceCodev2::LoginAccountParamsType" }) }).annotate({ "title": "ChatgptDeviceCodev2::LoginAccountParams" }), 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": "ChatgptAuthTokensv2::LoginAccountParamsType" }) }).annotate({ "title": "ChatgptAuthTokensv2::LoginAccountParams", "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." }), Schema.Struct({ "accessKeyId": Schema.String, "region": Schema.String, "secretAccessKey": Schema.String, "sessionToken": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "type": Schema.Literal("amazonBedrockAccessKeys").annotate({ "title": "AmazonBedrockAccessKeysv2::LoginAccountParamsType" }) }).annotate({ "title": "AmazonBedrockAccessKeysv2::LoginAccountParams", "description": "[UNSTABLE] Managed Amazon Bedrock AWS access key login is experimental." })], { mode: "oneOf" }).annotate({ "title": "LoginAccountParams" }) export type V2LoginAccountResponse = { readonly "type": "apiKey" } | { readonly "authUrl": string, readonly "loginId": string, readonly "type": "chatgpt" } | { readonly "loginId": string, readonly "type": "chatgptDeviceCode", readonly "userCode": string, readonly "verificationUrl": string } | { readonly "type": "chatgptAuthTokens" } | { readonly "type": "amazonBedrock" } export const V2LoginAccountResponse = Schema.Union([Schema.Struct({ "type": Schema.Literal("apiKey").annotate({ "title": "ApiKeyv2::LoginAccountResponseType" }) }).annotate({ "title": "ApiKeyv2::LoginAccountResponse" }), Schema.Struct({ "authUrl": Schema.String.annotate({ "description": "URL the client should open in a browser to initiate the OAuth flow." }), "loginId": Schema.String, "type": Schema.Literal("chatgpt").annotate({ "title": "Chatgptv2::LoginAccountResponseType" }) }).annotate({ "title": "Chatgptv2::LoginAccountResponse" }), Schema.Struct({ "loginId": Schema.String, "type": Schema.Literal("chatgptDeviceCode").annotate({ "title": "ChatgptDeviceCodev2::LoginAccountResponseType" }), "userCode": Schema.String.annotate({ "description": "One-time code the user must enter after signing in." }), "verificationUrl": Schema.String.annotate({ "description": "URL the client should open in a browser to complete device code authorization." }) }).annotate({ "title": "ChatgptDeviceCodev2::LoginAccountResponse" }), Schema.Struct({ "type": Schema.Literal("chatgptAuthTokens").annotate({ "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" }) @@ -5538,17 +6531,32 @@ export const V2MarketplaceUpgradeParams = Schema.Struct({ "marketplaceName": Sch 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 "uri": string } -export const V2McpResourceReadParams = Schema.Struct({ "server": Schema.String, "threadId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "uri": Schema.String }).annotate({ "title": "McpResourceReadParams" }) +export type V2McpResourceReadParams = { readonly "connectorId"?: string | null, readonly "originCallId"?: string | null, readonly "server": string, readonly "threadId"?: string | null, readonly "uri": string } +export const V2McpResourceReadParams = Schema.Struct({ "connectorId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "originCallId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Originating MCP tool call used to select the resource's app." }), Schema.Null])), "server": Schema.String, "threadId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "uri": Schema.String }).annotate({ "title": "McpResourceReadParams" }) + +export type V2McpResourceReadResponse = { readonly "contents": ReadonlyArray, readonly "originCallId"?: string | null } +export const V2McpResourceReadResponse = Schema.Struct({ "contents": Schema.Array(V2McpResourceReadResponse__ResourceContent), "originCallId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Originating call when the server applied app-specific resource scoping." }), Schema.Null])) }).annotate({ "title": "McpResourceReadResponse" }) + +export type V2McpServerEventStreamNotification = { readonly "notification": V2McpServerEventStreamNotification__McpServerEventNotification, readonly "subscriptionId": string } +export const V2McpServerEventStreamNotification = Schema.Struct({ "notification": V2McpServerEventStreamNotification__McpServerEventNotification, "subscriptionId": Schema.String }).annotate({ "title": "McpServerEventStreamNotification" }) + +export type V2McpServerEventStreamStartParams = { readonly "_meta"?: Schema.Json, readonly "arguments": Schema.Json, readonly "name": string, readonly "server": string, readonly "subscriptionId": string, readonly "threadId": string } +export const V2McpServerEventStreamStartParams = Schema.Struct({ "_meta": Schema.optionalKey(Schema.Json), "arguments": Schema.Json, "name": Schema.String, "server": Schema.String, "subscriptionId": Schema.String, "threadId": Schema.String }).annotate({ "title": "McpServerEventStreamStartParams" }) + +export type V2McpServerEventStreamStartResponse = { } +export const V2McpServerEventStreamStartResponse = Schema.Struct({ }).annotate({ "title": "McpServerEventStreamStartResponse" }) + +export type V2McpServerEventStreamStopParams = { readonly "subscriptionId": string } +export const V2McpServerEventStreamStopParams = Schema.Struct({ "subscriptionId": Schema.String }).annotate({ "title": "McpServerEventStreamStopParams" }) -export type V2McpResourceReadResponse = { readonly "contents": ReadonlyArray } -export const V2McpResourceReadResponse = Schema.Struct({ "contents": Schema.Array(V2McpResourceReadResponse__ResourceContent) }).annotate({ "title": "McpResourceReadResponse" }) +export type V2McpServerEventStreamStopResponse = { } +export const V2McpServerEventStreamStopResponse = Schema.Struct({ }).annotate({ "title": "McpServerEventStreamStopResponse" }) 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])) }).annotate({ "title": "McpServerOauthLoginParams" }) +export type V2McpServerOauthLoginParams = { readonly "clientRegistration"?: V2McpServerOauthLoginParams__McpServerOauthClientRegistration | null, readonly "name": string, readonly "scopes"?: ReadonlyArray | null, readonly "threadId"?: string | null, readonly "timeoutSecs"?: number | null } +export const V2McpServerOauthLoginParams = Schema.Struct({ "clientRegistration": Schema.optionalKey(Schema.Union([V2McpServerOauthLoginParams__McpServerOauthClientRegistration, Schema.Null]).annotate({ "description": "Registration strategy for this login only; omission selects automatic discovery." })), "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])) }).annotate({ "title": "McpServerOauthLoginParams" }) export type V2McpServerOauthLoginResponse = { readonly "authorizationUrl": string } export const V2McpServerOauthLoginResponse = Schema.Struct({ "authorizationUrl": Schema.String }).annotate({ "title": "McpServerOauthLoginResponse" }) @@ -5598,6 +6606,9 @@ export const V2ModelSafetyBufferingUpdatedNotification = Schema.Struct({ "faster 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 V2NullableGetAccountTokenUsageParams = V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams | null +export const V2NullableGetAccountTokenUsageParams = Schema.Union([V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams, Schema.Null]).annotate({ "title": "Nullable_GetAccountTokenUsageParams" }) + export type V2NullableRemoteControlDisableParams = V2NullableRemoteControlDisableParams__RemoteControlDisableParams | null export const V2NullableRemoteControlDisableParams = Schema.Union([V2NullableRemoteControlDisableParams__RemoteControlDisableParams, Schema.Null]).annotate({ "title": "Nullable_RemoteControlDisableParams" }) @@ -5622,8 +6633,8 @@ export const V2PluginInstalledResponse = Schema.Struct({ "marketplaceLoadErrors" 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 "pluginName": string, readonly "remoteMarketplaceName"?: string | null } -export const V2PluginInstallParams = Schema.Struct({ "marketplacePath": Schema.optionalKey(Schema.Union([V2PluginInstallParams__AbsolutePathBuf, Schema.Null])), "pluginName": Schema.String, "remoteMarketplaceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "PluginInstallParams" }) +export type V2PluginInstallParams = { readonly "installAttemptId"?: string | null, readonly "marketplacePath"?: V2PluginInstallParams__AbsolutePathBuf | null, readonly "pluginName": string, readonly "remoteMarketplaceName"?: string | null } +export const V2PluginInstallParams = Schema.Struct({ "installAttemptId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Client-generated identifier used to correlate one installation attempt." }), Schema.Null])), "marketplacePath": Schema.optionalKey(Schema.Union([V2PluginInstallParams__AbsolutePathBuf, Schema.Null])), "pluginName": Schema.String, "remoteMarketplaceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "PluginInstallParams" }) export type V2PluginInstallResponse = { readonly "appsNeedingAuth": ReadonlyArray, readonly "authPolicy": V2PluginInstallResponse__PluginAuthPolicy } export const V2PluginInstallResponse = Schema.Struct({ "appsNeedingAuth": Schema.Array(V2PluginInstallResponse__AppSummary), "authPolicy": V2PluginInstallResponse__PluginAuthPolicy }).annotate({ "title": "PluginInstallResponse" }) @@ -5646,6 +6657,15 @@ export const V2PluginReadResponse = Schema.Struct({ "plugin": V2PluginReadRespon export type V2PluginReadResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE" export const V2PluginReadResponse__PluginAvailability = Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]) +export type V2PluginSearchParams = { readonly "cursor"?: string | null, readonly "cwds"?: ReadonlyArray | null, readonly "limit"?: number | null, readonly "scope"?: V2PluginSearchParams__PluginSearchScope | null, readonly "searchTerm": string } +export const V2PluginSearchParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "cwds": Schema.optionalKey(Schema.Union([Schema.Array(V2PluginSearchParams__AbsolutePathBuf), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "scope": Schema.optionalKey(Schema.Union([V2PluginSearchParams__PluginSearchScope, Schema.Null])), "searchTerm": Schema.String }).annotate({ "title": "PluginSearchParams" }) + +export type V2PluginSearchResponse = { readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } +export const V2PluginSearchResponse = Schema.Struct({ "data": Schema.Array(V2PluginSearchResponse__PluginSearchResult), "nextCursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "PluginSearchResponse" }) + +export type V2PluginSearchResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE" +export const V2PluginSearchResponse__PluginAvailability = Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]) + export type V2PluginShareCheckoutParams = { readonly "remotePluginId": string } export const V2PluginShareCheckoutParams = Schema.Struct({ "remotePluginId": Schema.String }).annotate({ "title": "PluginShareCheckoutParams" }) @@ -5730,6 +6750,51 @@ export const V2ProcessWriteStdinParams = Schema.Struct({ "closeStdin": Schema.op export type V2ProcessWriteStdinResponse = { } export const V2ProcessWriteStdinResponse = Schema.Struct({ }).annotate({ "title": "ProcessWriteStdinResponse", "description": "Empty success response for `process/writeStdin`." }) +export type V2ProjectChangedNotification = { readonly "changeType": V2ProjectChangedNotification__ProjectChangeType, readonly "projectId": string } +export const V2ProjectChangedNotification = Schema.Struct({ "changeType": V2ProjectChangedNotification__ProjectChangeType, "projectId": Schema.String }).annotate({ "title": "ProjectChangedNotification" }) + +export type V2ProjectCreateParams = { readonly "idempotencyKey": string, readonly "metadata"?: { readonly [x: string]: string } | null, readonly "name": string, readonly "roots": ReadonlyArray } +export const V2ProjectCreateParams = Schema.Struct({ "idempotencyKey": Schema.String, "metadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "name": Schema.String, "roots": Schema.Array(V2ProjectCreateParams__ProjectRoot) }).annotate({ "title": "ProjectCreateParams" }) + +export type V2ProjectCreateResponse = { readonly "project": V2ProjectCreateResponse__Project } +export const V2ProjectCreateResponse = Schema.Struct({ "project": V2ProjectCreateResponse__Project }).annotate({ "title": "ProjectCreateResponse" }) + +export type V2ProjectDeleteParams = { readonly "projectId": string } +export const V2ProjectDeleteParams = Schema.Struct({ "projectId": Schema.String }).annotate({ "title": "ProjectDeleteParams" }) + +export type V2ProjectDeleteResponse = { } +export const V2ProjectDeleteResponse = Schema.Struct({ }).annotate({ "title": "ProjectDeleteResponse" }) + +export type V2ProjectImportParams = { readonly "idempotencyKey": string, readonly "metadata"?: { readonly [x: string]: string } | null, readonly "name": string, readonly "roots": ReadonlyArray, readonly "threads"?: ReadonlyArray | null } +export const V2ProjectImportParams = Schema.Struct({ "idempotencyKey": Schema.String, "metadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "name": Schema.String, "roots": Schema.Array(V2ProjectImportParams__ProjectRoot), "threads": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])) }).annotate({ "title": "ProjectImportParams" }) + +export type V2ProjectImportResponse = { readonly "project": V2ProjectImportResponse__Project } +export const V2ProjectImportResponse = Schema.Struct({ "project": V2ProjectImportResponse__Project }).annotate({ "title": "ProjectImportResponse" }) + +export type V2ProjectListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null } +export const V2ProjectListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }).annotate({ "title": "ProjectListParams" }) + +export type V2ProjectListResponse = { readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } +export const V2ProjectListResponse = Schema.Struct({ "data": Schema.Array(V2ProjectListResponse__Project), "nextCursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "ProjectListResponse" }) + +export type V2ProjectMoveParams = { readonly "beforeProjectId"?: string | null, readonly "projectId": string } +export const V2ProjectMoveParams = Schema.Struct({ "beforeProjectId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "projectId": Schema.String }).annotate({ "title": "ProjectMoveParams" }) + +export type V2ProjectMoveResponse = { } +export const V2ProjectMoveResponse = Schema.Struct({ }).annotate({ "title": "ProjectMoveResponse" }) + +export type V2ProjectReadParams = { readonly "projectId": string } +export const V2ProjectReadParams = Schema.Struct({ "projectId": Schema.String }).annotate({ "title": "ProjectReadParams" }) + +export type V2ProjectReadResponse = { readonly "project": V2ProjectReadResponse__Project } +export const V2ProjectReadResponse = Schema.Struct({ "project": V2ProjectReadResponse__Project }).annotate({ "title": "ProjectReadResponse" }) + +export type V2ProjectUpdateParams = { readonly "metadata"?: { readonly [x: string]: string } | null, readonly "name"?: string | null, readonly "projectId": string, readonly "roots"?: ReadonlyArray | null } +export const V2ProjectUpdateParams = Schema.Struct({ "metadata": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])), "name": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "projectId": Schema.String, "roots": Schema.optionalKey(Schema.Union([Schema.Array(V2ProjectUpdateParams__ProjectRoot), Schema.Null])) }).annotate({ "title": "ProjectUpdateParams" }) + +export type V2ProjectUpdateResponse = { readonly "project": V2ProjectUpdateResponse__Project } +export const V2ProjectUpdateResponse = Schema.Struct({ "project": V2ProjectUpdateResponse__Project }).annotate({ "title": "ProjectUpdateResponse" }) + 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." }) @@ -5808,6 +6873,12 @@ export const V2SendAddCreditsNudgeEmailParams = Schema.Struct({ "creditType": V2 export type V2SendAddCreditsNudgeEmailResponse = { readonly "status": V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus } export const V2SendAddCreditsNudgeEmailResponse = Schema.Struct({ "status": V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus }).annotate({ "title": "SendAddCreditsNudgeEmailResponse" }) +export type V2ServerDiagnosticsParams = { } +export const V2ServerDiagnosticsParams = Schema.Struct({ }).annotate({ "title": "ServerDiagnosticsParams" }) + +export type V2ServerDiagnosticsResponse = { readonly "gauges": ReadonlyArray, readonly "process": V2ServerDiagnosticsResponse__ServerDiagnosticsProcess } +export const V2ServerDiagnosticsResponse = Schema.Struct({ "gauges": Schema.Array(V2ServerDiagnosticsResponse__ServerDiagnosticsGauge), "process": V2ServerDiagnosticsResponse__ServerDiagnosticsProcess }).annotate({ "title": "ServerDiagnosticsResponse" }) + export type V2ServerRequestResolvedNotification = { readonly "requestId": V2ServerRequestResolvedNotification__RequestId, readonly "threadId": string } export const V2ServerRequestResolvedNotification = Schema.Struct({ "requestId": V2ServerRequestResolvedNotification__RequestId, "threadId": Schema.String }).annotate({ "title": "ServerRequestResolvedNotification" }) @@ -5832,6 +6903,9 @@ export const V2SkillsListParams = Schema.Struct({ "cwds": Schema.optionalKey(Sch export type V2SkillsListResponse = { readonly "data": ReadonlyArray } export const V2SkillsListResponse = Schema.Struct({ "data": Schema.Array(V2SkillsListResponse__SkillsListEntry) }).annotate({ "title": "SkillsListResponse" }) +export type V2StrictReviewRequiredNotification = { readonly "startedAtMs": number, readonly "threadId": string, readonly "turnId": string } +export const V2StrictReviewRequiredNotification = Schema.Struct({ "startedAtMs": Schema.Number.annotate({ "description": "Unix timestamp (in milliseconds) when this review started.", "format": "int64" }).check(Schema.isInt()), "threadId": Schema.String, "turnId": Schema.String }).annotate({ "title": "StrictReviewRequiredNotification" }) + export type V2TerminalInteractionNotification = { readonly "itemId": string, readonly "processId": string, readonly "stdin": string, readonly "threadId": string, readonly "turnId": string } export const V2TerminalInteractionNotification = Schema.Struct({ "itemId": Schema.String, "processId": Schema.String, "stdin": Schema.String, "threadId": Schema.String, "turnId": Schema.String }).annotate({ "title": "TerminalInteractionNotification" }) @@ -5988,8 +7062,8 @@ export const V2ThreadItemsListResponse__CollabAgentToolCallStatus = Schema.Liter export type V2ThreadItemsListResponse__CommandExecutionSource = "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction" export const V2ThreadItemsListResponse__CommandExecutionSource = Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]) -export type V2ThreadListParams = { readonly "ancestorThreadId"?: string | null, readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "cwd"?: V2ThreadListParams__ThreadListCwdFilter | null, readonly "isPinned"?: boolean | null, readonly "limit"?: number | null, readonly "modelProviders"?: ReadonlyArray | null, readonly "parentThreadId"?: string | 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({ "ancestorThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with `parentThreadId`." }), Schema.Null])), "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "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." })), "isPinned": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional pinned filter; when set, only threads matching this value are returned." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "modelProviders": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers." }), Schema.Null])), "parentThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`." }), Schema.Null])), "searchTerm": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional substring filter for the extracted thread title." }), 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." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadListParams__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), 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 V2ThreadListParams = { readonly "ancestorThreadId"?: string | null, readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "cwd"?: V2ThreadListParams__ThreadListCwdFilter | null, readonly "limit"?: number | null, readonly "modelProviders"?: ReadonlyArray | null, readonly "parentThreadId"?: string | null, readonly "projectId"?: string | null, readonly "searchTerm"?: string | null, readonly "sectionId"?: string | null, readonly "sortDirection"?: V2ThreadListParams__SortDirection | null, readonly "sortKey"?: V2ThreadListParams__ThreadSortKey | null, readonly "sourceKinds"?: ReadonlyArray | null, readonly "useStateDbOnly"?: boolean } +export const V2ThreadListParams = Schema.Struct({ "ancestorThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional ancestor thread filter. Returns spawned descendants at any depth, excluding the ancestor itself. Mutually exclusive with `parentThreadId`." }), Schema.Null])), "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "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." })), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "modelProviders": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String).annotate({ "description": "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers." }), Schema.Null])), "parentThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional direct parent thread filter. Mutually exclusive with `ancestorThreadId`." }), Schema.Null])), "projectId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to include every project, set to null for unassigned threads, or provide a project ID to return only threads in that project." }), Schema.Null])), "searchTerm": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional substring filter for the extracted thread title." }), Schema.Null])), "sectionId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to include every section, set to `null` for unsectioned threads, or provide a section ID to return only threads in that section." }), 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." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadListParams__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), 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([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": "ThreadListResponse" }) @@ -6030,8 +7104,8 @@ export const V2ThreadMemoryModeSetParams = Schema.Struct({ "mode": V2ThreadMemor export type V2ThreadMemoryModeSetResponse = { } export const V2ThreadMemoryModeSetResponse = Schema.Struct({ }).annotate({ "title": "ThreadMemoryModeSetResponse" }) -export type V2ThreadMetadataUpdateParams = { readonly "gitInfo"?: V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams | null, readonly "isPinned"?: boolean | null, readonly "threadId": string } -export const V2ThreadMetadataUpdateParams = Schema.Struct({ "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({ "description": "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value." })), "isPinned": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Patch whether this thread is pinned. Omit to leave the stored value unchanged." }), Schema.Null])), "threadId": Schema.String }).annotate({ "title": "ThreadMetadataUpdateParams" }) +export type V2ThreadMetadataUpdateParams = { readonly "gitInfo"?: V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams | null, readonly "projectId"?: string | null, readonly "threadId": string } +export const V2ThreadMetadataUpdateParams = Schema.Struct({ "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({ "description": "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value." })), "projectId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Omit to leave the project unchanged, use an empty string to clear it, or provide an existing project ID to assign it." }), Schema.Null])), "threadId": Schema.String }).annotate({ "title": "ThreadMetadataUpdateParams" }) export type V2ThreadMetadataUpdateResponse = { readonly "thread": V2ThreadMetadataUpdateResponse__Thread } export const V2ThreadMetadataUpdateResponse = Schema.Struct({ "thread": V2ThreadMetadataUpdateResponse__Thread }).annotate({ "title": "ThreadMetadataUpdateResponse" }) @@ -6063,6 +7137,78 @@ export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Literals(["n export type V2ThreadNameUpdatedNotification = { readonly "threadId": string, readonly "threadName"?: string | null } export const V2ThreadNameUpdatedNotification = Schema.Struct({ "threadId": Schema.String, "threadName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "ThreadNameUpdatedNotification" }) +export type V2ThreadProjectUpdatedNotification = { readonly "projectId": string | null, readonly "threadId": string } +export const V2ThreadProjectUpdatedNotification = Schema.Struct({ "projectId": Schema.Union([Schema.String, Schema.Null]), "threadId": Schema.String }).annotate({ "title": "ThreadProjectUpdatedNotification" }) + +export type V2ThreadQueueAddParams = { readonly "clientUserMessageId": string, readonly "input": ReadonlyArray, readonly "threadId": string } +export const V2ThreadQueueAddParams = Schema.Struct({ "clientUserMessageId": Schema.String, "input": Schema.Array(V2ThreadQueueAddParams__UserInput), "threadId": Schema.String }).annotate({ "title": "ThreadQueueAddParams" }) + +export type V2ThreadQueueAddParams__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadQueueAddParams__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadQueueAddResponse = { readonly "queuedSubmission": V2ThreadQueueAddResponse__QueuedSubmission } +export const V2ThreadQueueAddResponse = Schema.Struct({ "queuedSubmission": V2ThreadQueueAddResponse__QueuedSubmission }).annotate({ "title": "ThreadQueueAddResponse" }) + +export type V2ThreadQueueAddResponse__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadQueueAddResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadQueueChangedNotification = { readonly "threadId": string } +export const V2ThreadQueueChangedNotification = Schema.Struct({ "threadId": Schema.String }).annotate({ "title": "ThreadQueueChangedNotification" }) + +export type V2ThreadQueueDeleteParams = { readonly "queuedSubmissionId": string, readonly "threadId": string } +export const V2ThreadQueueDeleteParams = Schema.Struct({ "queuedSubmissionId": Schema.String, "threadId": Schema.String }).annotate({ "title": "ThreadQueueDeleteParams" }) + +export type V2ThreadQueueDeleteResponse = { readonly "deleted": boolean } +export const V2ThreadQueueDeleteResponse = Schema.Struct({ "deleted": Schema.Boolean }).annotate({ "title": "ThreadQueueDeleteResponse" }) + +export type V2ThreadQueueListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "threadId": string } +export const V2ThreadQueueListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to the standard thread-list page size.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "threadId": Schema.String }).annotate({ "title": "ThreadQueueListParams" }) + +export type V2ThreadQueueListResponse = { readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } +export const V2ThreadQueueListResponse = Schema.Struct({ "data": Schema.Array(V2ThreadQueueListResponse__QueuedSubmission), "nextCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor for the next page, or `null` when no submissions remain." }), Schema.Null])) }).annotate({ "title": "ThreadQueueListResponse" }) + +export type V2ThreadQueueListResponse__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadQueueListResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadQueueReorderParams = { readonly "queuedSubmissionIds": ReadonlyArray, readonly "threadId": string } +export const V2ThreadQueueReorderParams = Schema.Struct({ "queuedSubmissionIds": Schema.Array(Schema.String), "threadId": Schema.String }).annotate({ "title": "ThreadQueueReorderParams" }) + +export type V2ThreadQueueReorderResponse = { } +export const V2ThreadQueueReorderResponse = Schema.Struct({ }).annotate({ "title": "ThreadQueueReorderResponse" }) + +export type V2ThreadQueueStartParams = { readonly "queuedSubmissionId"?: string | null, readonly "threadId": string } +export const V2ThreadQueueStartParams = Schema.Struct({ "queuedSubmissionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String }).annotate({ "title": "ThreadQueueStartParams" }) + +export type V2ThreadQueueStartResponse = { readonly "turn": V2ThreadQueueStartResponse__Turn } +export const V2ThreadQueueStartResponse = Schema.Struct({ "turn": V2ThreadQueueStartResponse__Turn }).annotate({ "title": "ThreadQueueStartResponse" }) + +export type V2ThreadQueueStartResponse__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadQueueStartResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadQueueStartResponse__CollabAgentTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents" +export const V2ThreadQueueStartResponse__CollabAgentTool = Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]) + +export type V2ThreadQueueStartResponse__CollabAgentToolCallStatus = "inProgress" | "completed" | "failed" | "interrupted" +export const V2ThreadQueueStartResponse__CollabAgentToolCallStatus = Schema.Literals(["inProgress", "completed", "failed", "interrupted"]) + +export type V2ThreadQueueStartResponse__CommandExecutionSource = "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction" +export const V2ThreadQueueStartResponse__CommandExecutionSource = Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]) + +export type V2ThreadQueueStartResponse__TurnItemsView = "notLoaded" | "summary" | "full" +export const V2ThreadQueueStartResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]) + +export type V2ThreadQueueUpdateParams = { readonly "input": ReadonlyArray, readonly "queuedSubmissionId": string, readonly "threadId": string } +export const V2ThreadQueueUpdateParams = Schema.Struct({ "input": Schema.Array(V2ThreadQueueUpdateParams__UserInput), "queuedSubmissionId": Schema.String, "threadId": Schema.String }).annotate({ "title": "ThreadQueueUpdateParams" }) + +export type V2ThreadQueueUpdateParams__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadQueueUpdateParams__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadQueueUpdateResponse = { readonly "queuedSubmission": V2ThreadQueueUpdateResponse__QueuedSubmission } +export const V2ThreadQueueUpdateResponse = Schema.Struct({ "queuedSubmission": V2ThreadQueueUpdateResponse__QueuedSubmission }).annotate({ "title": "ThreadQueueUpdateResponse" }) + +export type V2ThreadQueueUpdateResponse__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadQueueUpdateResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + export type V2ThreadReadParams = { readonly "includeTurns"?: boolean, readonly "threadId": string } export const V2ThreadReadParams = Schema.Struct({ "includeTurns": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, include turns and their items from rollout history." })), "threadId": Schema.String }).annotate({ "title": "ThreadReadParams" }) @@ -6123,6 +7269,15 @@ export const V2ThreadRealtimeErrorNotification = Schema.Struct({ "message": Sche export type V2ThreadRealtimeItemAddedNotification = { readonly "item": Schema.Json, readonly "threadId": string } export const V2ThreadRealtimeItemAddedNotification = Schema.Struct({ "item": Schema.Json, "threadId": Schema.String }).annotate({ "title": "ThreadRealtimeItemAddedNotification", "description": "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend." }) +export type V2ThreadRealtimeItemCompletedNotification = { readonly "item": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeItem, readonly "threadId": string } +export const V2ThreadRealtimeItemCompletedNotification = Schema.Struct({ "item": V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeItem, "threadId": Schema.String }).annotate({ "title": "ThreadRealtimeItemCompletedNotification", "description": "EXPERIMENTAL - a realtime timeline item published after canonical commit." }) + +export type V2ThreadRealtimeItemStartedNotification = { readonly "item": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeItem, readonly "threadId": string } +export const V2ThreadRealtimeItemStartedNotification = Schema.Struct({ "item": V2ThreadRealtimeItemStartedNotification__ThreadRealtimeItem, "threadId": Schema.String }).annotate({ "title": "ThreadRealtimeItemStartedNotification", "description": "EXPERIMENTAL - a realtime timeline item started before its content streams." }) + +export type V2ThreadRealtimeItemTranscriptDeltaNotification = { readonly "delta": string, readonly "itemId": string, readonly "threadId": string } +export const V2ThreadRealtimeItemTranscriptDeltaNotification = Schema.Struct({ "delta": Schema.String, "itemId": Schema.String, "threadId": Schema.String }).annotate({ "title": "ThreadRealtimeItemTranscriptDeltaNotification", "description": "EXPERIMENTAL - text appended to an active realtime transcript item." }) + export type V2ThreadRealtimeListVoicesParams = { } export const V2ThreadRealtimeListVoicesParams = Schema.Struct({ }).annotate({ "title": "ThreadRealtimeListVoicesParams", "description": "EXPERIMENTAL - list voices supported by thread realtime." }) @@ -6138,8 +7293,8 @@ export const V2ThreadRealtimeSdpNotification = Schema.Struct({ "sdp": Schema.Str export type V2ThreadRealtimeStartedNotification = { readonly "realtimeSessionId"?: string | null, readonly "threadId": string, readonly "version": V2ThreadRealtimeStartedNotification__RealtimeConversationVersion } export const V2ThreadRealtimeStartedNotification = Schema.Struct({ "realtimeSessionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String, "version": V2ThreadRealtimeStartedNotification__RealtimeConversationVersion }).annotate({ "title": "ThreadRealtimeStartedNotification", "description": "EXPERIMENTAL - emitted when thread realtime startup is accepted." }) -export type V2ThreadRealtimeStartParams = { readonly "clientManagedHandoffs"?: boolean | null, readonly "codexResponseHandoffChannelPrefixes"?: { readonly [x: string]: ReadonlyArray } | null, readonly "codexResponseHandoffMode"?: V2ThreadRealtimeStartParams__CodexResponseHandoffMode | null, readonly "codexResponseItemPrefix"?: string | null, readonly "codexResponsesAsItems"?: boolean | null, readonly "flushTranscriptTailOnSessionEnd"?: boolean | null, readonly "includeStartupContext"?: boolean | null, readonly "initialItems"?: ReadonlyArray | null, readonly "model"?: string | null, readonly "outputModality": "text" | "audio", readonly "prompt"?: string | null, readonly "realtimeSessionId"?: string | null, readonly "threadId": string, readonly "transport"?: V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport | null, readonly "version"?: V2ThreadRealtimeStartParams__RealtimeConversationVersion | null, readonly "voice"?: V2ThreadRealtimeStartParams__RealtimeVoice | null } -export const V2ThreadRealtimeStartParams = Schema.Struct({ "clientManagedHandoffs": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Leaves Codex response handoffs to the client's explicit append calls instead of forwarding them automatically. Defaults to false." }), Schema.Null])), "codexResponseHandoffChannelPrefixes": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Array(Schema.String)).annotate({ "description": "Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`. Omitted channels retain their default uppercase bracketed prefixes." }), Schema.Null])), "codexResponseHandoffMode": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__CodexResponseHandoffMode, Schema.Null]).annotate({ "description": "Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values default to `thinking`. Realtime V1 and V2 ignore this setting." })), "codexResponseItemPrefix": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional prefix added to automatic Codex response items when `codexResponsesAsItems` is true." }), Schema.Null])), "codexResponsesAsItems": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Sends automatic Codex responses as realtime conversation items instead of handoff appends." }), Schema.Null])), "flushTranscriptTailOnSessionEnd": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Routes any transcript tail remaining at session end through Codex. Defaults to false. TODO: Remove this rollout knob once transcript-tail flushing is always enabled." }), Schema.Null])), "includeStartupContext": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Set to false to start without Codex's startup context. Omitted or null includes it." }), Schema.Null])), "initialItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadRealtimeStartParams__ThreadRealtimeInitialItem).annotate({ "description": "Adds complete role-bearing text items to the initial Frameless Bidi session history. This is only supported by realtime V3 and is sent during session startup. Requests are limited to 128 items and 8,192 estimated text tokens in total." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Overrides the configured realtime model for this session only." }), Schema.Null])), "outputModality": Schema.Literals(["text", "audio"]).annotate({ "description": "Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits." }), "prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "realtimeSessionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "threadId": Schema.String, "transport": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport, Schema.Null])), "version": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__RealtimeConversationVersion, Schema.Null]).annotate({ "description": "Overrides the configured realtime protocol version for this session only." })), "voice": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__RealtimeVoice, Schema.Null])) }).annotate({ "title": "ThreadRealtimeStartParams", "description": "EXPERIMENTAL - start a thread-scoped realtime session." }) +export type V2ThreadRealtimeStartParams = { readonly "clientManagedHandoffs"?: boolean | null, readonly "codexResponseHandoffChannelPrefixes"?: { readonly [x: string]: ReadonlyArray } | null, readonly "codexResponseHandoffMode"?: V2ThreadRealtimeStartParams__CodexResponseHandoffMode | null, readonly "codexResponseItemPrefix"?: string | null, readonly "codexResponsesAsItems"?: boolean | null, readonly "delegationAckFiller"?: boolean | null, readonly "flushTranscriptTailOnSessionEnd"?: boolean | null, readonly "includeStartupContext"?: boolean | null, readonly "initialItems"?: ReadonlyArray | null, readonly "model"?: string | null, readonly "outputModality": "text" | "audio", readonly "prompt"?: string | null, readonly "realtimeEndInstructions"?: string | null, readonly "realtimeSessionId"?: string | null, readonly "realtimeStartInstructions"?: string | null, readonly "threadId": string, readonly "transport"?: V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport | null, readonly "version"?: V2ThreadRealtimeStartParams__RealtimeConversationVersion | null, readonly "voice"?: V2ThreadRealtimeStartParams__RealtimeVoice | null } +export const V2ThreadRealtimeStartParams = Schema.Struct({ "clientManagedHandoffs": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Leaves Codex response handoffs to the client's explicit append calls instead of forwarding them automatically. Defaults to false." }), Schema.Null])), "codexResponseHandoffChannelPrefixes": Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Array(Schema.String)).annotate({ "description": "Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`. Omitted channels retain their default uppercase bracketed prefixes." }), Schema.Null])), "codexResponseHandoffMode": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__CodexResponseHandoffMode, Schema.Null]).annotate({ "description": "Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values default to `thinking`. Realtime V1 and V2 ignore this setting." })), "codexResponseItemPrefix": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional prefix added to automatic Codex response items when `codexResponsesAsItems` is true." }), Schema.Null])), "codexResponsesAsItems": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Sends automatic Codex responses as realtime conversation items instead of handoff appends." }), Schema.Null])), "delegationAckFiller": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Controls whether a realtime V3 delegation produces an acknowledgement filler. Omitted values preserve the Realtime API's default behavior." }), Schema.Null])), "flushTranscriptTailOnSessionEnd": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Routes any transcript tail remaining at session end through Codex. Defaults to false. TODO: Remove this rollout knob once transcript-tail flushing is always enabled." }), Schema.Null])), "includeStartupContext": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Set to false to start without Codex's startup context. Omitted or null includes it." }), Schema.Null])), "initialItems": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadRealtimeStartParams__ThreadRealtimeInitialItem).annotate({ "description": "Adds complete role-bearing text items to the initial Frameless Bidi session history. This is only supported by realtime V3 and is sent during session startup. Requests are limited to 128 items and 8,192 estimated text tokens in total." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Overrides the configured realtime model for this session only." }), Schema.Null])), "outputModality": Schema.Literals(["text", "audio"]).annotate({ "description": "Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits." }), "prompt": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "realtimeEndInstructions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Developer instructions given to the backing Codex model when this realtime session ends." }), Schema.Null])), "realtimeSessionId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "realtimeStartInstructions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Developer instructions given to the backing Codex model when this realtime session starts." }), Schema.Null])), "threadId": Schema.String, "transport": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__ThreadRealtimeStartTransport, Schema.Null])), "version": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__RealtimeConversationVersion, Schema.Null]).annotate({ "description": "Overrides the configured realtime protocol version for this session only." })), "voice": Schema.optionalKey(Schema.Union([V2ThreadRealtimeStartParams__RealtimeVoice, Schema.Null])) }).annotate({ "title": "ThreadRealtimeStartParams", "description": "EXPERIMENTAL - start a thread-scoped realtime session." }) export type V2ThreadRealtimeStartParams__RealtimeOutputModality = "text" | "audio" export const V2ThreadRealtimeStartParams__RealtimeOutputModality = Schema.Literals(["text", "audio"]) @@ -6163,7 +7318,7 @@ export type V2ThreadResumeParams = { readonly "approvalPolicy"?: V2ThreadResumeP export const V2ThreadResumeParams = Schema.Struct({ "approvalPolicy": Schema.optionalKey(Schema.Union([V2ThreadResumeParams__AskForApproval, Schema.Null])), "approvalsReviewer": Schema.optionalKey(Schema.Union([V2ThreadResumeParams__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.Json), Schema.Null])), "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "developerInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "excludeTurns": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, return only thread metadata and live-resume state without populating `thread.turns`. This is useful when the client plans to call `thread/turns/list` immediately after resuming." })), "history": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadResumeParams__ResponseItem).annotate({ "description": "[UNSTABLE] FOR CODEX CLOUD - DO NOT USE. If specified, the thread will be resumed with the provided history instead of loaded from disk." }), Schema.Null])), "initialTurnsPage": Schema.optionalKey(Schema.Union([V2ThreadResumeParams__ThreadResumeInitialTurnsPageParams, Schema.Null]).annotate({ "description": "When present, include a `thread/turns/list` page in the resume response so clients can bootstrap recent turns without a second request." })), "model": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Configuration overrides for the resumed thread, if any." }), Schema.Null])), "modelProvider": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "path": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "[UNSTABLE] Specify the rollout path to resume from. If specified for a non-running thread, the thread_id param will be ignored. If thread_id identifies a running thread, the path must match the active rollout path." }), Schema.Null])), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Named profile id for the resumed thread. Cannot be combined with `sandbox`." }), Schema.Null])), "personality": Schema.optionalKey(Schema.Union([V2ThreadResumeParams__Personality, Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadResumeParams__AbsolutePathBuf).annotate({ "description": "Replace the thread's runtime workspace roots. Paths must be absolute." }), Schema.Null])), "sandbox": Schema.optionalKey(Schema.Union([V2ThreadResumeParams__SandboxMode, Schema.Null])), "serviceTier": Schema.optionalKey(Schema.Union([Schema.String, 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 V2ThreadResumeResponse = { readonly "activePermissionProfile"?: V2ThreadResumeResponse__ActivePermissionProfile | null, readonly "approvalPolicy": V2ThreadResumeResponse__AskForApproval, readonly "approvalsReviewer": "user" | "auto_review" | "guardian_subagent", readonly "cwd": V2ThreadResumeResponse__AbsolutePathBuf, readonly "initialTurnsPage"?: V2ThreadResumeResponse__TurnsPage | null, readonly "instructionSources"?: ReadonlyArray, readonly "itemsBackwardsCursor"?: string | null, readonly "model": string, readonly "modelProvider": string, readonly "multiAgentMode"?: "explicitRequestOnly" | "proactive" | { readonly "custom": string }, readonly "reasoningEffort"?: V2ThreadResumeResponse__ReasoningEffort | null, readonly "runtimeWorkspaceRoots"?: ReadonlyArray, 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 "thread": V2ThreadResumeResponse__Thread, readonly "turnsBackwardsCursor"?: string | null } -export const V2ThreadResumeResponse = Schema.Struct({ "activePermissionProfile": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ActivePermissionProfile, Schema.Null]).annotate({ "description": "Named or implicit built-in profile that produced the active permissions, when known." })), "approvalPolicy": V2ThreadResumeResponse__AskForApproval, "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." }), "cwd": V2ThreadResumeResponse__AbsolutePathBuf, "initialTurnsPage": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__TurnsPage, Schema.Null]).annotate({ "description": "`thread/turns/list` page returned when requested by `initialTurnsPage`." })), "instructionSources": Schema.optionalKey(Schema.Array(V2ThreadResumeResponse__LegacyAppPathString).annotate({ "description": "Environment-native paths to instruction source files currently loaded for this thread.", "default": [] })), "itemsBackwardsCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque head cursor for hydrating paginated items backwards.\n\nPass this as `cursor` to `thread/items/list` with `sortDirection: \"desc\"`. The first page includes the cursor's head item." }), Schema.Null])), "model": Schema.String, "modelProvider": Schema.String, "multiAgentMode": Schema.optionalKey(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.", "default": "explicitRequestOnly" })), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ "description": "Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.", "default": [] })), "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])), "thread": V2ThreadResumeResponse__Thread, "turnsBackwardsCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque head cursor for hydrating paginated turns backwards.\n\nPass this as `cursor` to `thread/turns/list` with `sortDirection: \"desc\"`. The first page includes the cursor's head turn." }), Schema.Null])) }).annotate({ "title": "ThreadResumeResponse" }) +export const V2ThreadResumeResponse = Schema.Struct({ "activePermissionProfile": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ActivePermissionProfile, Schema.Null]).annotate({ "description": "Named or implicit built-in profile that produced the active permissions, when known." })), "approvalPolicy": V2ThreadResumeResponse__AskForApproval, "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." }), "cwd": V2ThreadResumeResponse__AbsolutePathBuf, "initialTurnsPage": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__TurnsPage, Schema.Null]).annotate({ "description": "`thread/turns/list` page returned when requested by `initialTurnsPage`." })), "instructionSources": Schema.optionalKey(Schema.Array(V2ThreadResumeResponse__LegacyAppPathString).annotate({ "description": "Environment-native paths to instruction source files currently loaded for this thread.", "default": [] })), "itemsBackwardsCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor for hydrating paginated items backwards.\n\nPass this as `cursor` to `thread/items/list` with `sortDirection: \"desc\"`. The first page includes the item identified by the cursor." }), Schema.Null])), "model": Schema.String, "modelProvider": Schema.String, "multiAgentMode": Schema.optionalKey(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.", "default": "explicitRequestOnly" })), "reasoningEffort": Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ "description": "Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.", "default": [] })), "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])), "thread": V2ThreadResumeResponse__Thread, "turnsBackwardsCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor for hydrating paginated turns backwards.\n\nPass this as `cursor` to `thread/turns/list` with `sortDirection: \"desc\"`. The first page includes the turn identified by the cursor." }), Schema.Null])) }).annotate({ "title": "ThreadResumeResponse" }) export type V2ThreadResumeResponse__ApprovalsReviewer = "user" | "auto_review" | "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." }) @@ -6201,11 +7356,47 @@ export const V2ThreadResumeResponse__ThreadStatus = Schema.Union([Schema.Struct( export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full" export const V2ThreadResumeResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]) +export type V2ThreadRevertedNotification = { readonly "threadId": string } +export const V2ThreadRevertedNotification = Schema.Struct({ "threadId": Schema.String }).annotate({ "title": "ThreadRevertedNotification" }) + +export type V2ThreadRevertParams = { readonly "beforeTurnId": string, readonly "threadId": string } +export const V2ThreadRevertParams = Schema.Struct({ "beforeTurnId": Schema.String.annotate({ "description": "Turn excluded from the replacement history, together with every later turn." }), "threadId": Schema.String }).annotate({ "title": "ThreadRevertParams", "description": "Replace a paginated thread's durable history with the prefix before one turn.\n\nThis only changes persisted conversation history. It does not revert local file changes." }) + +export type V2ThreadRevertResponse = { readonly "itemsBackwardsCursor"?: string | null, readonly "thread": { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadRevertResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadRevertResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadRevertResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRevertResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadRevertResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number }, readonly "turnsBackwardsCursor"?: string | null } +export const V2ThreadRevertResponse = Schema.Struct({ "itemsBackwardsCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor for hydrating paginated items backwards.\n\nPass this as `cursor` to `thread/items/list` with `sortDirection: \"desc\"`. The first page includes the item identified by the cursor." }), Schema.Null])), "thread": Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRevertResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRevertResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { mode: "oneOf" }).annotate({ "description": "Current runtime status for the thread." }), "threadSource": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadSource, Schema.Null]).annotate({ "description": "Optional analytics source classification for this thread." })), "turns": Schema.Array(V2ThreadRevertResponse__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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }).annotate({ "description": "Updated loaded thread metadata. `turns` is always empty; hydrate retained history through `thread/turns/list`." }), "turnsBackwardsCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor for hydrating paginated turns backwards.\n\nPass this as `cursor` to `thread/turns/list` with `sortDirection: \"desc\"`. The first page includes the turn identified by the cursor." }), Schema.Null])) }).annotate({ "title": "ThreadRevertResponse" }) + +export type V2ThreadRevertResponse__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadRevertResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadRevertResponse__CollabAgentTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents" +export const V2ThreadRevertResponse__CollabAgentTool = Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]) + +export type V2ThreadRevertResponse__CollabAgentToolCallStatus = "inProgress" | "completed" | "failed" | "interrupted" +export const V2ThreadRevertResponse__CollabAgentToolCallStatus = Schema.Literals(["inProgress", "completed", "failed", "interrupted"]) + +export type V2ThreadRevertResponse__CommandExecutionSource = "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction" +export const V2ThreadRevertResponse__CommandExecutionSource = Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]) + +export type V2ThreadRevertResponse__SessionSource = "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRevertResponse__SubAgentSource } +export const V2ThreadRevertResponse__SessionSource = Schema.Union([Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRevertResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadRevertResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadRevertResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadRevertResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRevertResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadRevertResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadRevertResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRevertResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRevertResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { mode: "oneOf" }).annotate({ "description": "Current runtime status for the thread." }), "threadSource": Schema.optionalKey(Schema.Union([V2ThreadRevertResponse__ThreadSource, Schema.Null]).annotate({ "description": "Optional analytics source classification for this thread." })), "turns": Schema.Array(V2ThreadRevertResponse__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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) + +export type V2ThreadRevertResponse__ThreadHistoryMode = "legacy" | "paginated" +export const V2ThreadRevertResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]) + +export type V2ThreadRevertResponse__ThreadStatus = { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" } +export const V2ThreadRevertResponse__ThreadStatus = Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRevertResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { mode: "oneOf" }) + +export type V2ThreadRevertResponse__TurnItemsView = "notLoaded" | "summary" | "full" +export const V2ThreadRevertResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]) + export type V2ThreadRollbackParams = { readonly "numTurns": number, readonly "threadId": string } export const V2ThreadRollbackParams = Schema.Struct({ "numTurns": Schema.Number.annotate({ "description": "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "threadId": Schema.String }).annotate({ "title": "ThreadRollbackParams", "description": "DEPRECATED: `thread/rollback` will be removed soon." }) -export type V2ThreadRollbackResponse = { readonly "thread": { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadRollbackResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadRollbackResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRollbackResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadRollbackResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } } -export const V2ThreadRollbackResponse = Schema.Struct({ "thread": Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRollbackResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }).annotate({ "description": "The updated thread after applying the rollback, with `turns` populated.\n\nThe ThreadItems stored in each Turn are lossy since we explicitly do not persist all agent interactions, such as command executions. This is the same behavior as `thread/resume`." }) }).annotate({ "title": "ThreadRollbackResponse" }) +export type V2ThreadRollbackResponse = { readonly "thread": { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadRollbackResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadRollbackResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadRollbackResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRollbackResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadRollbackResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } } +export const V2ThreadRollbackResponse = Schema.Struct({ "thread": Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRollbackResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }).annotate({ "description": "The updated thread after applying the rollback, with `turns` populated.\n\nThe ThreadItems stored in each Turn are lossy since we explicitly do not persist all agent interactions, such as command executions. This is the same behavior as `thread/resume`." }) }).annotate({ "title": "ThreadRollbackResponse" }) export type V2ThreadRollbackResponse__ByteRange = { readonly "end": number, readonly "start": number } export const V2ThreadRollbackResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) @@ -6222,8 +7413,8 @@ export const V2ThreadRollbackResponse__CommandExecutionSource = Schema.Literals( export type V2ThreadRollbackResponse__SessionSource = "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRollbackResponse__SubAgentSource } export const V2ThreadRollbackResponse__SessionSource = Schema.Union([Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRollbackResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }) -export type V2ThreadRollbackResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadRollbackResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadRollbackResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "isPinned"?: boolean, 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" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRollbackResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadRollbackResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } -export const V2ThreadRollbackResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "isPinned": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Whether the thread has been pinned by the user.", "default": false })), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRollbackResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) +export type V2ThreadRollbackResponse__Thread = { readonly "agentNickname"?: string | null, readonly "agentRole"?: string | null, readonly "canAcceptDirectInput"?: boolean | null, readonly "cliVersion": string, readonly "createdAt": number, readonly "cwd": string, readonly "ephemeral": boolean, readonly "extra"?: V2ThreadRollbackResponse__ThreadExtra | null, readonly "forkedFromId"?: string | null, readonly "gitInfo"?: V2ThreadRollbackResponse__GitInfo | null, readonly "historyMode"?: "legacy" | "paginated", readonly "id": string, readonly "modelProvider": string, readonly "name"?: string | null, readonly "parentThreadId"?: string | null, readonly "path"?: string | null, readonly "preview": string, readonly "projectId": string | null, readonly "recencyAt"?: number | null, readonly "section"?: V2ThreadRollbackResponse__ThreadSection | null, readonly "sectionEnteredAt"?: number | null, readonly "sessionId": string, readonly "source": "cli" | "vscode" | "exec" | "appServer" | "unknown" | { readonly "custom": string } | { readonly "subAgent": V2ThreadRollbackResponse__SubAgentSource }, readonly "status": { readonly "type": "notLoaded" } | { readonly "type": "idle" } | { readonly "type": "systemError" } | { readonly "activeFlags": ReadonlyArray, readonly "type": "active" }, readonly "threadSource"?: V2ThreadRollbackResponse__ThreadSource | null, readonly "turns": ReadonlyArray, readonly "updatedAt": number } +export const V2ThreadRollbackResponse__Thread = Schema.Struct({ "agentNickname": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "agentRole": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent." }), Schema.Null])), "canAcceptDirectInput": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread." }), Schema.Null])), "cliVersion": Schema.String.annotate({ "description": "Version of the CLI that created the thread." }), "createdAt": Schema.Number.annotate({ "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." }), "ephemeral": Schema.Boolean.annotate({ "description": "Whether the thread is ephemeral and should not be materialized on disk." }), "extra": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadExtra, Schema.Null]).annotate({ "description": "Optional implementation-specific thread data." })), "forkedFromId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Source thread id when this thread was created by forking another thread." }), Schema.Null])), "gitInfo": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({ "description": "Optional Git metadata captured when the thread was created." })), "historyMode": Schema.optionalKey(Schema.Literals(["legacy", "paginated"]).annotate({ "description": "Persisted thread history contract selected when this thread was created.", "default": "legacy" })), "id": Schema.String.annotate({ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7." }), "modelProvider": Schema.String.annotate({ "description": "Model provider used for this thread (for example, 'openai')." }), "name": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional user-facing thread title." }), 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." }), Schema.Null])), "preview": Schema.String.annotate({ "description": "Usually the first user message in the thread, if available." }), "projectId": Schema.Union([Schema.String.annotate({ "description": "Canonical project assignment owned by app-server, if any." }), Schema.Null]), "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])), "section": Schema.optionalKey(Schema.Union([V2ThreadRollbackResponse__ThreadSection, Schema.Null]).annotate({ "description": "The independently persisted section selected for this thread, if any." })), "sectionEnteredAt": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Unix timestamp in seconds when the thread entered its current section.", "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"]), Schema.Struct({ "custom": Schema.String }).annotate({ "title": "CustomSessionSource" }), Schema.Struct({ "subAgent": V2ThreadRollbackResponse__SubAgentSource }).annotate({ "title": "SubAgentSessionSource" })], { mode: "oneOf" }).annotate({ "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." }), "status": Schema.Union([Schema.Struct({ "type": Schema.Literal("notLoaded").annotate({ "title": "NotLoadedThreadStatusType" }) }).annotate({ "title": "NotLoadedThreadStatus" }), Schema.Struct({ "type": Schema.Literal("idle").annotate({ "title": "IdleThreadStatusType" }) }).annotate({ "title": "IdleThreadStatus" }), Schema.Struct({ "type": Schema.Literal("systemError").annotate({ "title": "SystemErrorThreadStatusType" }) }).annotate({ "title": "SystemErrorThreadStatus" }), Schema.Struct({ "activeFlags": Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag), "type": Schema.Literal("active").annotate({ "title": "ActiveThreadStatusType" }) }).annotate({ "title": "ActiveThreadStatus" })], { 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." }), "updatedAt": Schema.Number.annotate({ "description": "Unix timestamp (in seconds) when the thread was last updated.", "format": "int64" }).check(Schema.isInt()) }) export type V2ThreadRollbackResponse__ThreadHistoryMode = "legacy" | "paginated" export const V2ThreadRollbackResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]) @@ -6243,8 +7434,8 @@ export const V2ThreadSearchOccurrencesResponse = Schema.Struct({ "data": Schema. export type V2ThreadSearchOccurrencesResponse__ThreadSearchTextRange = { readonly "end": number, readonly "start": number } export const V2ThreadSearchOccurrencesResponse__ThreadSearchTextRange = Schema.Struct({ "end": Schema.Number.annotate({ "description": "Exclusive UTF-16 code-unit offset.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "description": "Inclusive UTF-16 code-unit offset.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }).annotate({ "description": "UTF-16 code-unit range within `snippet`." }) -export type V2ThreadSearchParams = { readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "searchTerm": string, readonly "sortDirection"?: V2ThreadSearchParams__SortDirection | null, readonly "sortKey"?: V2ThreadSearchParams__ThreadSortKey | null, readonly "sourceKinds"?: ReadonlyArray | null } -export const V2ThreadSearchParams = Schema.Struct({ "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "searchTerm": Schema.String.annotate({ "description": "Required substring/full-text query for thread search." }), "sortDirection": Schema.optionalKey(Schema.Union([V2ThreadSearchParams__SortDirection, Schema.Null]).annotate({ "description": "Optional sort direction; defaults to descending (newest first)." })), "sortKey": Schema.optionalKey(Schema.Union([V2ThreadSearchParams__ThreadSortKey, Schema.Null]).annotate({ "description": "Optional sort key; defaults to created_at." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadSearchParams__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), Schema.Null])) }).annotate({ "title": "ThreadSearchParams" }) +export type V2ThreadSearchParams = { readonly "archived"?: boolean | null, readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "searchTerm": string, readonly "sortDirection"?: V2ThreadSearchParams__SortDirection | null, readonly "sortKey"?: V2ThreadSearchParams__ThreadSearchSortKey | null, readonly "sourceKinds"?: ReadonlyArray | null } +export const V2ThreadSearchParams = Schema.Struct({ "archived": Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned." }), Schema.Null])), "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Optional page size; defaults to a reasonable server-side value.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "searchTerm": Schema.String.annotate({ "description": "Required substring/full-text query for thread search." }), "sortDirection": Schema.optionalKey(Schema.Union([V2ThreadSearchParams__SortDirection, Schema.Null]).annotate({ "description": "Optional sort direction; defaults to descending (newest first)." })), "sortKey": Schema.optionalKey(Schema.Union([V2ThreadSearchParams__ThreadSearchSortKey, Schema.Null]).annotate({ "description": "Optional sort key; defaults to created_at." })), "sourceKinds": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadSearchParams__ThreadSourceKind).annotate({ "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources." }), Schema.Null])) }).annotate({ "title": "ThreadSearchParams" }) export type V2ThreadSearchResponse = { readonly "backwardsCursor"?: string | null, readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } export const V2ThreadSearchResponse = 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(V2ThreadSearchResponse__ThreadSearchResult), "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": "ThreadSearchResponse" }) @@ -6273,6 +7464,36 @@ export const V2ThreadSearchResponse__ThreadStatus = Schema.Union([Schema.Struct( export type V2ThreadSearchResponse__TurnItemsView = "notLoaded" | "summary" | "full" export const V2ThreadSearchResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]) +export type V2ThreadSectionCreateParams = { readonly "appearance"?: V2ThreadSectionCreateParams__ThreadSectionAppearance | null, readonly "name": string } +export const V2ThreadSectionCreateParams = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadSectionCreateParams__ThreadSectionAppearance, Schema.Null])), "name": Schema.String.annotate({ "description": "The user-visible name of the section." }) }).annotate({ "title": "ThreadSectionCreateParams", "description": "Parameters for creating an independently persisted thread section." }) + +export type V2ThreadSectionCreateResponse = { readonly "section": V2ThreadSectionCreateResponse__ThreadSection } +export const V2ThreadSectionCreateResponse = Schema.Struct({ "section": V2ThreadSectionCreateResponse__ThreadSection }).annotate({ "title": "ThreadSectionCreateResponse", "description": "The independently persisted section created by the server." }) + +export type V2ThreadSectionDeleteParams = { readonly "sectionId": string } +export const V2ThreadSectionDeleteParams = Schema.Struct({ "sectionId": Schema.String.annotate({ "description": "The stable, server-generated identity of the section to delete." }) }).annotate({ "title": "ThreadSectionDeleteParams", "description": "Parameters for deleting an independently persisted thread section." }) + +export type V2ThreadSectionDeleteResponse = { } +export const V2ThreadSectionDeleteResponse = Schema.Struct({ }).annotate({ "title": "ThreadSectionDeleteResponse", "description": "Successful deletion does not return additional section data." }) + +export type V2ThreadSectionListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null } +export const V2ThreadSectionListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque pagination cursor returned by a previous call." }), Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "description": "Maximum number of sections to return.", "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])) }).annotate({ "title": "ThreadSectionListParams", "description": "Parameters for listing independently persisted thread sections." }) + +export type V2ThreadSectionListResponse = { readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } +export const V2ThreadSectionListResponse = Schema.Struct({ "data": Schema.Array(V2ThreadSectionListResponse__ThreadSection), "nextCursor": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Opaque cursor for the next page, or `null` when no sections remain." }), Schema.Null])) }).annotate({ "title": "ThreadSectionListResponse", "description": "One page of independently persisted thread sections." }) + +export type V2ThreadSectionMoveParams = { readonly "beforeThreadId"?: string | null, readonly "sectionId": string | null, readonly "threadId": string } +export const V2ThreadSectionMoveParams = Schema.Struct({ "beforeThreadId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Existing thread to insert before; omission or null appends to the section." }), Schema.Null])), "sectionId": Schema.Union([Schema.String.annotate({ "description": "Destination section, or `null` to remove the thread from its section." }), Schema.Null]), "threadId": Schema.String.annotate({ "description": "Thread to move into, within, or out of a section." }) }).annotate({ "title": "ThreadSectionMoveParams", "description": "Parameters for moving a thread within a server-owned section ordering." }) + +export type V2ThreadSectionMoveResponse = { } +export const V2ThreadSectionMoveResponse = Schema.Struct({ }).annotate({ "title": "ThreadSectionMoveResponse" }) + +export type V2ThreadSectionUpdateParams = { readonly "appearance"?: V2ThreadSectionUpdateParams__ThreadSectionAppearance | null, readonly "name": string, readonly "sectionId": string } +export const V2ThreadSectionUpdateParams = Schema.Struct({ "appearance": Schema.optionalKey(Schema.Union([V2ThreadSectionUpdateParams__ThreadSectionAppearance, Schema.Null]).annotate({ "description": "Omit to preserve appearance, use `null` to clear it, or provide a replacement." })), "name": Schema.String.annotate({ "description": "The updated user-visible name of the section." }), "sectionId": Schema.String.annotate({ "description": "The stable, server-generated identity of the section to update." }) }).annotate({ "title": "ThreadSectionUpdateParams", "description": "Parameters for updating an independently persisted thread section." }) + +export type V2ThreadSectionUpdateResponse = { readonly "section": V2ThreadSectionUpdateResponse__ThreadSection } +export const V2ThreadSectionUpdateResponse = Schema.Struct({ "section": V2ThreadSectionUpdateResponse__ThreadSection }).annotate({ "title": "ThreadSectionUpdateResponse", "description": "The independently persisted section after its name is updated." }) + export type V2ThreadSetNameParams = { readonly "name": string, readonly "threadId": string } export const V2ThreadSetNameParams = Schema.Struct({ "name": Schema.String, "threadId": Schema.String }).annotate({ "title": "ThreadSetNameParams" }) @@ -6330,8 +7551,8 @@ export const V2ThreadStartedNotification__ThreadStatus = Schema.Union([Schema.St export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full" export const V2ThreadStartedNotification__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]) -export type V2ThreadStartParams = { readonly "allowProviderModelFallback"?: boolean, readonly "approvalPolicy"?: V2ThreadStartParams__AskForApproval | null, readonly "approvalsReviewer"?: V2ThreadStartParams__ApprovalsReviewer | null, readonly "baseInstructions"?: string | null, readonly "config"?: { readonly [x: string]: Schema.Json } | null, readonly "cwd"?: string | null, readonly "developerInstructions"?: string | null, readonly "dynamicTools"?: ReadonlyArray | null, readonly "environments"?: ReadonlyArray | null, readonly "ephemeral"?: boolean | null, readonly "experimentalRawEvents"?: boolean, readonly "historyMode"?: V2ThreadStartParams__ThreadHistoryMode | null, readonly "mockExperimentalField"?: string | null, readonly "model"?: string | null, readonly "modelProvider"?: string | null, readonly "multiAgentMode"?: V2ThreadStartParams__MultiAgentMode | null, readonly "permissions"?: string | null, readonly "personality"?: V2ThreadStartParams__Personality | null, readonly "runtimeWorkspaceRoots"?: ReadonlyArray | null, readonly "sandbox"?: V2ThreadStartParams__SandboxMode | null, readonly "selectedCapabilityRoots"?: ReadonlyArray | null, readonly "serviceName"?: string | null, readonly "serviceTier"?: string | null, readonly "sessionStartSource"?: V2ThreadStartParams__ThreadStartSource | null, readonly "threadSource"?: V2ThreadStartParams__ThreadSource | null } -export const V2ThreadStartParams = Schema.Struct({ "allowProviderModelFallback": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default." })), "approvalPolicy": Schema.optionalKey(Schema.Union([V2ThreadStartParams__AskForApproval, Schema.Null])), "approvalsReviewer": Schema.optionalKey(Schema.Union([V2ThreadStartParams__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.Json), Schema.Null])), "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "developerInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "dynamicTools": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__DynamicToolSpec), Schema.Null])), "environments": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__TurnEnvironmentParams).annotate({ "description": "Optional sticky environments for this thread.\n\nOmitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment." }), Schema.Null])), "ephemeral": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "experimentalRawEvents": Schema.optionalKey(Schema.Boolean.annotate({ "description": "If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud)." })), "historyMode": Schema.optionalKey(Schema.Union([V2ThreadStartParams__ThreadHistoryMode, Schema.Null]).annotate({ "description": "Persisted thread history contract to use for this new thread." })), "mockExperimentalField": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "modelProvider": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "multiAgentMode": Schema.optionalKey(Schema.Union([V2ThreadStartParams__MultiAgentMode, Schema.Null]).annotate({ "description": "@deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior." })), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Named profile id for this thread. Cannot be combined with `sandbox`." }), Schema.Null])), "personality": Schema.optionalKey(Schema.Union([V2ThreadStartParams__Personality, Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__AbsolutePathBuf).annotate({ "description": "Replace the thread's runtime workspace roots. Paths must be absolute." }), Schema.Null])), "sandbox": Schema.optionalKey(Schema.Union([V2ThreadStartParams__SandboxMode, Schema.Null])), "selectedCapabilityRoots": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__SelectedCapabilityRoot).annotate({ "description": "Capability roots selected for this thread by the hosting platform." }), Schema.Null])), "serviceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "serviceTier": Schema.optionalKey(Schema.Union([Schema.String, 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 = { readonly "allowProviderModelFallback"?: boolean, readonly "approvalPolicy"?: V2ThreadStartParams__AskForApproval | null, readonly "approvalsReviewer"?: V2ThreadStartParams__ApprovalsReviewer | null, readonly "baseInstructions"?: string | null, readonly "config"?: { readonly [x: string]: Schema.Json } | null, readonly "cwd"?: string | null, readonly "developerInstructions"?: string | null, readonly "dynamicTools"?: ReadonlyArray | null, readonly "environments"?: ReadonlyArray | null, readonly "ephemeral"?: boolean | null, readonly "experimentalRawEvents"?: boolean, readonly "historyMode"?: V2ThreadStartParams__ThreadHistoryMode | null, readonly "mockExperimentalField"?: string | null, readonly "model"?: string | null, readonly "modelProvider"?: string | null, readonly "multiAgentMode"?: V2ThreadStartParams__MultiAgentMode | null, readonly "permissions"?: string | null, readonly "personality"?: V2ThreadStartParams__Personality | null, readonly "projectId"?: string | null, readonly "runtimeWorkspaceRoots"?: ReadonlyArray | null, readonly "sandbox"?: V2ThreadStartParams__SandboxMode | null, readonly "selectedCapabilityRoots"?: ReadonlyArray | null, readonly "serviceName"?: string | null, readonly "serviceTier"?: string | null, readonly "sessionStartSource"?: V2ThreadStartParams__ThreadStartSource | null, readonly "threadSource"?: V2ThreadStartParams__ThreadSource | null } +export const V2ThreadStartParams = Schema.Struct({ "allowProviderModelFallback": Schema.optionalKey(Schema.Boolean.annotate({ "description": "Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default." })), "approvalPolicy": Schema.optionalKey(Schema.Union([V2ThreadStartParams__AskForApproval, Schema.Null])), "approvalsReviewer": Schema.optionalKey(Schema.Union([V2ThreadStartParams__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.Json), Schema.Null])), "cwd": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "developerInstructions": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "dynamicTools": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__DynamicToolSpec), Schema.Null])), "environments": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__TurnEnvironmentParams).annotate({ "description": "Optional sticky environments for this thread.\n\nOmitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment." }), Schema.Null])), "ephemeral": Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), "experimentalRawEvents": Schema.optionalKey(Schema.Boolean.annotate({ "description": "If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud)." })), "historyMode": Schema.optionalKey(Schema.Union([V2ThreadStartParams__ThreadHistoryMode, Schema.Null]).annotate({ "description": "Persisted thread history contract to use for this new thread." })), "mockExperimentalField": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way." }), Schema.Null])), "model": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "modelProvider": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "multiAgentMode": Schema.optionalKey(Schema.Union([V2ThreadStartParams__MultiAgentMode, Schema.Null]).annotate({ "description": "@deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior." })), "permissions": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Named profile id for this thread. Cannot be combined with `sandbox`." }), Schema.Null])), "personality": Schema.optionalKey(Schema.Union([V2ThreadStartParams__Personality, Schema.Null])), "projectId": Schema.optionalKey(Schema.Union([Schema.String.annotate({ "description": "Optional project identity for this new thread. Durable threads persist the assignment; ephemeral threads expose it only in live responses." }), Schema.Null])), "runtimeWorkspaceRoots": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__AbsolutePathBuf).annotate({ "description": "Replace the thread's runtime workspace roots. Paths must be absolute." }), Schema.Null])), "sandbox": Schema.optionalKey(Schema.Union([V2ThreadStartParams__SandboxMode, Schema.Null])), "selectedCapabilityRoots": Schema.optionalKey(Schema.Union([Schema.Array(V2ThreadStartParams__SelectedCapabilityRoot).annotate({ "description": "Capability roots selected for this thread by the hosting platform." }), Schema.Null])), "serviceName": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "serviceTier": Schema.optionalKey(Schema.Union([Schema.String, 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__CapabilityRootLocation = { readonly "environmentId": string, readonly "path": string, readonly "type": "environment" } 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." }) @@ -6378,6 +7599,24 @@ export const V2ThreadStartResponse__TurnItemsView = Schema.Literals(["notLoaded" export type V2ThreadStatusChangedNotification = { readonly "status": V2ThreadStatusChangedNotification__ThreadStatus, readonly "threadId": string } export const V2ThreadStatusChangedNotification = Schema.Struct({ "status": V2ThreadStatusChangedNotification__ThreadStatus, "threadId": Schema.String }).annotate({ "title": "ThreadStatusChangedNotification" }) +export type V2ThreadTimelineListParams = { readonly "cursor"?: string | null, readonly "limit"?: number | null, readonly "threadId": string } +export const V2ThreadTimelineListParams = Schema.Struct({ "cursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "limit": Schema.optionalKey(Schema.Union([Schema.Number.annotate({ "format": "uint32" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), Schema.Null])), "threadId": Schema.String }).annotate({ "title": "ThreadTimelineListParams", "description": "EXPERIMENTAL - list ordinary and realtime thread history in rollout order." }) + +export type V2ThreadTimelineListResponse = { readonly "activeRealtimeSessionAtPageStart"?: string | null, readonly "data": ReadonlyArray, readonly "nextCursor"?: string | null } +export const V2ThreadTimelineListResponse = Schema.Struct({ "activeRealtimeSessionAtPageStart": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "data": Schema.Array(V2ThreadTimelineListResponse__ThreadTimelineEntry), "nextCursor": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }).annotate({ "title": "ThreadTimelineListResponse", "description": "EXPERIMENTAL - a bounded timeline page with its resolved opening voice state." }) + +export type V2ThreadTimelineListResponse__ByteRange = { readonly "end": number, readonly "start": number } +export const V2ThreadTimelineListResponse__ByteRange = Schema.Struct({ "end": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)), "start": Schema.Number.annotate({ "format": "uint" }).check(Schema.isInt()).check(Schema.isGreaterThanOrEqualTo(0)) }) + +export type V2ThreadTimelineListResponse__CollabAgentTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent" | "sendMessage" | "followupTask" | "interruptAgent" | "listAgents" +export const V2ThreadTimelineListResponse__CollabAgentTool = Schema.Literals(["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent", "sendMessage", "followupTask", "interruptAgent", "listAgents"]) + +export type V2ThreadTimelineListResponse__CollabAgentToolCallStatus = "inProgress" | "completed" | "failed" | "interrupted" +export const V2ThreadTimelineListResponse__CollabAgentToolCallStatus = Schema.Literals(["inProgress", "completed", "failed", "interrupted"]) + +export type V2ThreadTimelineListResponse__CommandExecutionSource = "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction" +export const V2ThreadTimelineListResponse__CommandExecutionSource = Schema.Literals(["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"]) + export type V2ThreadTokenUsageUpdatedNotification = { readonly "threadId": string, readonly "tokenUsage": V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage, readonly "turnId": string } export const V2ThreadTokenUsageUpdatedNotification = Schema.Struct({ "threadId": Schema.String, "tokenUsage": V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage, "turnId": Schema.String }).annotate({ "title": "ThreadTokenUsageUpdatedNotification" }) diff --git a/packages/effect-codex-app-server/src/client.test.ts b/packages/effect-codex-app-server/src/client.test.ts index 3e58a1dd3..8a217609e 100644 --- a/packages/effect-codex-app-server/src/client.test.ts +++ b/packages/effect-codex-app-server/src/client.test.ts @@ -100,6 +100,7 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => { itemId: "item-approval-1", threadId: "thread-1", turnId: "turn-1", + isBlocking: true, questions: [ { id: "approved", diff --git a/packages/effect-codex-app-server/src/schema.test.ts b/packages/effect-codex-app-server/src/schema.test.ts index 26bc3963a..516b15d80 100644 --- a/packages/effect-codex-app-server/src/schema.test.ts +++ b/packages/effect-codex-app-server/src/schema.test.ts @@ -47,6 +47,7 @@ it("accepts Codex 0.150 multi-agent values", () => { id: "root-thread", modelProvider: "openai", preview: "", + projectId: null, sessionId: "session-1", source: "cli", status: { type: "idle" }, 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 f04f43dd7..b17b80cda 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 @@ -83,6 +83,7 @@ const handleMethod = (message: Record) => { itemId: "item-approval-1", threadId: "thread-1", turnId: "turn-1", + isBlocking: true, questions: [ { id: "approved", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bf27996e..1ef7cf9c0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,8 +7,8 @@ settings: catalogs: default: '@anthropic-ai/claude-agent-sdk': - specifier: ^0.3.238 - version: 0.3.238 + specifier: ^0.3.247 + version: 0.3.247 '@anthropic-ai/sdk': specifier: ^0.120.0 version: 0.120.0 @@ -136,7 +136,7 @@ importers: devDependencies: '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -210,7 +210,7 @@ importers: dependencies: '@anthropic-ai/claude-agent-sdk': specifier: 'catalog:' - version: 0.3.238(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + version: 0.3.247(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) '@anthropic-ai/sdk': specifier: 'catalog:' version: 0.120.0(zod@4.4.3) @@ -241,7 +241,7 @@ importers: devDependencies: '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@threadlines/contracts': specifier: workspace:* version: link:../../packages/contracts @@ -435,7 +435,7 @@ importers: devDependencies: '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) oxlint: specifier: ^1.79.0 version: 1.80.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) @@ -485,7 +485,7 @@ importers: devDependencies: '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) typescript: specifier: 'catalog:' version: 7.0.2 @@ -513,7 +513,7 @@ importers: version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -544,7 +544,7 @@ importers: version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -578,7 +578,7 @@ importers: version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -612,7 +612,7 @@ importers: version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -640,7 +640,7 @@ importers: devDependencies: '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -661,7 +661,7 @@ importers: dependencies: '@anthropic-ai/claude-agent-sdk': specifier: 'catalog:' - version: 0.3.238(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + version: 0.3.247(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) '@anthropic-ai/sdk': specifier: 'catalog:' version: 0.120.0(zod@4.4.3) @@ -686,7 +686,7 @@ importers: devDependencies: '@effect/vitest': specifier: 4.0.0-beta.97 - version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) + version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))) typescript: specifier: 'catalog:' version: 7.0.2 @@ -702,48 +702,48 @@ importers: packages: - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.238': - resolution: {integrity: sha512-7KctNItTzHRiDg+jFxTM46o+Y/YS52V6HSopaWPggO6BbR+3MV/rKMmq+zP93If7eVwadW9Yg9vHLjXDKIw9OQ==} + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.247': + resolution: {integrity: sha512-vvCMAXy2KmiGHbJuThv+W6a+49qjofMR6S71FM8FTbkAAKg62cYcEyzVMVM3pNpBM5PtkMe8lRCqKnT9NUo6ng==} cpu: [arm64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.238': - resolution: {integrity: sha512-aDt8LXjWISwLzqeCBHxJC5AR1iVYlY5UYIm2VLztjI1U0PCb1BiH/IfyyjjizqRhhEwyQp9YAJeZZq8n/2vQEA==} + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.247': + resolution: {integrity: sha512-742ZXrdAxHvw+vzMFJMMvfbH8mWWCBajQH27BT+3fQU3Frjqu9gXKvA63dvQgxwjqO1gYU9TSy/A6PKq7zujaQ==} cpu: [x64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.238': - resolution: {integrity: sha512-ankSEMAMTVulKYg0NT8fZ7a5+q+aIzfiqhcrLe9zYPeuhE+lpNeq0JPMcHyOtUAENxVI0/2J2q5OXGl9O0qWcg==} + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.247': + resolution: {integrity: sha512-8UNRQcSy9lpLhknXryid5cTfxHxBZft4oK5R0XIIZUXY/tXvsNP3+kVYAHQUNyc1J8IDa15sd19iKkMJMqFodA==} cpu: [arm64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.238': - resolution: {integrity: sha512-P7V9TFokcNRdIJPUzDQ0GLBfMuoewWEH4rh6U3e7RaEAxzdeUcdS9P0N4arXqK2YAOtK1o93QSEtiGUF1fTfWw==} + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.247': + resolution: {integrity: sha512-5/3ZQ9vOwrLv6w0CFjdbaTxPFyabHNLAEojkeiYmKzqlZ/taXG58/kVKgjqgx2qQhjcHCzy9JXDw5kp3RKJoGw==} cpu: [arm64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.238': - resolution: {integrity: sha512-buo3IBSd7EmYcQsH+OKARgNNbSF1+l/+z1hDXSXGKzwD1LFioJZ/k9FWWWC166SoQ93jPmN+G/ksTzEUB3zRGQ==} + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.247': + resolution: {integrity: sha512-iMLjkVHbcxQ5WY2WwieOJK57kD4c8Cc2tpHwpEmdTDsnWLfmNt3XFuJdmeROwyra+tcVA52oHL0dWr51+V50Pg==} cpu: [x64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.238': - resolution: {integrity: sha512-/arAOSqtIAWDu7Z4Uf2Un3n+/5Zg3NpxZKzMQEDnYNkbJRhr44sM59TFaEOiWq1FqlUJKi6wHjgm+TW5B8DWWg==} + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.247': + resolution: {integrity: sha512-+tEIHgblLvBF+datSZb9WwnODXsFI7JxSFvm++oliH0eQO5zGDq0LD0hbY6h/A3nqODnBbIwVVBykwXMn68GPg==} cpu: [x64] os: [linux] - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.238': - resolution: {integrity: sha512-yW8lhV7QgYiNu3NatjgmkhUspgJsG2N2N6lmm/7B99sWFobKTbVLMLsXxj6A46R6qE2C4Zzm6PjxgGaMYOMn0g==} + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.247': + resolution: {integrity: sha512-Sni6U2xR55bUEJRv7Eikm6oC27IOn3rlVJZAzXRFCAgkf9+aBqq/dEUJiIcRT2xbXOIe5QdPGUmpnYfU1BsHMw==} cpu: [arm64] os: [win32] - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.238': - resolution: {integrity: sha512-6Fb2JRrBci282fBfhCGB0Tpq7N8V5HMMqsO3YGFkc9hhbn/y9G7glNKSNgRtxD5Ujjxj8rhiaYstXW2DJzanzw==} + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.247': + resolution: {integrity: sha512-yWfZo2ER3EIS/3pv6EX1M/VrZXu+zFzKhgWJjGgFSlcupbaCAxrVBRTdCyfv5UYBKWH9kl5HjgV2HhLHq67LSw==} cpu: [x64] os: [win32] - '@anthropic-ai/claude-agent-sdk@0.3.238': - resolution: {integrity: sha512-ppRfbAflZuV7HPqr8BkHPEk8c7gih3PK+GHnZq6zP0Uo7bJHXAJwc4Za8LJRm4hXMixBNMjK1cU/VWfQ9fE2sg==} + '@anthropic-ai/claude-agent-sdk@0.3.247': + resolution: {integrity: sha512-T9BDPloZxABkGREDRbWA7TVa9SLBMWI5GQXw39+XotQLCIX3McRic9OJdUnAdXa7sutwQ4nNrXwTSazN4IphjA==} engines: {node: '>=18.0.0'} peerDependencies: '@anthropic-ai/sdk': '>=0.93.0' @@ -4488,8 +4488,8 @@ packages: headers-polyfill@5.0.1: resolution: {integrity: sha512-1TJ6Fih/b8h5TIcv+1+Hw0PDQWJTKDKzFZzcKOiW1wJza3XoAQlkCuXLbymPYB8+ZQyw8mHvdw560e8zVFIWyA==} - hono@4.13.3: - resolution: {integrity: sha512-r8AO2mYHoLxSHkgafNeC/BXyb2vWRxD3jem4Ts+ptav8oTG5FIRifAjuJEmZI4bSvvc2ns0GxmIYiZnHqN3mMw==} + hono@4.13.5: + resolution: {integrity: sha512-O6+/eCYRkzzzy0rPWwKLiGBR1nFuUPZynnwjxN1MBA62NNqbT0wQEzQyK2gSO5yDIDB336sXQleAhOHrzlYyKw==} engines: {node: '>=16.9.0'} hosted-git-info@4.1.0: @@ -4629,8 +4629,8 @@ packages: resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true - jose@6.2.9: - resolution: {integrity: sha512-XrchZOFZUl/T3vTwRe8XK+cJrGtMF4th1ARnDfwbBXFKThGhlsxEE4Zu03AD/bjJSt/9jT/mxrOCkJWOg77aPA==} + jose@6.2.10: + resolution: {integrity: sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g==} js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -6494,44 +6494,44 @@ packages: snapshots: - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.238': + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.238': + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.238': + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.238': + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk@0.3.238(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': + '@anthropic-ai/claude-agent-sdk@0.3.247(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': dependencies: '@anthropic-ai/sdk': 0.120.0(zod@4.4.3) '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) zod: 4.4.3 optionalDependencies: - '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.238 - '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.238 + '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.247 + '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.247 '@anthropic-ai/sdk@0.120.0(zod@4.4.3)': dependencies: @@ -6984,7 +6984,7 @@ snapshots: '@effect/tsgo-win32-arm64': 0.13.2 '@effect/tsgo-win32-x64': 0.13.2 - '@effect/vitest@4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)': + '@effect/vitest@4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)))': dependencies: effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933) vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) @@ -7358,9 +7358,9 @@ snapshots: '@github/copilot-win32-arm64': 1.0.80 '@github/copilot-win32-x64': 1.0.80 - '@hono/node-server@2.0.11(hono@4.13.3)': + '@hono/node-server@2.0.11(hono@4.13.5)': dependencies: - hono: 4.13.3 + hono: 4.13.5 '@img/colour@1.1.0': {} @@ -7822,7 +7822,7 @@ snapshots: '@modelcontextprotocol/sdk@1.29.0(zod@4.4.3)': dependencies: - '@hono/node-server': 2.0.11(hono@4.13.3) + '@hono/node-server': 2.0.11(hono@4.13.5) ajv: 8.20.0 ajv-formats: 3.0.1(ajv@8.20.0) content-type: 1.0.5 @@ -7832,8 +7832,8 @@ snapshots: eventsource-parser: 3.1.1 express: 5.2.1 express-rate-limit: 8.6.2(express@5.2.1) - hono: 4.13.3 - jose: 6.2.9 + hono: 4.13.5 + jose: 6.2.10 json-schema-typed: 8.0.2 pkce-challenge: 5.0.1 raw-body: 3.0.2 @@ -10196,7 +10196,7 @@ snapshots: '@types/set-cookie-parser': 2.4.10 set-cookie-parser: 3.1.2 - hono@4.13.3: {} + hono@4.13.5: {} hosted-git-info@4.1.0: dependencies: @@ -10317,7 +10317,7 @@ snapshots: jiti@2.7.0: {} - jose@6.2.9: {} + jose@6.2.10: {} js-tokens@4.0.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8cc4de02d..524ed4b10 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,7 +5,7 @@ packages: - scripts catalog: - "@anthropic-ai/claude-agent-sdk": ^0.3.238 + "@anthropic-ai/claude-agent-sdk": ^0.3.247 "@anthropic-ai/sdk": ^0.120.0 "@effect/atom-react": 4.0.0-beta.98 "@effect/openapi-generator": 4.0.0-beta.98