diff --git a/apps/server/src/provider/Layers/CodexAdapter.test.ts b/apps/server/src/provider/Layers/CodexAdapter.test.ts index 4df4fb5d32f..486e149166b 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.test.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.test.ts @@ -452,6 +452,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { turnId: asTurnId("turn-1"), itemId: asItemId("msg_1"), payload: { + completedAtMs: 1_778_000_000_000, threadId: "thread-1", turnId: "turn-1", item: { @@ -494,6 +495,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { turnId: asTurnId("turn-1"), itemId: asItemId("plan_1"), payload: { + completedAtMs: 1_778_000_000_000, threadId: "thread-1", turnId: "turn-1", item: { @@ -660,6 +662,40 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { }), ); + it.effect("maps realtime started notifications with upstream realtime session ids", () => + Effect.gen(function* () { + const { adapter, runtime } = yield* startLifecycleRuntime(); + const firstEventFiber = yield* Stream.runHead(adapter.streamEvents).pipe(Effect.forkChild); + + yield* runtime.emit({ + id: asEventId("evt-realtime-started"), + kind: "notification", + provider: ProviderDriverKind.make("codex"), + threadId: asThreadId("thread-1"), + createdAt: new Date().toISOString(), + method: "thread/realtime/started", + payload: { + threadId: "thread-1", + realtimeSessionId: "realtime-session-1", + version: "v2", + }, + } satisfies ProviderEvent); + + const firstEvent = yield* Fiber.join(firstEventFiber); + + assert.equal(firstEvent._tag, "Some"); + if (firstEvent._tag !== "Some") { + return; + } + assert.equal(firstEvent.value.type, "thread.realtime.started"); + if (firstEvent.value.type !== "thread.realtime.started") { + return; + } + assert.equal(firstEvent.value.threadId, "thread-1"); + assert.equal(firstEvent.value.payload.realtimeSessionId, "realtime-session-1"); + }), + ); + it.effect("maps fatal websocket stderr notifications to runtime.error", () => Effect.gen(function* () { const { adapter, runtime } = yield* startLifecycleRuntime(); diff --git a/apps/server/src/provider/Layers/CodexAdapter.ts b/apps/server/src/provider/Layers/CodexAdapter.ts index 5186dc29627..7486f2b9bb8 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.ts @@ -1151,7 +1151,7 @@ function mapToRuntimeEvents( type: "thread.realtime.started", ...runtimeEventBase(event, canonicalThreadId), payload: { - realtimeSessionId: payload.sessionId ?? undefined, + realtimeSessionId: payload.realtimeSessionId ?? undefined, }, }, ]; diff --git a/apps/server/src/provider/Layers/CodexProvider.ts b/apps/server/src/provider/Layers/CodexProvider.ts index 618103883a2..dd2c04d086b 100644 --- a/apps/server/src/provider/Layers/CodexProvider.ts +++ b/apps/server/src/provider/Layers/CodexProvider.ts @@ -45,6 +45,8 @@ const REASONING_EFFORT_LABELS: Record; type CodexThreadItem = | EffectCodexSchema.V2ThreadReadResponse["thread"]["turns"][number]["items"][number] | EffectCodexSchema.V2ThreadRollbackResponse["thread"]["turns"][number]["items"][number]; @@ -83,7 +84,7 @@ export interface CodexSessionRuntimeOptions { readonly cwd: string; readonly runtimeMode: RuntimeMode; readonly model?: string; - readonly serviceTier?: EffectCodexSchema.V2ThreadStartParams__ServiceTier | undefined; + readonly serviceTier?: CodexServiceTier | undefined; readonly resumeCursor?: CodexResumeCursor; } @@ -94,7 +95,7 @@ export interface CodexSessionRuntimeSendTurnInput { readonly url: string; }>; readonly model?: string; - readonly serviceTier?: EffectCodexSchema.V2TurnStartParams__ServiceTier | undefined; + readonly serviceTier?: CodexServiceTier | undefined; readonly effort?: EffectCodexSchema.V2TurnStartParams__ReasoningEffort | undefined; readonly interactionMode?: ProviderInteractionMode; } @@ -268,7 +269,7 @@ function buildThreadStartParams(input: { readonly cwd: string; readonly runtimeMode: RuntimeMode; readonly model: string | undefined; - readonly serviceTier: EffectCodexSchema.V2ThreadStartParams__ServiceTier | undefined; + readonly serviceTier: CodexServiceTier | undefined; }): EffectCodexSchema.V2ThreadStartParams { const config = runtimeModeToThreadConfig(input.runtimeMode); return { @@ -331,7 +332,7 @@ export function buildTurnStartParams(input: { readonly url: string; }>; readonly model?: string; - readonly serviceTier?: EffectCodexSchema.V2TurnStartParams__ServiceTier; + readonly serviceTier?: CodexServiceTier; readonly effort?: EffectCodexSchema.V2TurnStartParams__ReasoningEffort; readonly interactionMode?: ProviderInteractionMode; }): Effect.Effect< @@ -417,7 +418,7 @@ export const openCodexThread = (input: { readonly runtimeMode: RuntimeMode; readonly cwd: string; readonly requestedModel: string | undefined; - readonly serviceTier: EffectCodexSchema.V2ThreadStartParams__ServiceTier | undefined; + readonly serviceTier: CodexServiceTier | undefined; readonly resumeThreadId: string | undefined; }): Effect.Effect => { const resumeThreadId = input.resumeThreadId; diff --git a/apps/server/src/provider/Layers/ProviderRegistry.test.ts b/apps/server/src/provider/Layers/ProviderRegistry.test.ts index b599a9d1f88..862da8019b9 100644 --- a/apps/server/src/provider/Layers/ProviderRegistry.test.ts +++ b/apps/server/src/provider/Layers/ProviderRegistry.test.ts @@ -368,6 +368,26 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T }), ); + it.effect("returns an Amazon Bedrock label for codex Bedrock auth", () => + Effect.gen(function* () { + const status = yield* checkCodexProviderStatus(defaultCodexSettings, () => + Effect.succeed( + makeCodexProbeSnapshot({ + account: { + account: { type: "amazonBedrock" }, + requiresOpenaiAuth: false, + }, + }), + ), + ); + + assert.strictEqual(status.status, "ready"); + assert.strictEqual(status.auth.status, "authenticated"); + assert.strictEqual(status.auth.type, "amazonBedrock"); + assert.strictEqual(status.auth.label, "Amazon Bedrock"); + }), + ); + it.effect("returns unavailable when codex is missing", () => Effect.gen(function* () { const status = yield* checkCodexProviderStatus(defaultCodexSettings, () => diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts index 0b2eaf19b04..70318c3aae5 100644 --- a/packages/effect-codex-app-server/scripts/generate.ts +++ b/packages/effect-codex-app-server/scripts/generate.ts @@ -12,7 +12,7 @@ import { } from "effect/unstable/http"; import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; -const UPSTREAM_REF = "be75785504ff152fa6333e380a2d50642f42fba0"; +const UPSTREAM_REF = "07b695190f30a450e4921f71f77473e564395c59"; const USER_AGENT = "effect-codex-app-server-generator"; const GITHUB_API_BASE = "https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol"; 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 1afa46859ef..b6c0b00d1c2 100644 --- a/packages/effect-codex-app-server/src/_generated/meta.gen.ts +++ b/packages/effect-codex-app-server/src/_generated/meta.gen.ts @@ -1,5 +1,5 @@ // This file is generated by the effect-codex-app-server package. Do not edit manually. -// Upstream protocol ref: be75785504ff152fa6333e380a2d50642f42fba0 +// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59 import * as CodexSchema from "./schema.gen.ts"; @@ -15,21 +15,25 @@ export const CLIENT_REQUEST_METHODS = { "thread/unarchive": "thread/unarchive", "thread/compact/start": "thread/compact/start", "thread/shellCommand": "thread/shellCommand", + "thread/approveGuardianDeniedAction": "thread/approveGuardianDeniedAction", "thread/rollback": "thread/rollback", "thread/list": "thread/list", "thread/loaded/list": "thread/loaded/list", "thread/read": "thread/read", - "thread/turns/list": "thread/turns/list", "thread/inject_items": "thread/inject_items", "skills/list": "skills/list", + "hooks/list": "hooks/list", "marketplace/add": "marketplace/add", "marketplace/remove": "marketplace/remove", + "marketplace/upgrade": "marketplace/upgrade", "plugin/list": "plugin/list", "plugin/read": "plugin/read", + "plugin/skill/read": "plugin/skill/read", + "plugin/share/save": "plugin/share/save", + "plugin/share/updateTargets": "plugin/share/updateTargets", + "plugin/share/list": "plugin/share/list", + "plugin/share/delete": "plugin/share/delete", "app/list": "app/list", - "device/key/create": "device/key/create", - "device/key/public": "device/key/public", - "device/key/sign": "device/key/sign", "fs/readFile": "fs/readFile", "fs/writeFile": "fs/writeFile", "fs/createDirectory": "fs/createDirectory", @@ -47,6 +51,7 @@ export const CLIENT_REQUEST_METHODS = { "turn/interrupt": "turn/interrupt", "review/start": "review/start", "model/list": "model/list", + "modelProvider/capabilities/read": "modelProvider/capabilities/read", "experimentalFeature/list": "experimentalFeature/list", "experimentalFeature/enablement/set": "experimentalFeature/enablement/set", "mcpServer/oauth/login": "mcpServer/oauth/login", @@ -55,6 +60,7 @@ export const CLIENT_REQUEST_METHODS = { "mcpServer/resource/read": "mcpServer/resource/read", "mcpServer/tool/call": "mcpServer/tool/call", "windowsSandbox/setupStart": "windowsSandbox/setupStart", + "windowsSandbox/readiness": "windowsSandbox/readiness", "account/login/start": "account/login/start", "account/login/cancel": "account/login/cancel", "account/logout": "account/logout", @@ -103,6 +109,8 @@ export const SERVER_NOTIFICATION_METHODS = { "thread/closed": "thread/closed", "skills/changed": "skills/changed", "thread/name/updated": "thread/name/updated", + "thread/goal/updated": "thread/goal/updated", + "thread/goal/cleared": "thread/goal/cleared", "thread/tokenUsage/updated": "thread/tokenUsage/updated", "turn/started": "turn/started", "hook/started": "hook/started", @@ -118,6 +126,8 @@ export const SERVER_NOTIFICATION_METHODS = { "item/agentMessage/delta": "item/agentMessage/delta", "item/plan/delta": "item/plan/delta", "command/exec/outputDelta": "command/exec/outputDelta", + "process/outputDelta": "process/outputDelta", + "process/exited": "process/exited", "item/commandExecution/outputDelta": "item/commandExecution/outputDelta", "item/commandExecution/terminalInteraction": "item/commandExecution/terminalInteraction", "item/fileChange/outputDelta": "item/fileChange/outputDelta", @@ -129,6 +139,7 @@ export const SERVER_NOTIFICATION_METHODS = { "account/updated": "account/updated", "account/rateLimits/updated": "account/rateLimits/updated", "app/list/updated": "app/list/updated", + "remoteControl/status/changed": "remoteControl/status/changed", "externalAgentConfig/import/completed": "externalAgentConfig/import/completed", "fs/changed": "fs/changed", "item/reasoning/summaryTextDelta": "item/reasoning/summaryTextDelta", @@ -136,7 +147,9 @@ export const SERVER_NOTIFICATION_METHODS = { "item/reasoning/textDelta": "item/reasoning/textDelta", "thread/compacted": "thread/compacted", "model/rerouted": "model/rerouted", + "model/verification": "model/verification", warning: "warning", + guardianWarning: "guardianWarning", deprecationNotice: "deprecationNotice", configWarning: "configWarning", "fuzzyFileSearch/sessionUpdated": "fuzzyFileSearch/sessionUpdated", @@ -171,21 +184,25 @@ export interface ClientRequestParamsByMethod { readonly "thread/unarchive": typeof CodexSchema.V2ThreadUnarchiveParams.Type; readonly "thread/compact/start": typeof CodexSchema.V2ThreadCompactStartParams.Type; readonly "thread/shellCommand": typeof CodexSchema.V2ThreadShellCommandParams.Type; + readonly "thread/approveGuardianDeniedAction": typeof CodexSchema.V2ThreadApproveGuardianDeniedActionParams.Type; readonly "thread/rollback": typeof CodexSchema.V2ThreadRollbackParams.Type; readonly "thread/list": typeof CodexSchema.V2ThreadListParams.Type; readonly "thread/loaded/list": typeof CodexSchema.V2ThreadLoadedListParams.Type; readonly "thread/read": typeof CodexSchema.V2ThreadReadParams.Type; - readonly "thread/turns/list": typeof CodexSchema.V2ThreadTurnsListParams.Type; readonly "thread/inject_items": typeof CodexSchema.V2ThreadInjectItemsParams.Type; readonly "skills/list": typeof CodexSchema.V2SkillsListParams.Type; + readonly "hooks/list": typeof CodexSchema.V2HooksListParams.Type; readonly "marketplace/add": typeof CodexSchema.V2MarketplaceAddParams.Type; readonly "marketplace/remove": typeof CodexSchema.V2MarketplaceRemoveParams.Type; + readonly "marketplace/upgrade": typeof CodexSchema.V2MarketplaceUpgradeParams.Type; readonly "plugin/list": typeof CodexSchema.V2PluginListParams.Type; readonly "plugin/read": typeof CodexSchema.V2PluginReadParams.Type; + readonly "plugin/skill/read": typeof CodexSchema.V2PluginSkillReadParams.Type; + readonly "plugin/share/save": typeof CodexSchema.V2PluginShareSaveParams.Type; + readonly "plugin/share/updateTargets": typeof CodexSchema.V2PluginShareUpdateTargetsParams.Type; + readonly "plugin/share/list": typeof CodexSchema.V2PluginShareListParams.Type; + readonly "plugin/share/delete": typeof CodexSchema.V2PluginShareDeleteParams.Type; readonly "app/list": typeof CodexSchema.V2AppsListParams.Type; - readonly "device/key/create": typeof CodexSchema.V2DeviceKeyCreateParams.Type; - readonly "device/key/public": typeof CodexSchema.V2DeviceKeyPublicParams.Type; - readonly "device/key/sign": typeof CodexSchema.V2DeviceKeySignParams.Type; readonly "fs/readFile": typeof CodexSchema.V2FsReadFileParams.Type; readonly "fs/writeFile": typeof CodexSchema.V2FsWriteFileParams.Type; readonly "fs/createDirectory": typeof CodexSchema.V2FsCreateDirectoryParams.Type; @@ -203,6 +220,7 @@ export interface ClientRequestParamsByMethod { readonly "turn/interrupt": typeof CodexSchema.V2TurnInterruptParams.Type; readonly "review/start": typeof CodexSchema.V2ReviewStartParams.Type; readonly "model/list": typeof CodexSchema.V2ModelListParams.Type; + readonly "modelProvider/capabilities/read": typeof CodexSchema.V2ModelProviderCapabilitiesReadParams.Type; readonly "experimentalFeature/list": typeof CodexSchema.V2ExperimentalFeatureListParams.Type; readonly "experimentalFeature/enablement/set": typeof CodexSchema.V2ExperimentalFeatureEnablementSetParams.Type; readonly "mcpServer/oauth/login": typeof CodexSchema.V2McpServerOauthLoginParams.Type; @@ -211,6 +229,7 @@ export interface ClientRequestParamsByMethod { readonly "mcpServer/resource/read": typeof CodexSchema.V2McpResourceReadParams.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/login/cancel": typeof CodexSchema.V2CancelLoginAccountParams.Type; readonly "account/logout": undefined; @@ -246,21 +265,25 @@ export interface ClientRequestResponsesByMethod { readonly "thread/unarchive": typeof CodexSchema.V2ThreadUnarchiveResponse.Type; readonly "thread/compact/start": typeof CodexSchema.V2ThreadCompactStartResponse.Type; readonly "thread/shellCommand": typeof CodexSchema.V2ThreadShellCommandResponse.Type; + readonly "thread/approveGuardianDeniedAction": typeof CodexSchema.V2ThreadApproveGuardianDeniedActionResponse.Type; readonly "thread/rollback": typeof CodexSchema.V2ThreadRollbackResponse.Type; readonly "thread/list": typeof CodexSchema.V2ThreadListResponse.Type; readonly "thread/loaded/list": typeof CodexSchema.V2ThreadLoadedListResponse.Type; readonly "thread/read": typeof CodexSchema.V2ThreadReadResponse.Type; - readonly "thread/turns/list": typeof CodexSchema.V2ThreadTurnsListResponse.Type; readonly "thread/inject_items": typeof CodexSchema.V2ThreadInjectItemsResponse.Type; readonly "skills/list": typeof CodexSchema.V2SkillsListResponse.Type; + readonly "hooks/list": typeof CodexSchema.V2HooksListResponse.Type; readonly "marketplace/add": typeof CodexSchema.V2MarketplaceAddResponse.Type; readonly "marketplace/remove": typeof CodexSchema.V2MarketplaceRemoveResponse.Type; + readonly "marketplace/upgrade": typeof CodexSchema.V2MarketplaceUpgradeResponse.Type; readonly "plugin/list": typeof CodexSchema.V2PluginListResponse.Type; readonly "plugin/read": typeof CodexSchema.V2PluginReadResponse.Type; + readonly "plugin/skill/read": typeof CodexSchema.V2PluginSkillReadResponse.Type; + readonly "plugin/share/save": typeof CodexSchema.V2PluginShareSaveResponse.Type; + readonly "plugin/share/updateTargets": typeof CodexSchema.V2PluginShareUpdateTargetsResponse.Type; + readonly "plugin/share/list": typeof CodexSchema.V2PluginShareListResponse.Type; + readonly "plugin/share/delete": typeof CodexSchema.V2PluginShareDeleteResponse.Type; readonly "app/list": typeof CodexSchema.V2AppsListResponse.Type; - readonly "device/key/create": typeof CodexSchema.V2DeviceKeyCreateResponse.Type; - readonly "device/key/public": typeof CodexSchema.V2DeviceKeyPublicResponse.Type; - readonly "device/key/sign": typeof CodexSchema.V2DeviceKeySignResponse.Type; readonly "fs/readFile": typeof CodexSchema.V2FsReadFileResponse.Type; readonly "fs/writeFile": typeof CodexSchema.V2FsWriteFileResponse.Type; readonly "fs/createDirectory": typeof CodexSchema.V2FsCreateDirectoryResponse.Type; @@ -278,6 +301,7 @@ export interface ClientRequestResponsesByMethod { readonly "turn/interrupt": typeof CodexSchema.V2TurnInterruptResponse.Type; readonly "review/start": typeof CodexSchema.V2ReviewStartResponse.Type; readonly "model/list": typeof CodexSchema.V2ModelListResponse.Type; + readonly "modelProvider/capabilities/read": typeof CodexSchema.V2ModelProviderCapabilitiesReadResponse.Type; readonly "experimentalFeature/list": typeof CodexSchema.V2ExperimentalFeatureListResponse.Type; readonly "experimentalFeature/enablement/set": typeof CodexSchema.V2ExperimentalFeatureEnablementSetResponse.Type; readonly "mcpServer/oauth/login": typeof CodexSchema.V2McpServerOauthLoginResponse.Type; @@ -286,6 +310,7 @@ export interface ClientRequestResponsesByMethod { readonly "mcpServer/resource/read": typeof CodexSchema.V2McpResourceReadResponse.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/login/cancel": typeof CodexSchema.V2CancelLoginAccountResponse.Type; readonly "account/logout": typeof CodexSchema.V2LogoutAccountResponse.Type; @@ -346,6 +371,8 @@ export interface ServerNotificationParamsByMethod { readonly "thread/closed": typeof CodexSchema.V2ThreadClosedNotification.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/tokenUsage/updated": typeof CodexSchema.V2ThreadTokenUsageUpdatedNotification.Type; readonly "turn/started": typeof CodexSchema.V2TurnStartedNotification.Type; readonly "hook/started": typeof CodexSchema.V2HookStartedNotification.Type; @@ -361,6 +388,8 @@ export interface ServerNotificationParamsByMethod { readonly "item/agentMessage/delta": typeof CodexSchema.V2AgentMessageDeltaNotification.Type; readonly "item/plan/delta": typeof CodexSchema.V2PlanDeltaNotification.Type; readonly "command/exec/outputDelta": typeof CodexSchema.V2CommandExecOutputDeltaNotification.Type; + readonly "process/outputDelta": typeof CodexSchema.V2ProcessOutputDeltaNotification.Type; + readonly "process/exited": typeof CodexSchema.V2ProcessExitedNotification.Type; readonly "item/commandExecution/outputDelta": typeof CodexSchema.V2CommandExecutionOutputDeltaNotification.Type; readonly "item/commandExecution/terminalInteraction": typeof CodexSchema.V2TerminalInteractionNotification.Type; readonly "item/fileChange/outputDelta": typeof CodexSchema.V2FileChangeOutputDeltaNotification.Type; @@ -372,6 +401,7 @@ export interface ServerNotificationParamsByMethod { readonly "account/updated": typeof CodexSchema.V2AccountUpdatedNotification.Type; readonly "account/rateLimits/updated": typeof CodexSchema.V2AccountRateLimitsUpdatedNotification.Type; readonly "app/list/updated": typeof CodexSchema.V2AppListUpdatedNotification.Type; + readonly "remoteControl/status/changed": typeof CodexSchema.V2RemoteControlStatusChangedNotification.Type; readonly "externalAgentConfig/import/completed": typeof CodexSchema.V2ExternalAgentConfigImportCompletedNotification.Type; readonly "fs/changed": typeof CodexSchema.V2FsChangedNotification.Type; readonly "item/reasoning/summaryTextDelta": typeof CodexSchema.V2ReasoningSummaryTextDeltaNotification.Type; @@ -379,7 +409,9 @@ export interface ServerNotificationParamsByMethod { readonly "item/reasoning/textDelta": typeof CodexSchema.V2ReasoningTextDeltaNotification.Type; readonly "thread/compacted": typeof CodexSchema.V2ContextCompactedNotification.Type; readonly "model/rerouted": typeof CodexSchema.V2ModelReroutedNotification.Type; + readonly "model/verification": typeof CodexSchema.V2ModelVerificationNotification.Type; readonly warning: typeof CodexSchema.V2WarningNotification.Type; + readonly guardianWarning: typeof CodexSchema.V2GuardianWarningNotification.Type; readonly deprecationNotice: typeof CodexSchema.V2DeprecationNoticeNotification.Type; readonly configWarning: typeof CodexSchema.V2ConfigWarningNotification.Type; readonly "fuzzyFileSearch/sessionUpdated": typeof CodexSchema.FuzzyFileSearchSessionUpdatedNotification.Type; @@ -409,21 +441,25 @@ export const CLIENT_REQUEST_PARAMS = { "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams, "thread/compact/start": CodexSchema.V2ThreadCompactStartParams, "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams, + "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams, "thread/rollback": CodexSchema.V2ThreadRollbackParams, "thread/list": CodexSchema.V2ThreadListParams, "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams, "thread/read": CodexSchema.V2ThreadReadParams, - "thread/turns/list": CodexSchema.V2ThreadTurnsListParams, "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams, "skills/list": CodexSchema.V2SkillsListParams, + "hooks/list": CodexSchema.V2HooksListParams, "marketplace/add": CodexSchema.V2MarketplaceAddParams, "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams, + "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams, "plugin/list": CodexSchema.V2PluginListParams, "plugin/read": CodexSchema.V2PluginReadParams, + "plugin/skill/read": CodexSchema.V2PluginSkillReadParams, + "plugin/share/save": CodexSchema.V2PluginShareSaveParams, + "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams, + "plugin/share/list": CodexSchema.V2PluginShareListParams, + "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams, "app/list": CodexSchema.V2AppsListParams, - "device/key/create": CodexSchema.V2DeviceKeyCreateParams, - "device/key/public": CodexSchema.V2DeviceKeyPublicParams, - "device/key/sign": CodexSchema.V2DeviceKeySignParams, "fs/readFile": CodexSchema.V2FsReadFileParams, "fs/writeFile": CodexSchema.V2FsWriteFileParams, "fs/createDirectory": CodexSchema.V2FsCreateDirectoryParams, @@ -441,6 +477,7 @@ export const CLIENT_REQUEST_PARAMS = { "turn/interrupt": CodexSchema.V2TurnInterruptParams, "review/start": CodexSchema.V2ReviewStartParams, "model/list": CodexSchema.V2ModelListParams, + "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams, "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams, "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams, "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams, @@ -449,6 +486,7 @@ export const CLIENT_REQUEST_PARAMS = { "mcpServer/resource/read": CodexSchema.V2McpResourceReadParams, "mcpServer/tool/call": CodexSchema.V2McpServerToolCallParams, "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartParams, + "windowsSandbox/readiness": undefined, "account/login/start": CodexSchema.V2LoginAccountParams, "account/login/cancel": CodexSchema.V2CancelLoginAccountParams, "account/logout": undefined, @@ -484,21 +522,25 @@ export const CLIENT_REQUEST_RESPONSES = { "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse, "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse, "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse, + "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse, "thread/rollback": CodexSchema.V2ThreadRollbackResponse, "thread/list": CodexSchema.V2ThreadListResponse, "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse, "thread/read": CodexSchema.V2ThreadReadResponse, - "thread/turns/list": CodexSchema.V2ThreadTurnsListResponse, "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse, "skills/list": CodexSchema.V2SkillsListResponse, + "hooks/list": CodexSchema.V2HooksListResponse, "marketplace/add": CodexSchema.V2MarketplaceAddResponse, "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse, + "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse, "plugin/list": CodexSchema.V2PluginListResponse, "plugin/read": CodexSchema.V2PluginReadResponse, + "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse, + "plugin/share/save": CodexSchema.V2PluginShareSaveResponse, + "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse, + "plugin/share/list": CodexSchema.V2PluginShareListResponse, + "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse, "app/list": CodexSchema.V2AppsListResponse, - "device/key/create": CodexSchema.V2DeviceKeyCreateResponse, - "device/key/public": CodexSchema.V2DeviceKeyPublicResponse, - "device/key/sign": CodexSchema.V2DeviceKeySignResponse, "fs/readFile": CodexSchema.V2FsReadFileResponse, "fs/writeFile": CodexSchema.V2FsWriteFileResponse, "fs/createDirectory": CodexSchema.V2FsCreateDirectoryResponse, @@ -516,6 +558,7 @@ export const CLIENT_REQUEST_RESPONSES = { "turn/interrupt": CodexSchema.V2TurnInterruptResponse, "review/start": CodexSchema.V2ReviewStartResponse, "model/list": CodexSchema.V2ModelListResponse, + "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse, "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse, "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse, "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse, @@ -524,6 +567,7 @@ export const CLIENT_REQUEST_RESPONSES = { "mcpServer/resource/read": CodexSchema.V2McpResourceReadResponse, "mcpServer/tool/call": CodexSchema.V2McpServerToolCallResponse, "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartResponse, + "windowsSandbox/readiness": CodexSchema.V2WindowsSandboxReadinessResponse, "account/login/start": CodexSchema.V2LoginAccountResponse, "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse, "account/logout": CodexSchema.V2LogoutAccountResponse, @@ -584,6 +628,8 @@ export const SERVER_NOTIFICATION_PARAMS = { "thread/closed": CodexSchema.V2ThreadClosedNotification, "skills/changed": CodexSchema.V2SkillsChangedNotification, "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification, + "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification, + "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification, "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification, "turn/started": CodexSchema.V2TurnStartedNotification, "hook/started": CodexSchema.V2HookStartedNotification, @@ -600,6 +646,8 @@ export const SERVER_NOTIFICATION_PARAMS = { "item/agentMessage/delta": CodexSchema.V2AgentMessageDeltaNotification, "item/plan/delta": CodexSchema.V2PlanDeltaNotification, "command/exec/outputDelta": CodexSchema.V2CommandExecOutputDeltaNotification, + "process/outputDelta": CodexSchema.V2ProcessOutputDeltaNotification, + "process/exited": CodexSchema.V2ProcessExitedNotification, "item/commandExecution/outputDelta": CodexSchema.V2CommandExecutionOutputDeltaNotification, "item/commandExecution/terminalInteraction": CodexSchema.V2TerminalInteractionNotification, "item/fileChange/outputDelta": CodexSchema.V2FileChangeOutputDeltaNotification, @@ -611,6 +659,7 @@ export const SERVER_NOTIFICATION_PARAMS = { "account/updated": CodexSchema.V2AccountUpdatedNotification, "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification, "app/list/updated": CodexSchema.V2AppListUpdatedNotification, + "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification, "externalAgentConfig/import/completed": CodexSchema.V2ExternalAgentConfigImportCompletedNotification, "fs/changed": CodexSchema.V2FsChangedNotification, @@ -619,7 +668,9 @@ export const SERVER_NOTIFICATION_PARAMS = { "item/reasoning/textDelta": CodexSchema.V2ReasoningTextDeltaNotification, "thread/compacted": CodexSchema.V2ContextCompactedNotification, "model/rerouted": CodexSchema.V2ModelReroutedNotification, + "model/verification": CodexSchema.V2ModelVerificationNotification, warning: CodexSchema.V2WarningNotification, + guardianWarning: CodexSchema.V2GuardianWarningNotification, deprecationNotice: CodexSchema.V2DeprecationNoticeNotification, configWarning: CodexSchema.V2ConfigWarningNotification, "fuzzyFileSearch/sessionUpdated": CodexSchema.FuzzyFileSearchSessionUpdatedNotification, 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 fd18e9d4d0b..a676187dfc7 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: be75785504ff152fa6333e380a2d50642f42fba0 +// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59 import * as CodexSchema from "./schema.gen.ts"; @@ -37,12 +37,6 @@ export const v2 = { ConfigWriteResponse: CodexSchema.V2ConfigWriteResponse, ContextCompactedNotification: CodexSchema.V2ContextCompactedNotification, DeprecationNoticeNotification: CodexSchema.V2DeprecationNoticeNotification, - DeviceKeyCreateParams: CodexSchema.V2DeviceKeyCreateParams, - DeviceKeyCreateResponse: CodexSchema.V2DeviceKeyCreateResponse, - DeviceKeyPublicParams: CodexSchema.V2DeviceKeyPublicParams, - DeviceKeyPublicResponse: CodexSchema.V2DeviceKeyPublicResponse, - DeviceKeySignParams: CodexSchema.V2DeviceKeySignParams, - DeviceKeySignResponse: CodexSchema.V2DeviceKeySignResponse, ErrorNotification: CodexSchema.V2ErrorNotification, ExperimentalFeatureEnablementSetParams: CodexSchema.V2ExperimentalFeatureEnablementSetParams, ExperimentalFeatureEnablementSetResponse: CodexSchema.V2ExperimentalFeatureEnablementSetResponse, @@ -80,7 +74,10 @@ export const v2 = { GetAccountParams: CodexSchema.V2GetAccountParams, GetAccountRateLimitsResponse: CodexSchema.V2GetAccountRateLimitsResponse, GetAccountResponse: CodexSchema.V2GetAccountResponse, + GuardianWarningNotification: CodexSchema.V2GuardianWarningNotification, HookCompletedNotification: CodexSchema.V2HookCompletedNotification, + HooksListParams: CodexSchema.V2HooksListParams, + HooksListResponse: CodexSchema.V2HooksListResponse, HookStartedNotification: CodexSchema.V2HookStartedNotification, ItemCompletedNotification: CodexSchema.V2ItemCompletedNotification, ItemGuardianApprovalReviewCompletedNotification: @@ -97,6 +94,8 @@ export const v2 = { MarketplaceAddResponse: CodexSchema.V2MarketplaceAddResponse, MarketplaceRemoveParams: CodexSchema.V2MarketplaceRemoveParams, MarketplaceRemoveResponse: CodexSchema.V2MarketplaceRemoveResponse, + MarketplaceUpgradeParams: CodexSchema.V2MarketplaceUpgradeParams, + MarketplaceUpgradeResponse: CodexSchema.V2MarketplaceUpgradeResponse, McpResourceReadParams: CodexSchema.V2McpResourceReadParams, McpResourceReadResponse: CodexSchema.V2McpResourceReadResponse, McpServerOauthLoginCompletedNotification: CodexSchema.V2McpServerOauthLoginCompletedNotification, @@ -109,7 +108,10 @@ export const v2 = { McpToolCallProgressNotification: CodexSchema.V2McpToolCallProgressNotification, ModelListParams: CodexSchema.V2ModelListParams, ModelListResponse: CodexSchema.V2ModelListResponse, + ModelProviderCapabilitiesReadParams: CodexSchema.V2ModelProviderCapabilitiesReadParams, + ModelProviderCapabilitiesReadResponse: CodexSchema.V2ModelProviderCapabilitiesReadResponse, ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification, + ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification, PlanDeltaNotification: CodexSchema.V2PlanDeltaNotification, PluginInstallParams: CodexSchema.V2PluginInstallParams, PluginInstallResponse: CodexSchema.V2PluginInstallResponse, @@ -117,12 +119,25 @@ export const v2 = { PluginListResponse: CodexSchema.V2PluginListResponse, PluginReadParams: CodexSchema.V2PluginReadParams, PluginReadResponse: CodexSchema.V2PluginReadResponse, + PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams, + PluginShareDeleteResponse: CodexSchema.V2PluginShareDeleteResponse, + PluginShareListParams: CodexSchema.V2PluginShareListParams, + PluginShareListResponse: CodexSchema.V2PluginShareListResponse, + PluginShareSaveParams: CodexSchema.V2PluginShareSaveParams, + PluginShareSaveResponse: CodexSchema.V2PluginShareSaveResponse, + PluginShareUpdateTargetsParams: CodexSchema.V2PluginShareUpdateTargetsParams, + PluginShareUpdateTargetsResponse: CodexSchema.V2PluginShareUpdateTargetsResponse, + PluginSkillReadParams: CodexSchema.V2PluginSkillReadParams, + PluginSkillReadResponse: CodexSchema.V2PluginSkillReadResponse, PluginUninstallParams: CodexSchema.V2PluginUninstallParams, PluginUninstallResponse: CodexSchema.V2PluginUninstallResponse, + ProcessExitedNotification: CodexSchema.V2ProcessExitedNotification, + ProcessOutputDeltaNotification: CodexSchema.V2ProcessOutputDeltaNotification, RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification, ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification, ReasoningSummaryTextDeltaNotification: CodexSchema.V2ReasoningSummaryTextDeltaNotification, ReasoningTextDeltaNotification: CodexSchema.V2ReasoningTextDeltaNotification, + RemoteControlStatusChangedNotification: CodexSchema.V2RemoteControlStatusChangedNotification, ReviewStartParams: CodexSchema.V2ReviewStartParams, ReviewStartResponse: CodexSchema.V2ReviewStartResponse, SendAddCreditsNudgeEmailParams: CodexSchema.V2SendAddCreditsNudgeEmailParams, @@ -134,6 +149,9 @@ export const v2 = { SkillsListParams: CodexSchema.V2SkillsListParams, SkillsListResponse: CodexSchema.V2SkillsListResponse, TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification, + ThreadApproveGuardianDeniedActionParams: CodexSchema.V2ThreadApproveGuardianDeniedActionParams, + ThreadApproveGuardianDeniedActionResponse: + CodexSchema.V2ThreadApproveGuardianDeniedActionResponse, ThreadArchivedNotification: CodexSchema.V2ThreadArchivedNotification, ThreadArchiveParams: CodexSchema.V2ThreadArchiveParams, ThreadArchiveResponse: CodexSchema.V2ThreadArchiveResponse, @@ -142,6 +160,8 @@ export const v2 = { ThreadCompactStartResponse: CodexSchema.V2ThreadCompactStartResponse, ThreadForkParams: CodexSchema.V2ThreadForkParams, ThreadForkResponse: CodexSchema.V2ThreadForkResponse, + ThreadGoalClearedNotification: CodexSchema.V2ThreadGoalClearedNotification, + ThreadGoalUpdatedNotification: CodexSchema.V2ThreadGoalUpdatedNotification, ThreadInjectItemsParams: CodexSchema.V2ThreadInjectItemsParams, ThreadInjectItemsResponse: CodexSchema.V2ThreadInjectItemsResponse, ThreadListParams: CodexSchema.V2ThreadListParams, @@ -176,8 +196,6 @@ export const v2 = { ThreadStartResponse: CodexSchema.V2ThreadStartResponse, ThreadStatusChangedNotification: CodexSchema.V2ThreadStatusChangedNotification, ThreadTokenUsageUpdatedNotification: CodexSchema.V2ThreadTokenUsageUpdatedNotification, - ThreadTurnsListParams: CodexSchema.V2ThreadTurnsListParams, - ThreadTurnsListResponse: CodexSchema.V2ThreadTurnsListResponse, ThreadUnarchivedNotification: CodexSchema.V2ThreadUnarchivedNotification, ThreadUnarchiveParams: CodexSchema.V2ThreadUnarchiveParams, ThreadUnarchiveResponse: CodexSchema.V2ThreadUnarchiveResponse, @@ -194,6 +212,7 @@ export const v2 = { TurnSteerParams: CodexSchema.V2TurnSteerParams, TurnSteerResponse: CodexSchema.V2TurnSteerResponse, WarningNotification: CodexSchema.V2WarningNotification, + WindowsSandboxReadinessResponse: CodexSchema.V2WindowsSandboxReadinessResponse, WindowsSandboxSetupCompletedNotification: CodexSchema.V2WindowsSandboxSetupCompletedNotification, WindowsSandboxSetupStartParams: CodexSchema.V2WindowsSandboxSetupStartParams, WindowsSandboxSetupStartResponse: CodexSchema.V2WindowsSandboxSetupStartResponse, diff --git a/packages/effect-codex-app-server/src/_generated/schema.gen.ts b/packages/effect-codex-app-server/src/_generated/schema.gen.ts index 3af37c0785f..8cb1f622fc6 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: be75785504ff152fa6333e380a2d50642f42fba0 +// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59 import * as Schema from "effect/Schema"; @@ -48,13 +48,14 @@ export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({ export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit"; export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]); -export type ClientRequest__ApprovalsReviewer = "user" | "guardian_subagent"; +export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const ClientRequest__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 ClientRequest__AppsListParams = { @@ -220,6 +221,9 @@ export const ClientRequest__CommandExecWriteParams = Schema.Struct({ description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.", }); +export type ClientRequest__CommandMigration = { readonly name: string }; +export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }); + export type ClientRequest__ConfigReadParams = { readonly cwd?: string | null; readonly includeLayers?: boolean; @@ -237,21 +241,6 @@ export const ClientRequest__ConfigReadParams = Schema.Struct({ includeLayers: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }); -export type ClientRequest__DeviceKeyProtectionPolicy = - | "hardware_only" - | "allow_os_protected_nonextractable"; -export const ClientRequest__DeviceKeyProtectionPolicy = Schema.Literals([ - "hardware_only", - "allow_os_protected_nonextractable", -]).annotate({ - description: "Protection policy for creating or loading a controller-local device key.", -}); - -export type ClientRequest__DeviceKeyPublicParams = { readonly keyId: string }; -export const ClientRequest__DeviceKeyPublicParams = Schema.Struct({ - keyId: Schema.String, -}).annotate({ description: "Fetch a controller-local device key public key by id." }); - export type ClientRequest__ExperimentalFeatureEnablementSetParams = { readonly enablement: { readonly [x: string]: boolean }; }; @@ -313,13 +302,21 @@ export type ClientRequest__ExternalAgentConfigMigrationItemType = | "CONFIG" | "SKILLS" | "PLUGINS" - | "MCP_SERVER_CONFIG"; + | "MCP_SERVER_CONFIG" + | "SUBAGENTS" + | "HOOKS" + | "COMMANDS" + | "SESSIONS"; export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([ "AGENTS_MD", "CONFIG", "SKILLS", "PLUGINS", "MCP_SERVER_CONFIG", + "SUBAGENTS", + "HOOKS", + "COMMANDS", + "SESSIONS", ]); export type ClientRequest__FeedbackUploadParams = { @@ -341,6 +338,43 @@ export const ClientRequest__FeedbackUploadParams = Schema.Struct({ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type ClientRequest__FileSystemAccessMode = "read" | "write" | "none"; +export const ClientRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]); + +export type ClientRequest__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { readonly kind: "project_roots"; readonly subpath?: string | null } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null }; +export const ClientRequest__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([Schema.String, 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([Schema.String, Schema.Null])), + }), + ], + { mode: "oneOf" }, +); + export type ClientRequest__FsCopyParams = { readonly destinationPath: string; readonly recursive?: boolean; @@ -485,18 +519,17 @@ export const ClientRequest__GetAccountParams = Schema.Struct({ ), }); -export type ClientRequest__GhostCommit = { - readonly id: string; - readonly parent?: string | null; - readonly preexisting_untracked_dirs: ReadonlyArray; - readonly preexisting_untracked_files: ReadonlyArray; -}; -export const ClientRequest__GhostCommit = Schema.Struct({ - id: Schema.String, - parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - preexisting_untracked_dirs: Schema.Array(Schema.String), - preexisting_untracked_files: Schema.Array(Schema.String), -}).annotate({ description: "Details of a ghost commit created from a repository state." }); +export type ClientRequest__HookMigration = { readonly name: string }; +export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String }); + +export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray }; +export const ClientRequest__HooksListParams = Schema.Struct({ + cwds: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "When empty, defaults to the current session working directory.", + }), + ), +}); export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original"; export const ClientRequest__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]); @@ -563,7 +596,7 @@ export const ClientRequest__LocalShellStatus = Schema.Literals([ export type ClientRequest__LoginAccountParams = | { readonly apiKey: string; readonly type: "apiKey" } - | { readonly type: "chatgpt" } + | { readonly codexStreamlinedLogin?: boolean; readonly type: "chatgpt" } | { readonly type: "chatgptDeviceCode" } | { readonly accessToken: string; @@ -578,6 +611,7 @@ export const ClientRequest__LoginAccountParams = Schema.Union( type: Schema.Literal("apiKey").annotate({ title: "ApiKeyLoginAccountParamsType" }), }).annotate({ title: "ApiKeyLoginAccountParams" }), Schema.Struct({ + codexStreamlinedLogin: Schema.optionalKey(Schema.Boolean), type: Schema.Literal("chatgpt").annotate({ title: "ChatgptLoginAccountParamsType" }), }).annotate({ title: "ChatgptLoginAccountParams" }), Schema.Struct({ @@ -630,6 +664,11 @@ export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({ marketplaceName: Schema.String, }); +export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null }; +export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({ + marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + export type ClientRequest__McpResourceReadParams = { readonly server: string; readonly threadId?: string | null; @@ -641,6 +680,9 @@ export const ClientRequest__McpResourceReadParams = Schema.Struct({ uri: Schema.String, }); +export type ClientRequest__McpServerMigration = { readonly name: string }; +export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String }); + export type ClientRequest__McpServerOauthLoginParams = { readonly name: string; readonly scopes?: ReadonlyArray | null; @@ -723,9 +765,60 @@ export const ClientRequest__ModelListParams = Schema.Struct({ ), }); +export type ClientRequest__ModelProviderCapabilitiesReadParams = {}; +export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Struct({}); + +export type ClientRequest__PermissionProfileNetworkPermissions = { readonly enabled: boolean }; +export const ClientRequest__PermissionProfileNetworkPermissions = Schema.Struct({ + enabled: Schema.Boolean, +}); + export type ClientRequest__Personality = "none" | "friendly" | "pragmatic"; export const ClientRequest__Personality = Schema.Literals(["none", "friendly", "pragmatic"]); +export type ClientRequest__PluginListMarketplaceKind = + | "local" + | "workspace-directory" + | "shared-with-me"; +export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([ + "local", + "workspace-directory", + "shared-with-me", +]); + +export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string }; +export const ClientRequest__PluginShareDeleteParams = Schema.Struct({ + remotePluginId: Schema.String, +}); + +export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE"; +export const ClientRequest__PluginShareDiscoverability = Schema.Literals([ + "LISTED", + "UNLISTED", + "PRIVATE", +]); + +export type ClientRequest__PluginShareListParams = {}; +export const ClientRequest__PluginShareListParams = Schema.Struct({}); + +export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace"; +export const ClientRequest__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); + +export type ClientRequest__PluginSkillReadParams = { + readonly remoteMarketplaceName: string; + readonly remotePluginId: string; + readonly skillName: string; +}; +export const ClientRequest__PluginSkillReadParams = Schema.Struct({ + remoteMarketplaceName: Schema.String, + remotePluginId: Schema.String, + skillName: Schema.String, +}); + export type ClientRequest__PluginUninstallParams = { readonly pluginId: string }; export const ClientRequest__PluginUninstallParams = Schema.Struct({ pluginId: Schema.String }); @@ -804,18 +897,6 @@ export const ClientRequest__ReasoningSummary = Schema.Union( "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries", }); -export type ClientRequest__RemoteControlClientConnectionAudience = - "remote_control_client_websocket"; -export const ClientRequest__RemoteControlClientConnectionAudience = Schema.Literal( - "remote_control_client_websocket", -).annotate({ description: "Audience for a remote-control client connection device-key proof." }); - -export type ClientRequest__RemoteControlClientEnrollmentAudience = - "remote_control_client_enrollment"; -export const ClientRequest__RemoteControlClientEnrollmentAudience = Schema.Literal( - "remote_control_client_enrollment", -).annotate({ description: "Audience for a remote-control client enrollment device-key proof." }); - export type ClientRequest__RequestId = string | number; export const ClientRequest__RequestId = Schema.Union([ Schema.String, @@ -920,8 +1001,16 @@ export const ClientRequest__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type ClientRequest__ServiceTier = "fast" | "flex"; -export const ClientRequest__ServiceTier = Schema.Literals(["fast", "flex"]); +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])), +}); export type ClientRequest__SkillsListExtraRootsForCwd = { readonly cwd: string; @@ -935,6 +1024,9 @@ export const ClientRequest__SkillsListExtraRootsForCwd = Schema.Struct({ export type ClientRequest__SortDirection = "asc" | "desc"; export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]); +export type ClientRequest__SubagentMigration = { readonly name: string }; +export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String }); + export type ClientRequest__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -960,6 +1052,17 @@ export const ClientRequest__TextElement = Schema.Struct({ ), }); +export type ClientRequest__ThreadApproveGuardianDeniedActionParams = { + readonly event: unknown; + readonly threadId: string; +}; +export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({ + event: Schema.Unknown.annotate({ + description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.", + }), + threadId: Schema.String, +}); + export type ClientRequest__ThreadArchiveParams = { readonly threadId: string }; export const ClientRequest__ThreadArchiveParams = Schema.Struct({ threadId: Schema.String }); @@ -977,6 +1080,12 @@ export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({ threadId: Schema.String, }); +export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray; +export const ClientRequest__ThreadListCwdFilter = Schema.Union([ + Schema.String, + Schema.Array(Schema.String), +]); + export type ClientRequest__ThreadLoadedListParams = { readonly cursor?: string | null; readonly limit?: number | null; @@ -1091,6 +1200,13 @@ export const ClientRequest__ThreadShellCommandParams = Schema.Struct({ export type ClientRequest__ThreadSortKey = "created_at" | "updated_at"; export const ClientRequest__ThreadSortKey = Schema.Literals(["created_at", "updated_at"]); +export type ClientRequest__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const ClientRequest__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type ClientRequest__ThreadSourceKind = | "cli" | "vscode" @@ -1159,7 +1275,6 @@ export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schem export type CommandExecutionRequestApprovalParams__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -1172,9 +1287,6 @@ export const CommandExecutionRequestApprovalParams__FileSystemSpecialPath = Sche Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -1460,7 +1572,6 @@ export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Lit export type PermissionsRequestApprovalParams__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -1473,9 +1584,6 @@ export const PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Un Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -1518,7 +1626,6 @@ export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.L export type PermissionsRequestApprovalResponse__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -1531,9 +1638,6 @@ export const PermissionsRequestApprovalResponse__FileSystemSpecialPath = Schema. Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -1624,11 +1728,16 @@ export const ServerNotification__AppScreenshot = Schema.Struct({ userPrompt: Schema.String, }); -export type ServerNotification__AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; +export type ServerNotification__AuthMode = + | "apikey" + | "chatgpt" + | "chatgptAuthTokens" + | "agentIdentity"; export const ServerNotification__AuthMode = Schema.Literals([ "apikey", "chatgpt", "chatgptAuthTokens", + "agentIdentity", ]).annotate({ description: "Authentication mode for OpenAI-backed providers." }); export type ServerNotification__AutoReviewDecisionSource = "agent"; @@ -1781,6 +1890,9 @@ export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Stru itemId: Schema.String, threadId: Schema.String, turnId: Schema.String, +}).annotate({ + description: + "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.", }); export type ServerNotification__FileSystemAccessMode = "read" | "write" | "none"; @@ -1789,7 +1901,6 @@ export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", export type ServerNotification__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -1802,9 +1913,6 @@ export const ServerNotification__FileSystemSpecialPath = Schema.Union( Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -1878,10 +1986,23 @@ export const ServerNotification__GuardianUserAuthorization = Schema.Literals([ "high", ]).annotate({ description: "[UNSTABLE] Authorization level assigned by approval auto-review." }); +export type ServerNotification__GuardianWarningNotification = { + readonly message: string; + readonly threadId: string; +}; +export const ServerNotification__GuardianWarningNotification = Schema.Struct({ + message: Schema.String.annotate({ + description: "Concise guardian warning message for the user.", + }), + threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }), +}); + export type ServerNotification__HookEventName = | "preToolUse" | "permissionRequest" | "postToolUse" + | "preCompact" + | "postCompact" | "sessionStart" | "userPromptSubmit" | "stop"; @@ -1889,6 +2010,8 @@ export const ServerNotification__HookEventName = Schema.Literals([ "preToolUse", "permissionRequest", "postToolUse", + "preCompact", + "postCompact", "sessionStart", "userPromptSubmit", "stop", @@ -2026,6 +2149,9 @@ export const ServerNotification__MessagePhase = Schema.Literals([ export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity"; export const ServerNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity"); +export type ServerNotification__ModelVerification = "trustedAccessForCyber"; +export const ServerNotification__ModelVerification = Schema.Literal("trustedAccessForCyber"); + export type ServerNotification__NetworkApprovalProtocol = | "http" | "https" @@ -2117,6 +2243,61 @@ export const ServerNotification__PlanType = Schema.Literals([ "unknown", ]); +export type ServerNotification__ProcessExitedNotification = { + readonly exitCode: number; + readonly processHandle: string; + readonly stderr: string; + readonly stderrCapReached: boolean; + readonly stdout: string; + readonly stdoutCapReached: boolean; +}; +export const ServerNotification__ProcessExitedNotification = Schema.Struct({ + exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check( + Schema.isInt(), + ), + processHandle: Schema.String.annotate({ + description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", + }), + stderr: Schema.String.annotate({ + description: + "Buffered stderr capture.\n\nEmpty when stderr was streamed via `process/outputDelta`.", + }), + stderrCapReached: Schema.Boolean.annotate({ + description: + "Whether stderr reached `outputBytesCap`.\n\nIn streaming mode, stderr is empty and cap state is also reported on the final stderr `process/outputDelta` notification.", + }), + stdout: Schema.String.annotate({ + description: + "Buffered stdout capture.\n\nEmpty when stdout was streamed via `process/outputDelta`.", + }), + stdoutCapReached: Schema.Boolean.annotate({ + description: + "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.", + }), +}).annotate({ description: "Final process exit notification for `process/spawn`." }); + +export type ServerNotification__ProcessOutputDeltaNotification = { + readonly capReached: boolean; + readonly deltaBase64: string; + readonly processHandle: string; + readonly stream: "stdout" | "stderr"; +}; +export const ServerNotification__ProcessOutputDeltaNotification = Schema.Struct({ + capReached: Schema.Boolean.annotate({ + description: + "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.", + }), + deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }), + processHandle: Schema.String.annotate({ + description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", + }), + stream: Schema.Literals(["stdout", "stderr"]).annotate({ + description: "Stream label for `process/outputDelta` notifications.", + }), +}).annotate({ + description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.", +}); + export type ServerNotification__RateLimitReachedType = | "rate_limit_reached" | "workspace_owner_credits_depleted" @@ -2211,6 +2392,18 @@ export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct( turnId: Schema.String, }); +export type ServerNotification__RemoteControlConnectionStatus = + | "disabled" + | "connecting" + | "connected" + | "errored"; +export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([ + "disabled", + "connecting", + "connected", + "errored", +]); + export type ServerNotification__RequestId = string | number; export const ServerNotification__RequestId = Schema.Union([ Schema.String, @@ -2292,6 +2485,23 @@ export const ServerNotification__ThreadClosedNotification = Schema.Struct({ threadId: Schema.String, }); +export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string }; +export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({ + threadId: Schema.String, +}); + +export type ServerNotification__ThreadGoalStatus = + | "active" + | "paused" + | "budgetLimited" + | "complete"; +export const ServerNotification__ThreadGoalStatus = Schema.Literals([ + "active", + "paused", + "budgetLimited", + "complete", +]); + export type ServerNotification__ThreadId = string; export const ServerNotification__ThreadId = Schema.String; @@ -2398,6 +2608,13 @@ export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Sche "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.", }); +export type ServerNotification__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const ServerNotification__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string }; export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({ threadId: Schema.String, @@ -2604,7 +2821,6 @@ export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "wri export type ServerRequest__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -2617,9 +2833,6 @@ export const ServerRequest__FileSystemSpecialPath = Schema.Union( Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -2863,11 +3076,16 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.St ), }); -export type V2AccountUpdatedNotification__AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; +export type V2AccountUpdatedNotification__AuthMode = + | "apikey" + | "chatgpt" + | "chatgptAuthTokens" + | "agentIdentity"; export const V2AccountUpdatedNotification__AuthMode = Schema.Literals([ "apikey", "chatgpt", "chatgptAuthTokens", + "agentIdentity", ]).annotate({ description: "Authentication mode for OpenAI-backed providers." }); export type V2AccountUpdatedNotification__PlanType = @@ -2991,6 +3209,50 @@ export const V2CommandExecParams__CommandExecTerminalSize = Schema.Struct({ .check(Schema.isGreaterThanOrEqualTo(0)), }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }); +export type V2CommandExecParams__FileSystemAccessMode = "read" | "write" | "none"; +export const V2CommandExecParams__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]); + +export type V2CommandExecParams__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { readonly kind: "project_roots"; readonly subpath?: string | null } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null }; +export const V2CommandExecParams__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([Schema.String, 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([Schema.String, Schema.Null])), + }), + ], + { mode: "oneOf" }, +); + +export type V2CommandExecParams__PermissionProfileNetworkPermissions = { + readonly enabled: boolean; +}; +export const V2CommandExecParams__PermissionProfileNetworkPermissions = Schema.Struct({ + enabled: Schema.Boolean, +}); + export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert"; export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]); @@ -3015,13 +3277,14 @@ export const V2ConfigReadResponse__AppToolApproval = Schema.Literals(["auto", "p export type V2ConfigReadResponse__AppToolsConfig = {}; export const V2ConfigReadResponse__AppToolsConfig = Schema.Struct({}); -export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "guardian_subagent"; +export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ConfigReadResponse__AppsDefaultConfig = { @@ -3122,9 +3385,6 @@ export const V2ConfigReadResponse__SandboxWorkspaceWrite = Schema.Struct({ writable_roots: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), }); -export type V2ConfigReadResponse__ServiceTier = "fast" | "flex"; -export const V2ConfigReadResponse__ServiceTier = Schema.Literals(["fast", "flex"]); - export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high"; export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({ description: @@ -3184,6 +3444,42 @@ export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union( { mode: "oneOf" }, ); +export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler = + | { + readonly async: boolean; + readonly command: string; + readonly statusMessage?: string | null; + readonly timeoutSec?: number | null; + readonly type: "command"; + } + | { readonly type: "prompt" } + | { readonly type: "agent" }; +export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union( + [ + Schema.Struct({ + async: Schema.Boolean, + command: Schema.String, + statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + timeoutSec: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint64" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + Schema.Null, + ]), + ), + type: Schema.Literal("command").annotate({ title: "CommandConfiguredHookHandlerType" }), + }).annotate({ title: "CommandConfiguredHookHandler" }), + Schema.Struct({ + type: Schema.Literal("prompt").annotate({ title: "PromptConfiguredHookHandlerType" }), + }).annotate({ title: "PromptConfiguredHookHandler" }), + Schema.Struct({ + type: Schema.Literal("agent").annotate({ title: "AgentConfiguredHookHandlerType" }), + }).annotate({ title: "AgentConfiguredHookHandler" }), + ], + { mode: "oneOf" }, +); + export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny"; export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([ "allow", @@ -3244,63 +3540,6 @@ export const V2ConfigWriteResponse__AbsolutePathBuf = Schema.String.annotate({ export type V2ConfigWriteResponse__WriteStatus = "ok" | "okOverridden"; export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]); -export type V2DeviceKeyCreateParams__DeviceKeyProtectionPolicy = - | "hardware_only" - | "allow_os_protected_nonextractable"; -export const V2DeviceKeyCreateParams__DeviceKeyProtectionPolicy = Schema.Literals([ - "hardware_only", - "allow_os_protected_nonextractable", -]).annotate({ - description: "Protection policy for creating or loading a controller-local device key.", -}); - -export type V2DeviceKeyCreateResponse__DeviceKeyAlgorithm = "ecdsa_p256_sha256"; -export const V2DeviceKeyCreateResponse__DeviceKeyAlgorithm = Schema.Literal( - "ecdsa_p256_sha256", -).annotate({ description: "Device-key algorithm reported at enrollment and signing boundaries." }); - -export type V2DeviceKeyCreateResponse__DeviceKeyProtectionClass = - | "hardware_secure_enclave" - | "hardware_tpm" - | "os_protected_nonextractable"; -export const V2DeviceKeyCreateResponse__DeviceKeyProtectionClass = Schema.Literals([ - "hardware_secure_enclave", - "hardware_tpm", - "os_protected_nonextractable", -]).annotate({ description: "Platform protection class for a controller-local device key." }); - -export type V2DeviceKeyPublicResponse__DeviceKeyAlgorithm = "ecdsa_p256_sha256"; -export const V2DeviceKeyPublicResponse__DeviceKeyAlgorithm = Schema.Literal( - "ecdsa_p256_sha256", -).annotate({ description: "Device-key algorithm reported at enrollment and signing boundaries." }); - -export type V2DeviceKeyPublicResponse__DeviceKeyProtectionClass = - | "hardware_secure_enclave" - | "hardware_tpm" - | "os_protected_nonextractable"; -export const V2DeviceKeyPublicResponse__DeviceKeyProtectionClass = Schema.Literals([ - "hardware_secure_enclave", - "hardware_tpm", - "os_protected_nonextractable", -]).annotate({ description: "Platform protection class for a controller-local device key." }); - -export type V2DeviceKeySignParams__RemoteControlClientConnectionAudience = - "remote_control_client_websocket"; -export const V2DeviceKeySignParams__RemoteControlClientConnectionAudience = Schema.Literal( - "remote_control_client_websocket", -).annotate({ description: "Audience for a remote-control client connection device-key proof." }); - -export type V2DeviceKeySignParams__RemoteControlClientEnrollmentAudience = - "remote_control_client_enrollment"; -export const V2DeviceKeySignParams__RemoteControlClientEnrollmentAudience = Schema.Literal( - "remote_control_client_enrollment", -).annotate({ description: "Audience for a remote-control client enrollment device-key proof." }); - -export type V2DeviceKeySignResponse__DeviceKeyAlgorithm = "ecdsa_p256_sha256"; -export const V2DeviceKeySignResponse__DeviceKeyAlgorithm = Schema.Literal( - "ecdsa_p256_sha256", -).annotate({ description: "Device-key algorithm reported at enrollment and signing boundaries." }); - export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact"; export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]); @@ -3355,14 +3594,43 @@ export const V2ExperimentalFeatureListResponse__ExperimentalFeature = Schema.Str }), }); +export type V2ExternalAgentConfigDetectResponse__CommandMigration = { readonly name: string }; +export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Struct({ + name: Schema.String, +}); + export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" - | "MCP_SERVER_CONFIG"; + | "MCP_SERVER_CONFIG" + | "SUBAGENTS" + | "HOOKS" + | "COMMANDS" + | "SESSIONS"; export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = - Schema.Literals(["AGENTS_MD", "CONFIG", "SKILLS", "PLUGINS", "MCP_SERVER_CONFIG"]); + Schema.Literals([ + "AGENTS_MD", + "CONFIG", + "SKILLS", + "PLUGINS", + "MCP_SERVER_CONFIG", + "SUBAGENTS", + "HOOKS", + "COMMANDS", + "SESSIONS", + ]); + +export type V2ExternalAgentConfigDetectResponse__HookMigration = { readonly name: string }; +export const V2ExternalAgentConfigDetectResponse__HookMigration = Schema.Struct({ + name: Schema.String, +}); + +export type V2ExternalAgentConfigDetectResponse__McpServerMigration = { readonly name: string }; +export const V2ExternalAgentConfigDetectResponse__McpServerMigration = Schema.Struct({ + name: Schema.String, +}); export type V2ExternalAgentConfigDetectResponse__PluginsMigration = { readonly marketplaceName: string; @@ -3373,14 +3641,59 @@ export const V2ExternalAgentConfigDetectResponse__PluginsMigration = Schema.Stru pluginNames: Schema.Array(Schema.String), }); +export type V2ExternalAgentConfigDetectResponse__SessionMigration = { + readonly cwd: string; + readonly path: string; + readonly title?: string | null; +}; +export const V2ExternalAgentConfigDetectResponse__SessionMigration = Schema.Struct({ + cwd: Schema.String, + path: Schema.String, + title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + +export type V2ExternalAgentConfigDetectResponse__SubagentMigration = { readonly name: string }; +export const V2ExternalAgentConfigDetectResponse__SubagentMigration = Schema.Struct({ + name: Schema.String, +}); + +export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string }; +export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({ + name: Schema.String, +}); + export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" | "SKILLS" | "PLUGINS" - | "MCP_SERVER_CONFIG"; + | "MCP_SERVER_CONFIG" + | "SUBAGENTS" + | "HOOKS" + | "COMMANDS" + | "SESSIONS"; export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType = - Schema.Literals(["AGENTS_MD", "CONFIG", "SKILLS", "PLUGINS", "MCP_SERVER_CONFIG"]); + Schema.Literals([ + "AGENTS_MD", + "CONFIG", + "SKILLS", + "PLUGINS", + "MCP_SERVER_CONFIG", + "SUBAGENTS", + "HOOKS", + "COMMANDS", + "SESSIONS", + ]); + +export type V2ExternalAgentConfigImportParams__HookMigration = { readonly name: string }; +export const V2ExternalAgentConfigImportParams__HookMigration = Schema.Struct({ + name: Schema.String, +}); + +export type V2ExternalAgentConfigImportParams__McpServerMigration = { readonly name: string }; +export const V2ExternalAgentConfigImportParams__McpServerMigration = Schema.Struct({ + name: Schema.String, +}); export type V2ExternalAgentConfigImportParams__PluginsMigration = { readonly marketplaceName: string; @@ -3391,6 +3704,22 @@ export const V2ExternalAgentConfigImportParams__PluginsMigration = Schema.Struct pluginNames: Schema.Array(Schema.String), }); +export type V2ExternalAgentConfigImportParams__SessionMigration = { + readonly cwd: string; + readonly path: string; + readonly title?: string | null; +}; +export const V2ExternalAgentConfigImportParams__SessionMigration = Schema.Struct({ + cwd: Schema.String, + path: Schema.String, + title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + +export type V2ExternalAgentConfigImportParams__SubagentMigration = { readonly name: string }; +export const V2ExternalAgentConfigImportParams__SubagentMigration = Schema.Struct({ + name: Schema.String, +}); + export type V2FileChangePatchUpdatedNotification__PatchChangeKind = | { readonly type: "add" } | { readonly type: "delete" } @@ -3540,6 +3869,8 @@ export type V2HookCompletedNotification__HookEventName = | "preToolUse" | "permissionRequest" | "postToolUse" + | "preCompact" + | "postCompact" | "sessionStart" | "userPromptSubmit" | "stop"; @@ -3547,6 +3878,8 @@ export const V2HookCompletedNotification__HookEventName = Schema.Literals([ "preToolUse", "permissionRequest", "postToolUse", + "preCompact", + "postCompact", "sessionStart", "userPromptSubmit", "stop", @@ -3593,6 +3926,76 @@ export const V2HookCompletedNotification__HookRunStatus = Schema.Literals([ export type V2HookCompletedNotification__HookScope = "thread" | "turn"; export const V2HookCompletedNotification__HookScope = Schema.Literals(["thread", "turn"]); +export type V2HooksListResponse__AbsolutePathBuf = string; +export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({ + description: + "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +}); + +export type V2HooksListResponse__HookErrorInfo = { + readonly message: string; + readonly path: string; +}; +export const V2HooksListResponse__HookErrorInfo = Schema.Struct({ + message: Schema.String, + path: Schema.String, +}); + +export type V2HooksListResponse__HookEventName = + | "preToolUse" + | "permissionRequest" + | "postToolUse" + | "preCompact" + | "postCompact" + | "sessionStart" + | "userPromptSubmit" + | "stop"; +export const V2HooksListResponse__HookEventName = Schema.Literals([ + "preToolUse", + "permissionRequest", + "postToolUse", + "preCompact", + "postCompact", + "sessionStart", + "userPromptSubmit", + "stop", +]); + +export type V2HooksListResponse__HookHandlerType = "command" | "prompt" | "agent"; +export const V2HooksListResponse__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]); + +export type V2HooksListResponse__HookSource = + | "system" + | "user" + | "project" + | "mdm" + | "sessionFlags" + | "plugin" + | "cloudRequirements" + | "legacyManagedConfigFile" + | "legacyManagedConfigMdm" + | "unknown"; +export const V2HooksListResponse__HookSource = Schema.Literals([ + "system", + "user", + "project", + "mdm", + "sessionFlags", + "plugin", + "cloudRequirements", + "legacyManagedConfigFile", + "legacyManagedConfigMdm", + "unknown", +]); + +export type V2HooksListResponse__HookTrustStatus = "managed" | "untrusted" | "trusted" | "modified"; +export const V2HooksListResponse__HookTrustStatus = Schema.Literals([ + "managed", + "untrusted", + "trusted", + "modified", +]); + export type V2HookStartedNotification__AbsolutePathBuf = string; export const V2HookStartedNotification__AbsolutePathBuf = Schema.String.annotate({ description: @@ -3603,6 +4006,8 @@ export type V2HookStartedNotification__HookEventName = | "preToolUse" | "permissionRequest" | "postToolUse" + | "preCompact" + | "postCompact" | "sessionStart" | "userPromptSubmit" | "stop"; @@ -3610,6 +4015,8 @@ export const V2HookStartedNotification__HookEventName = Schema.Literals([ "preToolUse", "permissionRequest", "postToolUse", + "preCompact", + "postCompact", "sessionStart", "userPromptSubmit", "stop", @@ -3918,7 +4325,6 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccess export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -3932,9 +4338,6 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecia Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -4021,7 +4424,6 @@ export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMo export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = | { readonly kind: "root" } | { readonly kind: "minimal" } - | { readonly kind: "current_working_directory" } | { readonly kind: "project_roots"; readonly subpath?: string | null } | { readonly kind: "tmpdir" } | { readonly kind: "slash_tmp" } @@ -4034,9 +4436,6 @@ export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialP Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ title: "MinimalFileSystemSpecialPath", }), - Schema.Struct({ kind: Schema.Literal("current_working_directory") }).annotate({ - title: "CurrentWorkingDirectoryFileSystemSpecialPath", - }), Schema.Struct({ kind: Schema.Literal("project_roots"), subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -4429,6 +4828,21 @@ export const V2MarketplaceRemoveResponse__AbsolutePathBuf = Schema.String.annota "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); +export type V2MarketplaceUpgradeResponse__AbsolutePathBuf = string; +export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annotate({ + description: + "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +}); + +export type V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = { + readonly marketplaceName: string; + readonly message: string; +}; +export const V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = Schema.Struct({ + marketplaceName: Schema.String, + message: Schema.String, +}); + export type V2McpResourceReadResponse__ResourceContent = | { readonly _meta?: unknown; @@ -4477,6 +4891,17 @@ export const V2ModelListResponse__InputModality = Schema.Literals(["text", "imag export type V2ModelListResponse__ModelAvailabilityNux = { readonly message: string }; export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({ message: Schema.String }); +export type V2ModelListResponse__ModelServiceTier = { + readonly description: string; + readonly id: string; + readonly name: string; +}; +export const V2ModelListResponse__ModelServiceTier = Schema.Struct({ + description: Schema.String, + id: Schema.String, + name: Schema.String, +}); + export type V2ModelListResponse__ModelUpgradeInfo = { readonly migrationMarkdown?: string | null; readonly model: string; @@ -4513,6 +4938,10 @@ export type V2ModelReroutedNotification__ModelRerouteReason = "highRiskCyberActi export const V2ModelReroutedNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity"); +export type V2ModelVerificationNotification__ModelVerification = "trustedAccessForCyber"; +export const V2ModelVerificationNotification__ModelVerification = + Schema.Literal("trustedAccessForCyber"); + export type V2PluginInstallParams__AbsolutePathBuf = string; export const V2PluginInstallParams__AbsolutePathBuf = Schema.String.annotate({ description: @@ -4543,6 +4972,16 @@ export const V2PluginListParams__AbsolutePathBuf = Schema.String.annotate({ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); +export type V2PluginListParams__PluginListMarketplaceKind = + | "local" + | "workspace-directory" + | "shared-with-me"; +export const V2PluginListParams__PluginListMarketplaceKind = Schema.Literals([ + "local", + "workspace-directory", + "shared-with-me", +]); + export type V2PluginListResponse__AbsolutePathBuf = string; export const V2PluginListResponse__AbsolutePathBuf = Schema.String.annotate({ description: @@ -4567,6 +5006,13 @@ export const V2PluginListResponse__PluginInstallPolicy = Schema.Literals([ "INSTALLED_BY_DEFAULT", ]); +export type V2PluginListResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; +export const V2PluginListResponse__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); + export type V2PluginReadParams__AbsolutePathBuf = string; export const V2PluginReadParams__AbsolutePathBuf = Schema.String.annotate({ description: @@ -4594,6 +5040,26 @@ export const V2PluginReadResponse__AppSummary = Schema.Struct({ needsAuth: Schema.Boolean, }).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." }); +export type V2PluginReadResponse__HookEventName = + | "preToolUse" + | "permissionRequest" + | "postToolUse" + | "preCompact" + | "postCompact" + | "sessionStart" + | "userPromptSubmit" + | "stop"; +export const V2PluginReadResponse__HookEventName = Schema.Literals([ + "preToolUse", + "permissionRequest", + "postToolUse", + "preCompact", + "postCompact", + "sessionStart", + "userPromptSubmit", + "stop", +]); + export type V2PluginReadResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]); @@ -4607,18 +5073,81 @@ export const V2PluginReadResponse__PluginInstallPolicy = Schema.Literals([ "INSTALLED_BY_DEFAULT", ]); -export type V2RawResponseItemCompletedNotification__GhostCommit = { - readonly id: string; - readonly parent?: string | null; - readonly preexisting_untracked_dirs: ReadonlyArray; - readonly preexisting_untracked_files: ReadonlyArray; -}; -export const V2RawResponseItemCompletedNotification__GhostCommit = Schema.Struct({ - id: Schema.String, - parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - preexisting_untracked_dirs: Schema.Array(Schema.String), - preexisting_untracked_files: Schema.Array(Schema.String), -}).annotate({ description: "Details of a ghost commit created from a repository state." }); +export type V2PluginReadResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; +export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); + +export type V2PluginShareListResponse__AbsolutePathBuf = string; +export const V2PluginShareListResponse__AbsolutePathBuf = Schema.String.annotate({ + description: + "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +}); + +export type V2PluginShareListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; +export const V2PluginShareListResponse__PluginAuthPolicy = Schema.Literals([ + "ON_INSTALL", + "ON_USE", +]); + +export type V2PluginShareListResponse__PluginInstallPolicy = + | "NOT_AVAILABLE" + | "AVAILABLE" + | "INSTALLED_BY_DEFAULT"; +export const V2PluginShareListResponse__PluginInstallPolicy = Schema.Literals([ + "NOT_AVAILABLE", + "AVAILABLE", + "INSTALLED_BY_DEFAULT", +]); + +export type V2PluginShareListResponse__PluginSharePrincipalType = "user" | "group" | "workspace"; +export const V2PluginShareListResponse__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); + +export type V2PluginShareSaveParams__AbsolutePathBuf = string; +export const V2PluginShareSaveParams__AbsolutePathBuf = Schema.String.annotate({ + description: + "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +}); + +export type V2PluginShareSaveParams__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE"; +export const V2PluginShareSaveParams__PluginShareDiscoverability = Schema.Literals([ + "LISTED", + "UNLISTED", + "PRIVATE", +]); + +export type V2PluginShareSaveParams__PluginSharePrincipalType = "user" | "group" | "workspace"; +export const V2PluginShareSaveParams__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); + +export type V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = + | "user" + | "group" + | "workspace"; +export const V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); + +export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = + | "user" + | "group" + | "workspace"; +export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Schema.Literals([ + "user", + "group", + "workspace", +]); export type V2RawResponseItemCompletedNotification__ImageDetail = | "auto" @@ -4757,6 +5286,14 @@ export const V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction { mode: "oneOf" }, ); +export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus = + | "disabled" + | "connecting" + | "connected" + | "errored"; +export const V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus = + Schema.Literals(["disabled", "connecting", "connected", "errored"]); + export type V2ReviewStartParams__ReviewDelivery = "inline" | "detached"; export const V2ReviewStartParams__ReviewDelivery = Schema.Literals(["inline", "detached"]); @@ -5126,13 +5663,20 @@ export const V2SkillsListResponse__SkillToolDependency = Schema.Struct({ value: Schema.String, }); -export type V2ThreadForkParams__ApprovalsReviewer = "user" | "guardian_subagent"; +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.", +}); + +export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ThreadForkParams__AskForApproval = @@ -5175,8 +5719,12 @@ export const V2ThreadForkParams__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ThreadForkParams__ServiceTier = "fast" | "flex"; -export const V2ThreadForkParams__ServiceTier = Schema.Literals(["fast", "flex"]); +export type V2ThreadForkParams__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadForkParams__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); export type V2ThreadForkResponse__AbsolutePathBuf = string; export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({ @@ -5275,6 +5823,47 @@ export const V2ThreadForkResponse__DynamicToolCallStatus = Schema.Literals([ "failed", ]); +export type V2ThreadForkResponse__FileSystemAccessMode = "read" | "write" | "none"; +export const V2ThreadForkResponse__FileSystemAccessMode = Schema.Literals([ + "read", + "write", + "none", +]); + +export type V2ThreadForkResponse__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { readonly kind: "project_roots"; readonly subpath?: string | null } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null }; +export const V2ThreadForkResponse__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([Schema.String, 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([Schema.String, Schema.Null])), + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadForkResponse__GitInfo = { readonly branch?: string | null; readonly originUrl?: string | null; @@ -5377,6 +5966,13 @@ export const V2ThreadForkResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadForkResponse__PermissionProfileNetworkPermissions = { + readonly enabled: boolean; +}; +export const V2ThreadForkResponse__PermissionProfileNetworkPermissions = Schema.Struct({ + enabled: Schema.Boolean, +}); + export type V2ThreadForkResponse__ReasoningEffort = | "none" | "minimal" @@ -5396,9 +5992,6 @@ export const V2ThreadForkResponse__ReasoningEffort = Schema.Literals([ "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", }); -export type V2ThreadForkResponse__ServiceTier = "fast" | "flex"; -export const V2ThreadForkResponse__ServiceTier = Schema.Literals(["fast", "flex"]); - export type V2ThreadForkResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -5433,6 +6026,13 @@ export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadForkResponse__ThreadId = string; export const V2ThreadForkResponse__ThreadId = Schema.String; +export type V2ThreadForkResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadForkResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadForkResponse__TurnStatus = | "completed" | "interrupted" @@ -5477,9 +6077,27 @@ export const V2ThreadForkResponse__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadGoalUpdatedNotification__ThreadGoalStatus = + | "active" + | "paused" + | "budgetLimited" + | "complete"; +export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals([ + "active", + "paused", + "budgetLimited", + "complete", +]); + export type V2ThreadListParams__SortDirection = "asc" | "desc"; export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]); +export type V2ThreadListParams__ThreadListCwdFilter = string | ReadonlyArray; +export const V2ThreadListParams__ThreadListCwdFilter = Schema.Union([ + Schema.String, + Schema.Array(Schema.String), +]); + export type V2ThreadListParams__ThreadSortKey = "created_at" | "updated_at"; export const V2ThreadListParams__ThreadSortKey = Schema.Literals(["created_at", "updated_at"]); @@ -5729,6 +6347,13 @@ export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadListResponse__ThreadId = string; export const V2ThreadListResponse__ThreadId = Schema.String; +export type V2ThreadListResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadListResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadListResponse__TurnStatus = | "completed" | "interrupted" @@ -6043,6 +6668,16 @@ export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals( export type V2ThreadMetadataUpdateResponse__ThreadId = string; export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String; +export type V2ThreadMetadataUpdateResponse__ThreadSource = + | "user" + | "subagent" + | "memory_consolidation"; +export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadMetadataUpdateResponse__TurnStatus = | "completed" | "interrupted" @@ -6309,6 +6944,13 @@ export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadReadResponse__ThreadId = string; export const V2ThreadReadResponse__ThreadId = Schema.String; +export type V2ThreadReadResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadReadResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadReadResponse__TurnStatus = | "completed" | "interrupted" @@ -6387,13 +7029,20 @@ export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v2", ]); -export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "guardian_subagent"; +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.", +}); + +export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ThreadResumeParams__AskForApproval = @@ -6426,19 +7075,6 @@ export const V2ThreadResumeParams__AskForApproval = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeParams__GhostCommit = { - readonly id: string; - readonly parent?: string | null; - readonly preexisting_untracked_dirs: ReadonlyArray; - readonly preexisting_untracked_files: ReadonlyArray; -}; -export const V2ThreadResumeParams__GhostCommit = Schema.Struct({ - id: Schema.String, - parent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - preexisting_untracked_dirs: Schema.Array(Schema.String), - preexisting_untracked_files: Schema.Array(Schema.String), -}).annotate({ description: "Details of a ghost commit created from a repository state." }); - export type V2ThreadResumeParams__ImageDetail = "auto" | "low" | "high" | "original"; export const V2ThreadResumeParams__ImageDetail = Schema.Literals([ "auto", @@ -6582,9 +7218,6 @@ export const V2ThreadResumeParams__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ThreadResumeParams__ServiceTier = "fast" | "flex"; -export const V2ThreadResumeParams__ServiceTier = Schema.Literals(["fast", "flex"]); - export type V2ThreadResumeResponse__AbsolutePathBuf = string; export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({ description: @@ -6682,6 +7315,47 @@ export const V2ThreadResumeResponse__DynamicToolCallStatus = Schema.Literals([ "failed", ]); +export type V2ThreadResumeResponse__FileSystemAccessMode = "read" | "write" | "none"; +export const V2ThreadResumeResponse__FileSystemAccessMode = Schema.Literals([ + "read", + "write", + "none", +]); + +export type V2ThreadResumeResponse__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { readonly kind: "project_roots"; readonly subpath?: string | null } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null }; +export const V2ThreadResumeResponse__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([Schema.String, 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([Schema.String, Schema.Null])), + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadResumeResponse__GitInfo = { readonly branch?: string | null; readonly originUrl?: string | null; @@ -6784,6 +7458,13 @@ export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadResumeResponse__PermissionProfileNetworkPermissions = { + readonly enabled: boolean; +}; +export const V2ThreadResumeResponse__PermissionProfileNetworkPermissions = Schema.Struct({ + enabled: Schema.Boolean, +}); + export type V2ThreadResumeResponse__ReasoningEffort = | "none" | "minimal" @@ -6803,9 +7484,6 @@ export const V2ThreadResumeResponse__ReasoningEffort = Schema.Literals([ "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", }); -export type V2ThreadResumeResponse__ServiceTier = "fast" | "flex"; -export const V2ThreadResumeResponse__ServiceTier = Schema.Literals(["fast", "flex"]); - export type V2ThreadResumeResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -6840,6 +7518,13 @@ export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadResumeResponse__ThreadId = string; export const V2ThreadResumeResponse__ThreadId = Schema.String; +export type V2ThreadResumeResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadResumeResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadResumeResponse__TurnStatus = | "completed" | "interrupted" @@ -7109,6 +7794,13 @@ export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadRollbackResponse__ThreadId = string; export const V2ThreadRollbackResponse__ThreadId = Schema.String; +export type V2ThreadRollbackResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadRollbackResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadRollbackResponse__TurnStatus = | "completed" | "interrupted" @@ -7385,6 +8077,16 @@ export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([ export type V2ThreadStartedNotification__ThreadId = string; export const V2ThreadStartedNotification__ThreadId = Schema.String; +export type V2ThreadStartedNotification__ThreadSource = + | "user" + | "subagent" + | "memory_consolidation"; +export const V2ThreadStartedNotification__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadStartedNotification__TurnStatus = | "completed" | "interrupted" @@ -7429,13 +8131,20 @@ export const V2ThreadStartedNotification__WebSearchAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartParams__ApprovalsReviewer = "user" | "guardian_subagent"; +export type V2ThreadStartParams__AbsolutePathBuf = string; +export const V2ThreadStartParams__AbsolutePathBuf = Schema.String.annotate({ + description: + "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", +}); + +export type V2ThreadStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2ThreadStartParams__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ThreadStartParams__AskForApproval = @@ -7481,8 +8190,12 @@ export const V2ThreadStartParams__SandboxMode = Schema.Literals([ "danger-full-access", ]); -export type V2ThreadStartParams__ServiceTier = "fast" | "flex"; -export const V2ThreadStartParams__ServiceTier = Schema.Literals(["fast", "flex"]); +export type V2ThreadStartParams__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadStartParams__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear"; export const V2ThreadStartParams__ThreadStartSource = Schema.Literals(["startup", "clear"]); @@ -7584,6 +8297,47 @@ export const V2ThreadStartResponse__DynamicToolCallStatus = Schema.Literals([ "failed", ]); +export type V2ThreadStartResponse__FileSystemAccessMode = "read" | "write" | "none"; +export const V2ThreadStartResponse__FileSystemAccessMode = Schema.Literals([ + "read", + "write", + "none", +]); + +export type V2ThreadStartResponse__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { readonly kind: "project_roots"; readonly subpath?: string | null } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null }; +export const V2ThreadStartResponse__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([Schema.String, 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([Schema.String, Schema.Null])), + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadStartResponse__GitInfo = { readonly branch?: string | null; readonly originUrl?: string | null; @@ -7686,6 +8440,13 @@ export const V2ThreadStartResponse__PatchChangeKind = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadStartResponse__PermissionProfileNetworkPermissions = { + readonly enabled: boolean; +}; +export const V2ThreadStartResponse__PermissionProfileNetworkPermissions = Schema.Struct({ + enabled: Schema.Boolean, +}); + export type V2ThreadStartResponse__ReasoningEffort = | "none" | "minimal" @@ -7705,9 +8466,6 @@ export const V2ThreadStartResponse__ReasoningEffort = Schema.Literals([ "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", }); -export type V2ThreadStartResponse__ServiceTier = "fast" | "flex"; -export const V2ThreadStartResponse__ServiceTier = Schema.Literals(["fast", "flex"]); - export type V2ThreadStartResponse__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -7742,6 +8500,13 @@ export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadStartResponse__ThreadId = string; export const V2ThreadStartResponse__ThreadId = Schema.String; +export type V2ThreadStartResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadStartResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadStartResponse__TurnStatus = | "completed" | "interrupted" @@ -7809,260 +8574,6 @@ export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), }); -export type V2ThreadTurnsListParams__SortDirection = "asc" | "desc"; -export const V2ThreadTurnsListParams__SortDirection = Schema.Literals(["asc", "desc"]); - -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__CollabAgentStatus = - | "pendingInit" - | "running" - | "interrupted" - | "completed" - | "errored" - | "shutdown" - | "notFound"; -export const V2ThreadTurnsListResponse__CollabAgentStatus = Schema.Literals([ - "pendingInit", - "running", - "interrupted", - "completed", - "errored", - "shutdown", - "notFound", -]); - -export type V2ThreadTurnsListResponse__CommandExecutionStatus = - | "inProgress" - | "completed" - | "failed" - | "declined"; -export const V2ThreadTurnsListResponse__CommandExecutionStatus = Schema.Literals([ - "inProgress", - "completed", - "failed", - "declined", -]); - -export type V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem = - | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; -export const V2ThreadTurnsListResponse__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" }), - ], - { mode: "oneOf" }, -); - -export type V2ThreadTurnsListResponse__DynamicToolCallStatus = - | "inProgress" - | "completed" - | "failed"; -export const V2ThreadTurnsListResponse__DynamicToolCallStatus = Schema.Literals([ - "inProgress", - "completed", - "failed", -]); - -export type V2ThreadTurnsListResponse__HookPromptFragment = { - readonly hookRunId: string; - readonly text: string; -}; -export const V2ThreadTurnsListResponse__HookPromptFragment = Schema.Struct({ - hookRunId: Schema.String, - text: Schema.String, -}); - -export type V2ThreadTurnsListResponse__McpToolCallError = { readonly message: string }; -export const V2ThreadTurnsListResponse__McpToolCallError = Schema.Struct({ - message: Schema.String, -}); - -export type V2ThreadTurnsListResponse__McpToolCallResult = { - readonly _meta?: unknown; - readonly content: ReadonlyArray; - readonly structuredContent?: unknown; -}; -export const V2ThreadTurnsListResponse__McpToolCallResult = Schema.Struct({ - _meta: Schema.optionalKey(Schema.Unknown), - content: Schema.Array(Schema.Unknown), - structuredContent: Schema.optionalKey(Schema.Unknown), -}); - -export type V2ThreadTurnsListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed"; -export const V2ThreadTurnsListResponse__McpToolCallStatus = Schema.Literals([ - "inProgress", - "completed", - "failed", -]); - -export type V2ThreadTurnsListResponse__MemoryCitationEntry = { - readonly lineEnd: number; - readonly lineStart: number; - readonly note: string; - readonly path: string; -}; -export const V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__MessagePhase = "commentary" | "final_answer"; -export const V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__NonSteerableTurnKind = "review" | "compact"; -export const V2ThreadTurnsListResponse__NonSteerableTurnKind = Schema.Literals([ - "review", - "compact", -]); - -export type V2ThreadTurnsListResponse__PatchApplyStatus = - | "inProgress" - | "completed" - | "failed" - | "declined"; -export const V2ThreadTurnsListResponse__PatchApplyStatus = Schema.Literals([ - "inProgress", - "completed", - "failed", - "declined", -]); - -export type V2ThreadTurnsListResponse__PatchChangeKind = - | { readonly type: "add" } - | { readonly type: "delete" } - | { readonly move_path?: string | null; readonly type: "update" }; -export const V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__ReasoningEffort = - | "none" - | "minimal" - | "low" - | "medium" - | "high" - | "xhigh"; -export const V2ThreadTurnsListResponse__ReasoningEffort = Schema.Literals([ - "none", - "minimal", - "low", - "medium", - "high", - "xhigh", -]).annotate({ - description: - "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", -}); - -export type V2ThreadTurnsListResponse__TextElement = { - readonly byteRange: { readonly end: number; readonly start: number }; - readonly placeholder?: string | null; -}; -export const V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__TurnStatus = - | "completed" - | "interrupted" - | "failed" - | "inProgress"; -export const V2ThreadTurnsListResponse__TurnStatus = Schema.Literals([ - "completed", - "interrupted", - "failed", - "inProgress", -]); - -export type V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__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 V2ThreadUnarchiveResponse__AbsolutePathBuf = string; export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({ description: @@ -8295,6 +8806,13 @@ export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([ export type V2ThreadUnarchiveResponse__ThreadId = string; export const V2ThreadUnarchiveResponse__ThreadId = Schema.String; +export type V2ThreadUnarchiveResponse__ThreadSource = "user" | "subagent" | "memory_consolidation"; +export const V2ThreadUnarchiveResponse__ThreadSource = Schema.Literals([ + "user", + "subagent", + "memory_consolidation", +]); + export type V2ThreadUnarchiveResponse__TurnStatus = | "completed" | "interrupted" @@ -8867,13 +9385,14 @@ export const V2TurnStartParams__AbsolutePathBuf = Schema.String.annotate({ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", }); -export type V2TurnStartParams__ApprovalsReviewer = "user" | "guardian_subagent"; +export type V2TurnStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2TurnStartParams__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2TurnStartParams__AskForApproval = @@ -8945,9 +9464,6 @@ export const V2TurnStartParams__ReasoningSummary = Schema.Union( "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries", }); -export type V2TurnStartParams__ServiceTier = "fast" | "flex"; -export const V2TurnStartParams__ServiceTier = Schema.Literals(["fast", "flex"]); - export type V2TurnStartParams__TextElement = { readonly byteRange: { readonly end: number; readonly start: number }; readonly placeholder?: string | null; @@ -9237,6 +9753,16 @@ export const V2TurnSteerParams__TextElement = Schema.Struct({ ), }); +export type V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness = + | "ready" + | "notConfigured" + | "updateRequired"; +export const V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness = Schema.Literals([ + "ready", + "notConfigured", + "updateRequired", +]); + export type V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode = | "elevated" | "unelevated"; @@ -9266,6 +9792,25 @@ export const ApplyPatchApprovalResponse__NetworkPolicyAmendment = Schema.Struct( host: Schema.String, }); +export type ClientRequest__PermissionProfileModificationParams = { + readonly path: ClientRequest__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const ClientRequest__PermissionProfileModificationParams = Schema.Union( + [ + Schema.Struct({ + path: ClientRequest__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParamsType", + }), + }).annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParams", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + export type ClientRequest__PluginInstallParams = { readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null; readonly pluginName: string; @@ -9277,21 +9822,6 @@ export const ClientRequest__PluginInstallParams = Schema.Struct({ remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ClientRequest__PluginListParams = { - readonly cwds?: 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, - ]), - ), -}); - export type ClientRequest__PluginReadParams = { readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null; readonly pluginName: string; @@ -9305,29 +9835,12 @@ export const ClientRequest__PluginReadParams = Schema.Struct({ export type ClientRequest__SandboxPolicy = | { readonly type: "dangerFullAccess" } - | { - readonly access?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly networkAccess?: boolean; - readonly type: "readOnly"; - } + | { readonly networkAccess?: boolean; readonly type: "readOnly" } | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { readonly excludeSlashTmp?: boolean; readonly excludeTmpdirEnvVar?: boolean; readonly networkAccess?: boolean; - readonly readOnlyAccess?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; readonly type: "workspaceWrite"; readonly writableRoots?: ReadonlyArray; }; @@ -9339,29 +9852,6 @@ export const ClientRequest__SandboxPolicy = Schema.Union( }), }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ - access: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), }).annotate({ title: "ReadOnlySandboxPolicy" }), @@ -9377,29 +9867,6 @@ export const ClientRequest__SandboxPolicy = Schema.Union( excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - readOnlyAccess: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), writableRoots: Schema.optionalKey( Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), @@ -9433,20 +9900,27 @@ export const ClientRequest__SendAddCreditsNudgeEmailParams = Schema.Struct({ creditType: ClientRequest__AddCreditsNudgeCreditType, }); -export type ClientRequest__DeviceKeyCreateParams = { - readonly accountUserId: string; - readonly clientId: string; - readonly protectionPolicy?: ClientRequest__DeviceKeyProtectionPolicy | null; -}; -export const ClientRequest__DeviceKeyCreateParams = Schema.Struct({ - accountUserId: Schema.String, - clientId: Schema.String, - protectionPolicy: Schema.optionalKey( - Schema.Union([ClientRequest__DeviceKeyProtectionPolicy, Schema.Null]).annotate({ - description: "Defaults to `hardware_only` when omitted.", - }), - ), -}).annotate({ description: "Create a controller-local device key with a random key id." }); +export type ClientRequest__FileSystemPath = + | { readonly path: ClientRequest__AbsolutePathBuf; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: ClientRequest__FileSystemSpecialPath }; +export const ClientRequest__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: ClientRequest__AbsolutePathBuf, + 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: ClientRequest__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); export type ClientRequest__ContentItem = | { readonly text: string; readonly type: "input_text" } @@ -9582,11 +10056,38 @@ export const ClientRequest__ConfigValueWriteParams = Schema.Struct({ value: Schema.Unknown, }); -export type ClientRequest__MigrationDetails = { - readonly plugins: ReadonlyArray; +export type ClientRequest__PluginListParams = { + readonly cwds?: ReadonlyArray | null; + readonly marketplaceKinds?: ReadonlyArray | null; }; -export const ClientRequest__MigrationDetails = Schema.Struct({ - plugins: Schema.Array(ClientRequest__PluginsMigration), +export const ClientRequest__PluginListParams = Schema.Struct({ + cwds: Schema.optionalKey( + Schema.Union([ + Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ + description: + "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.", + }), + Schema.Null, + ]), + ), + marketplaceKinds: Schema.optionalKey( + Schema.Union([ + Schema.Array(ClientRequest__PluginListMarketplaceKind).annotate({ + description: + "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.", + }), + Schema.Null, + ]), + ), +}); + +export type ClientRequest__PluginShareTarget = { + readonly principalId: string; + readonly principalType: ClientRequest__PluginSharePrincipalType; +}; +export const ClientRequest__PluginShareTarget = Schema.Struct({ + principalId: Schema.String, + principalType: ClientRequest__PluginSharePrincipalType, }); export type ClientRequest__Settings = { @@ -9600,102 +10101,6 @@ export const ClientRequest__Settings = Schema.Struct({ reasoning_effort: Schema.optionalKey(Schema.Union([ClientRequest__ReasoningEffort, Schema.Null])), }).annotate({ description: "Settings for a collaboration mode." }); -export type ClientRequest__DeviceKeySignPayload = - | { - readonly accountUserId: string; - readonly audience: ClientRequest__RemoteControlClientConnectionAudience; - readonly clientId: string; - readonly nonce: string; - readonly scopes: ReadonlyArray; - readonly sessionId: string; - readonly targetOrigin: string; - readonly targetPath: string; - readonly tokenExpiresAt: number; - readonly tokenSha256Base64url: string; - readonly type: "remoteControlClientConnection"; - } - | { - readonly accountUserId: string; - readonly audience: ClientRequest__RemoteControlClientEnrollmentAudience; - readonly challengeExpiresAt: number; - readonly challengeId: string; - readonly clientId: string; - readonly deviceIdentitySha256Base64url: string; - readonly nonce: string; - readonly targetOrigin: string; - readonly targetPath: string; - readonly type: "remoteControlClientEnrollment"; - }; -export const ClientRequest__DeviceKeySignPayload = Schema.Union( - [ - Schema.Struct({ - accountUserId: Schema.String, - audience: ClientRequest__RemoteControlClientConnectionAudience, - clientId: Schema.String, - nonce: Schema.String, - scopes: Schema.Array(Schema.String).annotate({ - description: "Must contain exactly `remote_control_controller_websocket`.", - }), - sessionId: Schema.String.annotate({ - description: "Backend-issued websocket session id that this proof authorizes.", - }), - targetOrigin: Schema.String.annotate({ - description: - "Origin of the backend endpoint that issued the challenge and will verify this proof.", - }), - targetPath: Schema.String.annotate({ - description: "Websocket route path that this proof authorizes.", - }), - tokenExpiresAt: Schema.Number.annotate({ - description: "Remote-control token expiration as Unix seconds.", - format: "int64", - }).check(Schema.isInt()), - tokenSha256Base64url: Schema.String.annotate({ - description: - "SHA-256 of the controller-scoped remote-control token, encoded as unpadded base64url.", - }), - type: Schema.Literal("remoteControlClientConnection").annotate({ - title: "RemoteControlClientConnectionDeviceKeySignPayloadType", - }), - }).annotate({ - title: "RemoteControlClientConnectionDeviceKeySignPayload", - description: - "Payload bound to one remote-control controller websocket `/client` connection challenge.", - }), - Schema.Struct({ - accountUserId: Schema.String, - audience: ClientRequest__RemoteControlClientEnrollmentAudience, - challengeExpiresAt: Schema.Number.annotate({ - description: "Enrollment challenge expiration as Unix seconds.", - format: "int64", - }).check(Schema.isInt()), - challengeId: Schema.String.annotate({ - description: "Backend-issued enrollment challenge id that this proof authorizes.", - }), - clientId: Schema.String, - deviceIdentitySha256Base64url: Schema.String.annotate({ - description: - "SHA-256 of the requested device identity operation, encoded as unpadded base64url.", - }), - nonce: Schema.String, - targetOrigin: Schema.String.annotate({ - description: - "Origin of the backend endpoint that issued the challenge and will verify this proof.", - }), - targetPath: Schema.String.annotate({ - description: "HTTP route path that this proof authorizes.", - }), - type: Schema.Literal("remoteControlClientEnrollment").annotate({ - title: "RemoteControlClientEnrollmentDeviceKeySignPayloadType", - }), - }).annotate({ - title: "RemoteControlClientEnrollmentDeviceKeySignPayload", - description: "Payload bound to a remote-control client `/client/enroll` ownership challenge.", - }), - ], - { mode: "oneOf" }, -).annotate({ description: "Structured payloads accepted by `device/key/sign`." }); - export type ClientRequest__ReviewStartParams = { readonly delivery?: ClientRequest__ReviewDelivery | null; readonly target: ClientRequest__ReviewTarget; @@ -9712,54 +10117,6 @@ export const ClientRequest__ReviewStartParams = Schema.Struct({ threadId: Schema.String, }); -export type ClientRequest__ThreadForkParams = { - readonly approvalPolicy?: ClientRequest__AskForApproval | null; - readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; - readonly baseInstructions?: string | null; - readonly config?: { readonly [x: string]: unknown } | null; - readonly cwd?: string | null; - readonly developerInstructions?: string | null; - readonly ephemeral?: boolean; - readonly model?: string | null; - readonly modelProvider?: string | null; - readonly sandbox?: ClientRequest__SandboxMode | null; - readonly serviceTier?: ClientRequest__ServiceTier | null | null; - readonly threadId: string; -}; -export const ClientRequest__ThreadForkParams = Schema.Struct({ - approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])), - approvalsReviewer: Schema.optionalKey( - Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({ - description: - "Override where approval requests are routed for review on this thread and subsequent turns.", - }), - ), - baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - config: Schema.optionalKey( - Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]), - ), - cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - ephemeral: Schema.optionalKey(Schema.Boolean), - model: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Configuration overrides for the forked thread, if any.", - }), - Schema.Null, - ]), - ), - modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]), - ), - threadId: Schema.String, -}).annotate({ - description: - "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", -}); - export type ClientRequest__ThreadResumeParams = { readonly approvalPolicy?: ClientRequest__AskForApproval | null; readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; @@ -9771,7 +10128,7 @@ export type ClientRequest__ThreadResumeParams = { readonly modelProvider?: string | null; readonly personality?: ClientRequest__Personality | null; readonly sandbox?: ClientRequest__SandboxMode | null; - readonly serviceTier?: ClientRequest__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly threadId: string; }; export const ClientRequest__ThreadResumeParams = Schema.Struct({ @@ -9799,9 +10156,7 @@ export const ClientRequest__ThreadResumeParams = Schema.Struct({ modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]), - ), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, }).annotate({ description: @@ -9834,35 +10189,31 @@ export const ClientRequest__SkillsListParams = Schema.Struct({ ), }); -export type ClientRequest__ThreadTurnsListParams = { - readonly cursor?: string | null; - readonly limit?: number | null; - readonly sortDirection?: ClientRequest__SortDirection | null; - readonly threadId: string; +export type ClientRequest__MigrationDetails = { + readonly commands?: ReadonlyArray; + readonly hooks?: ReadonlyArray; + readonly mcpServers?: ReadonlyArray; + readonly plugins?: ReadonlyArray; + readonly sessions?: ReadonlyArray; + readonly subagents?: ReadonlyArray; }; -export const ClientRequest__ThreadTurnsListParams = Schema.Struct({ - cursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Opaque cursor to pass to the next call to continue after the last turn.", - }), - Schema.Null, - ]), +export const ClientRequest__MigrationDetails = Schema.Struct({ + commands: Schema.optionalKey( + Schema.Array(ClientRequest__CommandMigration).annotate({ default: [] }), ), - limit: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ description: "Optional turn page size.", format: "uint32" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(0)), - Schema.Null, - ]), + hooks: Schema.optionalKey(Schema.Array(ClientRequest__HookMigration).annotate({ default: [] })), + mcpServers: Schema.optionalKey( + Schema.Array(ClientRequest__McpServerMigration).annotate({ default: [] }), ), - sortDirection: Schema.optionalKey( - Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({ - description: "Optional turn pagination direction; defaults to descending.", - }), + plugins: Schema.optionalKey( + Schema.Array(ClientRequest__PluginsMigration).annotate({ default: [] }), + ), + sessions: Schema.optionalKey( + Schema.Array(ClientRequest__SessionMigration).annotate({ default: [] }), + ), + subagents: Schema.optionalKey( + Schema.Array(ClientRequest__SubagentMigration).annotate({ default: [] }), ), - threadId: Schema.String, }); export type ClientRequest__UserInput = @@ -9923,16 +10274,70 @@ export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({ threadId: Schema.String, }); +export type ClientRequest__ThreadForkParams = { + readonly approvalPolicy?: ClientRequest__AskForApproval | null; + readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; + readonly baseInstructions?: string | null; + readonly config?: { readonly [x: string]: unknown } | null; + readonly cwd?: string | null; + readonly developerInstructions?: string | null; + readonly ephemeral?: boolean; + readonly model?: string | null; + readonly modelProvider?: string | null; + readonly sandbox?: ClientRequest__SandboxMode | null; + readonly serviceTier?: string | null; + readonly threadId: string; + readonly threadSource?: ClientRequest__ThreadSource | null; +}; +export const ClientRequest__ThreadForkParams = Schema.Struct({ + approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])), + approvalsReviewer: Schema.optionalKey( + Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({ + description: + "Override where approval requests are routed for review on this thread and subsequent turns.", + }), + ), + baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + config: Schema.optionalKey( + Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]), + ), + cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + ephemeral: Schema.optionalKey(Schema.Boolean), + model: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: "Configuration overrides for the forked thread, if any.", + }), + Schema.Null, + ]), + ), + modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + threadId: Schema.String, + threadSource: Schema.optionalKey( + Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({ + description: + "Optional client-supplied analytics source classification for this forked thread.", + }), + ), +}).annotate({ + description: + "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", +}); + export type ClientRequest__ThreadListParams = { readonly archived?: boolean | null; readonly cursor?: string | null; - readonly cwd?: string | null; + readonly cwd?: ClientRequest__ThreadListCwdFilter | null; readonly limit?: number | null; readonly modelProviders?: ReadonlyArray | null; readonly searchTerm?: string | null; readonly sortDirection?: ClientRequest__SortDirection | null; readonly sortKey?: ClientRequest__ThreadSortKey | null; readonly sourceKinds?: ReadonlyArray | null; + readonly useStateDbOnly?: boolean; }; export const ClientRequest__ThreadListParams = Schema.Struct({ archived: Schema.optionalKey( @@ -9953,13 +10358,10 @@ export const ClientRequest__ThreadListParams = Schema.Struct({ ]), ), cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.", - }), - Schema.Null, - ]), + 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([ @@ -10008,6 +10410,12 @@ export const ClientRequest__ThreadListParams = Schema.Struct({ Schema.Null, ]), ), + useStateDbOnly: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.", + }), + ), }); export type ClientRequest__ThreadStartParams = { @@ -10023,8 +10431,9 @@ export type ClientRequest__ThreadStartParams = { readonly personality?: ClientRequest__Personality | null; readonly sandbox?: ClientRequest__SandboxMode | null; readonly serviceName?: string | null; - readonly serviceTier?: ClientRequest__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly sessionStartSource?: ClientRequest__ThreadStartSource | null; + readonly threadSource?: ClientRequest__ThreadSource | null; }; export const ClientRequest__ThreadStartParams = Schema.Struct({ approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])), @@ -10046,12 +10455,15 @@ export const ClientRequest__ThreadStartParams = Schema.Struct({ personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])), serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), 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__WindowsSandboxSetupStartParams = { @@ -10660,10 +11072,22 @@ export const ServerNotification__ModelReroutedNotification = Schema.Struct({ turnId: Schema.String, }); +export type ServerNotification__ModelVerificationNotification = { + readonly threadId: string; + readonly turnId: string; + readonly verifications: ReadonlyArray; +}; +export const ServerNotification__ModelVerificationNotification = Schema.Struct({ + threadId: Schema.String, + turnId: Schema.String, + verifications: Schema.Array(ServerNotification__ModelVerification), +}); + export type ServerNotification__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -10685,6 +11109,7 @@ export const ServerNotification__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -10806,16 +11231,27 @@ export const ServerNotification__RateLimitSnapshot = Schema.Struct({ }); export type ServerNotification__ThreadRealtimeStartedNotification = { - readonly sessionId?: string | null; + readonly realtimeSessionId?: string | null; readonly threadId: string; readonly version: ServerNotification__RealtimeConversationVersion; }; export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Struct({ - sessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + 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." }); +export type ServerNotification__RemoteControlStatusChangedNotification = { + readonly environmentId?: string | null; + readonly status: ServerNotification__RemoteControlConnectionStatus; +}; +export const ServerNotification__RemoteControlStatusChangedNotification = Schema.Struct({ + environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + status: ServerNotification__RemoteControlConnectionStatus, +}).annotate({ + description: "Current remote-control connection status and environment id exposed to clients.", +}); + export type ServerNotification__ServerRequestResolvedNotification = { readonly requestId: ServerNotification__RequestId; readonly threadId: string; @@ -10905,6 +11341,29 @@ export const ServerNotification__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type ServerNotification__ThreadGoal = { + readonly createdAt: number; + readonly objective: string; + readonly status: ServerNotification__ThreadGoalStatus; + readonly threadId: string; + readonly timeUsedSeconds: number; + readonly tokenBudget?: number | null; + readonly tokensUsed: number; + readonly updatedAt: number; +}; +export const ServerNotification__ThreadGoal = Schema.Struct({ + createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + objective: Schema.String, + status: ServerNotification__ThreadGoalStatus, + threadId: Schema.String, + timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + tokenBudget: Schema.optionalKey( + Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), + ), + tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), +}); + export type ServerNotification__SubAgentSource = | "review" | "compact" @@ -11418,29 +11877,12 @@ export const V2AppsListResponse__AppMetadata = Schema.Struct({ export type V2CommandExecParams__SandboxPolicy = | { readonly type: "dangerFullAccess" } - | { - readonly access?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly networkAccess?: boolean; - readonly type: "readOnly"; - } + | { readonly networkAccess?: boolean; readonly type: "readOnly" } | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { readonly excludeSlashTmp?: boolean; readonly excludeTmpdirEnvVar?: boolean; readonly networkAccess?: boolean; - readonly readOnlyAccess?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; readonly type: "workspaceWrite"; readonly writableRoots?: ReadonlyArray; }; @@ -11452,29 +11894,6 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union( }), }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ - access: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), }).annotate({ title: "ReadOnlySandboxPolicy" }), @@ -11490,29 +11909,6 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union( excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - readOnlyAccess: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), writableRoots: Schema.optionalKey( Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), @@ -11522,6 +11918,28 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union( { mode: "oneOf" }, ); +export type V2CommandExecParams__FileSystemPath = + | { readonly path: V2CommandExecParams__AbsolutePathBuf; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: V2CommandExecParams__FileSystemSpecialPath }; +export const V2CommandExecParams__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: V2CommandExecParams__AbsolutePathBuf, + 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: V2CommandExecParams__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); + export type V2ConfigBatchWriteParams__ConfigEdit = { readonly keyPath: string; readonly mergeStrategy: V2ConfigBatchWriteParams__MergeStrategy; @@ -11623,6 +12041,15 @@ export const V2ConfigReadResponse__WebSearchToolConfig = Schema.Struct({ ), }); +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])), +}); + export type V2ConfigRequirementsReadResponse__ConfigRequirements = { readonly allowedApprovalPolicies?: ReadonlyArray | null; readonly allowedSandboxModes?: ReadonlyArray | null; @@ -11732,106 +12159,11 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union( { mode: "oneOf" }, ); -export type V2DeviceKeySignParams__DeviceKeySignPayload = - | { - readonly accountUserId: string; - readonly audience: V2DeviceKeySignParams__RemoteControlClientConnectionAudience; - readonly clientId: string; - readonly nonce: string; - readonly scopes: ReadonlyArray; - readonly sessionId: string; - readonly targetOrigin: string; - readonly targetPath: string; - readonly tokenExpiresAt: number; - readonly tokenSha256Base64url: string; - readonly type: "remoteControlClientConnection"; - } - | { - readonly accountUserId: string; - readonly audience: V2DeviceKeySignParams__RemoteControlClientEnrollmentAudience; - readonly challengeExpiresAt: number; - readonly challengeId: string; - readonly clientId: string; - readonly deviceIdentitySha256Base64url: string; - readonly nonce: string; - readonly targetOrigin: string; - readonly targetPath: string; - readonly type: "remoteControlClientEnrollment"; - }; -export const V2DeviceKeySignParams__DeviceKeySignPayload = Schema.Union( - [ - Schema.Struct({ - accountUserId: Schema.String, - audience: V2DeviceKeySignParams__RemoteControlClientConnectionAudience, - clientId: Schema.String, - nonce: Schema.String, - scopes: Schema.Array(Schema.String).annotate({ - description: "Must contain exactly `remote_control_controller_websocket`.", - }), - sessionId: Schema.String.annotate({ - description: "Backend-issued websocket session id that this proof authorizes.", - }), - targetOrigin: Schema.String.annotate({ - description: - "Origin of the backend endpoint that issued the challenge and will verify this proof.", - }), - targetPath: Schema.String.annotate({ - description: "Websocket route path that this proof authorizes.", - }), - tokenExpiresAt: Schema.Number.annotate({ - description: "Remote-control token expiration as Unix seconds.", - format: "int64", - }).check(Schema.isInt()), - tokenSha256Base64url: Schema.String.annotate({ - description: - "SHA-256 of the controller-scoped remote-control token, encoded as unpadded base64url.", - }), - type: Schema.Literal("remoteControlClientConnection").annotate({ - title: "RemoteControlClientConnectionDeviceKeySignPayloadType", - }), - }).annotate({ - title: "RemoteControlClientConnectionDeviceKeySignPayload", - description: - "Payload bound to one remote-control controller websocket `/client` connection challenge.", - }), - Schema.Struct({ - accountUserId: Schema.String, - audience: V2DeviceKeySignParams__RemoteControlClientEnrollmentAudience, - challengeExpiresAt: Schema.Number.annotate({ - description: "Enrollment challenge expiration as Unix seconds.", - format: "int64", - }).check(Schema.isInt()), - challengeId: Schema.String.annotate({ - description: "Backend-issued enrollment challenge id that this proof authorizes.", - }), - clientId: Schema.String, - deviceIdentitySha256Base64url: Schema.String.annotate({ - description: - "SHA-256 of the requested device identity operation, encoded as unpadded base64url.", - }), - nonce: Schema.String, - targetOrigin: Schema.String.annotate({ - description: - "Origin of the backend endpoint that issued the challenge and will verify this proof.", - }), - targetPath: Schema.String.annotate({ - description: "HTTP route path that this proof authorizes.", - }), - type: Schema.Literal("remoteControlClientEnrollment").annotate({ - title: "RemoteControlClientEnrollmentDeviceKeySignPayloadType", - }), - }).annotate({ - title: "RemoteControlClientEnrollmentDeviceKeySignPayload", - description: "Payload bound to a remote-control client `/client/enroll` ownership challenge.", - }), - ], - { mode: "oneOf" }, -).annotate({ description: "Structured payloads accepted by `device/key/sign`." }); - export type V2ErrorNotification__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -11853,6 +12185,7 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -11935,17 +12268,61 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union( }); export type V2ExternalAgentConfigDetectResponse__MigrationDetails = { - readonly plugins: ReadonlyArray; + readonly commands?: ReadonlyArray; + readonly hooks?: ReadonlyArray; + readonly mcpServers?: ReadonlyArray; + readonly plugins?: ReadonlyArray; + readonly sessions?: ReadonlyArray; + readonly subagents?: ReadonlyArray; }; export const V2ExternalAgentConfigDetectResponse__MigrationDetails = Schema.Struct({ - plugins: Schema.Array(V2ExternalAgentConfigDetectResponse__PluginsMigration), + 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: [] }), + ), + plugins: Schema.optionalKey( + Schema.Array(V2ExternalAgentConfigDetectResponse__PluginsMigration).annotate({ default: [] }), + ), + sessions: Schema.optionalKey( + Schema.Array(V2ExternalAgentConfigDetectResponse__SessionMigration).annotate({ default: [] }), + ), + subagents: Schema.optionalKey( + Schema.Array(V2ExternalAgentConfigDetectResponse__SubagentMigration).annotate({ default: [] }), + ), }); export type V2ExternalAgentConfigImportParams__MigrationDetails = { - readonly plugins: ReadonlyArray; + readonly commands?: ReadonlyArray; + readonly hooks?: ReadonlyArray; + readonly mcpServers?: ReadonlyArray; + readonly plugins?: ReadonlyArray; + readonly sessions?: ReadonlyArray; + readonly subagents?: ReadonlyArray; }; export const V2ExternalAgentConfigImportParams__MigrationDetails = Schema.Struct({ - plugins: Schema.Array(V2ExternalAgentConfigImportParams__PluginsMigration), + 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: [] }), + ), + plugins: Schema.optionalKey( + Schema.Array(V2ExternalAgentConfigImportParams__PluginsMigration).annotate({ default: [] }), + ), + sessions: Schema.optionalKey( + Schema.Array(V2ExternalAgentConfigImportParams__SessionMigration).annotate({ default: [] }), + ), + subagents: Schema.optionalKey( + Schema.Array(V2ExternalAgentConfigImportParams__SubagentMigration).annotate({ default: [] }), + ), }); export type V2FileChangePatchUpdatedNotification__FileUpdateChange = { @@ -11994,7 +12371,8 @@ export type V2GetAccountResponse__Account = readonly email: string; readonly planType: V2GetAccountResponse__PlanType; readonly type: "chatgpt"; - }; + } + | { readonly type: "amazonBedrock" }; export const V2GetAccountResponse__Account = Schema.Union( [ Schema.Struct({ @@ -12005,6 +12383,9 @@ export const V2GetAccountResponse__Account = Schema.Union( planType: V2GetAccountResponse__PlanType, type: Schema.Literal("chatgpt").annotate({ title: "ChatgptAccountType" }), }).annotate({ title: "ChatgptAccount" }), + Schema.Struct({ + type: Schema.Literal("amazonBedrock").annotate({ title: "AmazonBedrockAccountType" }), + }).annotate({ title: "AmazonBedrockAccount" }), ], { mode: "oneOf" }, ); @@ -12018,6 +12399,43 @@ export const V2HookCompletedNotification__HookOutputEntry = Schema.Struct({ text: Schema.String, }); +export type V2HooksListResponse__HookMetadata = { + readonly command?: string | null; + readonly currentHash: string; + readonly displayOrder: number; + readonly enabled: boolean; + readonly eventName: V2HooksListResponse__HookEventName; + readonly handlerType: V2HooksListResponse__HookHandlerType; + readonly isManaged: boolean; + readonly key: string; + readonly matcher?: string | null; + readonly pluginId?: string | null; + readonly source: V2HooksListResponse__HookSource; + readonly sourcePath: V2HooksListResponse__AbsolutePathBuf; + readonly statusMessage?: string | null; + readonly timeoutSec: number; + readonly trustStatus: V2HooksListResponse__HookTrustStatus; +}; +export const V2HooksListResponse__HookMetadata = Schema.Struct({ + command: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + currentHash: Schema.String, + displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + enabled: Schema.Boolean, + eventName: V2HooksListResponse__HookEventName, + handlerType: V2HooksListResponse__HookHandlerType, + isManaged: Schema.Boolean, + key: Schema.String, + matcher: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + source: V2HooksListResponse__HookSource, + sourcePath: V2HooksListResponse__AbsolutePathBuf, + statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + timeoutSec: Schema.Number.annotate({ format: "uint64" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + trustStatus: V2HooksListResponse__HookTrustStatus, +}); + export type V2HookStartedNotification__HookOutputEntry = { readonly kind: V2HookStartedNotification__HookOutputEntryKind; readonly text: string; @@ -12503,6 +12921,17 @@ export const V2PluginListResponse__PluginSource = Schema.Union( { mode: "oneOf" }, ); +export type V2PluginListResponse__PluginSharePrincipal = { + readonly name: string; + readonly principalId: string; + readonly principalType: V2PluginListResponse__PluginSharePrincipalType; +}; +export const V2PluginListResponse__PluginSharePrincipal = Schema.Struct({ + name: Schema.String, + principalId: Schema.String, + principalType: V2PluginListResponse__PluginSharePrincipalType, +}); + export type V2PluginReadResponse__PluginInterface = { readonly brandColor?: string | null; readonly capabilities: ReadonlyArray; @@ -12623,6 +13052,169 @@ export const V2PluginReadResponse__SkillInterface = Schema.Struct({ shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2PluginReadResponse__PluginHookSummary = { + readonly eventName: V2PluginReadResponse__HookEventName; + readonly key: string; +}; +export const V2PluginReadResponse__PluginHookSummary = Schema.Struct({ + eventName: V2PluginReadResponse__HookEventName, + key: Schema.String, +}); + +export type V2PluginReadResponse__PluginSharePrincipal = { + readonly name: string; + readonly principalId: string; + readonly principalType: V2PluginReadResponse__PluginSharePrincipalType; +}; +export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({ + name: Schema.String, + principalId: Schema.String, + principalType: V2PluginReadResponse__PluginSharePrincipalType, +}); + +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 logoUrl?: 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.", + }), + ), + logoUrl: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ description: "Remote logo URL from the plugin catalog." }), + Schema.Null, + ]), + ), + longDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + privacyPolicyUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + screenshotUrls: Schema.Array(Schema.String).annotate({ + description: "Remote screenshot URLs from the plugin catalog.", + }), + screenshots: Schema.Array(V2PluginShareListResponse__AbsolutePathBuf).annotate({ + description: "Local screenshot paths, resolved from the installed plugin package.", + }), + shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + +export type V2PluginShareListResponse__PluginSource = + | { readonly path: V2PluginShareListResponse__AbsolutePathBuf; readonly type: "local" } + | { + readonly path?: string | null; + readonly refName?: string | null; + readonly sha?: string | null; + readonly type: "git"; + readonly url: string; + } + | { readonly type: "remote" }; +export const V2PluginShareListResponse__PluginSource = Schema.Union( + [ + Schema.Struct({ + path: V2PluginShareListResponse__AbsolutePathBuf, + type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }), + }).annotate({ title: "LocalPluginSource" }), + Schema.Struct({ + path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + type: Schema.Literal("git").annotate({ title: "GitPluginSourceType" }), + url: Schema.String, + }).annotate({ title: "GitPluginSource" }), + Schema.Struct({ + type: Schema.Literal("remote").annotate({ title: "RemotePluginSourceType" }), + }).annotate({ + title: "RemotePluginSource", + description: + "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.", + }), + ], + { mode: "oneOf" }, +); + +export type V2PluginShareListResponse__PluginSharePrincipal = { + readonly name: string; + readonly principalId: string; + readonly principalType: V2PluginShareListResponse__PluginSharePrincipalType; +}; +export const V2PluginShareListResponse__PluginSharePrincipal = Schema.Struct({ + name: Schema.String, + principalId: Schema.String, + principalType: V2PluginShareListResponse__PluginSharePrincipalType, +}); + +export type V2PluginShareSaveParams__PluginShareTarget = { + readonly principalId: string; + readonly principalType: V2PluginShareSaveParams__PluginSharePrincipalType; +}; +export const V2PluginShareSaveParams__PluginShareTarget = Schema.Struct({ + principalId: Schema.String, + principalType: V2PluginShareSaveParams__PluginSharePrincipalType, +}); + +export type V2PluginShareUpdateTargetsParams__PluginShareTarget = { + readonly principalId: string; + readonly principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType; +}; +export const V2PluginShareUpdateTargetsParams__PluginShareTarget = Schema.Struct({ + principalId: Schema.String, + principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType, +}); + +export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = { + readonly name: string; + readonly principalId: string; + readonly principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType; +}; +export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = Schema.Struct({ + name: Schema.String, + principalId: Schema.String, + principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType, +}); + export type V2RawResponseItemCompletedNotification__ContentItem = | { readonly text: string; readonly type: "input_text" } | { @@ -12747,6 +13339,7 @@ export type V2ReviewStartResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -12768,6 +13361,7 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -12928,6 +13522,44 @@ export const V2SkillsListResponse__SkillDependencies = Schema.Struct({ tools: Schema.Array(V2SkillsListResponse__SkillToolDependency), }); +export type V2ThreadForkParams__PermissionProfileModificationParams = { + readonly path: V2ThreadForkParams__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2ThreadForkParams__PermissionProfileModificationParams = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadForkParams__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParamsType", + }), + }).annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParams", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadForkResponse__ActivePermissionProfileModification = { + readonly path: V2ThreadForkResponse__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2ThreadForkResponse__ActivePermissionProfileModification = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadForkResponse__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootActivePermissionProfileModificationType", + }), + }).annotate({ + title: "AdditionalWritableRootActivePermissionProfileModification", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadForkResponse__CommandAction = | { readonly command: string; @@ -12970,112 +13602,6 @@ export const V2ThreadForkResponse__CommandAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadForkResponse__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { - readonly access?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly networkAccess?: boolean; - readonly type: "readOnly"; - } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly readOnlyAccess?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadForkResponse__SandboxPolicy = Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - access: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - 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 })), - readOnlyAccess: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadForkResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadForkResponse__CollabAgentStatus; @@ -13085,6 +13611,28 @@ export const V2ThreadForkResponse__CollabAgentState = Schema.Struct({ status: V2ThreadForkResponse__CollabAgentStatus, }); +export type V2ThreadForkResponse__FileSystemPath = + | { readonly path: V2ThreadForkResponse__AbsolutePathBuf; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: V2ThreadForkResponse__FileSystemSpecialPath }; +export const V2ThreadForkResponse__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadForkResponse__AbsolutePathBuf, + 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: V2ThreadForkResponse__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadForkResponse__MemoryCitation = { readonly entries: ReadonlyArray; readonly threadIds: ReadonlyArray; @@ -13098,6 +13646,7 @@ export type V2ThreadForkResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -13119,6 +13668,7 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -13288,6 +13838,29 @@ export const V2ThreadForkResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadGoalUpdatedNotification__ThreadGoal = { + readonly createdAt: number; + readonly objective: string; + readonly status: V2ThreadGoalUpdatedNotification__ThreadGoalStatus; + readonly threadId: string; + readonly timeUsedSeconds: number; + readonly tokenBudget?: number | null; + readonly tokensUsed: number; + readonly updatedAt: number; +}; +export const V2ThreadGoalUpdatedNotification__ThreadGoal = Schema.Struct({ + createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + objective: Schema.String, + status: V2ThreadGoalUpdatedNotification__ThreadGoalStatus, + threadId: Schema.String, + timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + tokenBudget: Schema.optionalKey( + Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]), + ), + tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), +}); + export type V2ThreadListResponse__CommandAction = | { readonly command: string; @@ -13352,6 +13925,7 @@ export type V2ThreadListResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -13373,6 +13947,7 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -13606,6 +14181,7 @@ export type V2ThreadMetadataUpdateResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -13627,6 +14203,7 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -13860,6 +14437,7 @@ export type V2ThreadReadResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -13881,6 +14459,7 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -14050,6 +14629,25 @@ export const V2ThreadReadResponse__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadResumeParams__PermissionProfileModificationParams = { + readonly path: V2ThreadResumeParams__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2ThreadResumeParams__PermissionProfileModificationParams = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadResumeParams__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParamsType", + }), + }).annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParams", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadResumeParams__ContentItem = | { readonly text: string; readonly type: "input_text" } | { @@ -14106,6 +14704,25 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.", }); +export type V2ThreadResumeResponse__ActivePermissionProfileModification = { + readonly path: V2ThreadResumeResponse__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2ThreadResumeResponse__ActivePermissionProfileModification = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadResumeResponse__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootActivePermissionProfileModificationType", + }), + }).annotate({ + title: "AdditionalWritableRootActivePermissionProfileModification", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadResumeResponse__CommandAction = | { readonly command: string; @@ -14148,112 +14765,6 @@ export const V2ThreadResumeResponse__CommandAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadResumeResponse__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { - readonly access?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly networkAccess?: boolean; - readonly type: "readOnly"; - } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly readOnlyAccess?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadResumeResponse__SandboxPolicy = Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - access: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - 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 })), - readOnlyAccess: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadResumeResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadResumeResponse__CollabAgentStatus; @@ -14263,6 +14774,28 @@ export const V2ThreadResumeResponse__CollabAgentState = Schema.Struct({ status: V2ThreadResumeResponse__CollabAgentStatus, }); +export type V2ThreadResumeResponse__FileSystemPath = + | { readonly path: V2ThreadResumeResponse__AbsolutePathBuf; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: V2ThreadResumeResponse__FileSystemSpecialPath }; +export const V2ThreadResumeResponse__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadResumeResponse__AbsolutePathBuf, + 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: V2ThreadResumeResponse__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadResumeResponse__MemoryCitation = { readonly entries: ReadonlyArray; readonly threadIds: ReadonlyArray; @@ -14276,6 +14809,7 @@ export type V2ThreadResumeResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -14297,6 +14831,7 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -14530,6 +15065,7 @@ export type V2ThreadRollbackResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -14551,6 +15087,7 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -14784,6 +15321,7 @@ export type V2ThreadStartedNotification__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -14805,6 +15343,7 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -14974,6 +15513,44 @@ export const V2ThreadStartedNotification__SubAgentSource = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadStartParams__PermissionProfileModificationParams = { + readonly path: V2ThreadStartParams__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2ThreadStartParams__PermissionProfileModificationParams = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadStartParams__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParamsType", + }), + }).annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParams", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadStartResponse__ActivePermissionProfileModification = { + readonly path: V2ThreadStartResponse__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2ThreadStartResponse__ActivePermissionProfileModification = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadStartResponse__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootActivePermissionProfileModificationType", + }), + }).annotate({ + title: "AdditionalWritableRootActivePermissionProfileModification", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadStartResponse__CommandAction = | { readonly command: string; @@ -15016,112 +15593,6 @@ export const V2ThreadStartResponse__CommandAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadStartResponse__SandboxPolicy = - | { readonly type: "dangerFullAccess" } - | { - readonly access?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly networkAccess?: boolean; - readonly type: "readOnly"; - } - | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } - | { - readonly excludeSlashTmp?: boolean; - readonly excludeTmpdirEnvVar?: boolean; - readonly networkAccess?: boolean; - readonly readOnlyAccess?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly type: "workspaceWrite"; - readonly writableRoots?: ReadonlyArray; - }; -export const V2ThreadStartResponse__SandboxPolicy = Schema.Union( - [ - Schema.Struct({ - type: Schema.Literal("dangerFullAccess").annotate({ - title: "DangerFullAccessSandboxPolicyType", - }), - }).annotate({ title: "DangerFullAccessSandboxPolicy" }), - Schema.Struct({ - access: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), - networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), - }).annotate({ title: "ReadOnlySandboxPolicy" }), - Schema.Struct({ - 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 })), - readOnlyAccess: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), - type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), - writableRoots: Schema.optionalKey( - Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), - ), - }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), - ], - { mode: "oneOf" }, -); - export type V2ThreadStartResponse__CollabAgentState = { readonly message?: string | null; readonly status: V2ThreadStartResponse__CollabAgentStatus; @@ -15131,6 +15602,28 @@ export const V2ThreadStartResponse__CollabAgentState = Schema.Struct({ status: V2ThreadStartResponse__CollabAgentStatus, }); +export type V2ThreadStartResponse__FileSystemPath = + | { readonly path: V2ThreadStartResponse__AbsolutePathBuf; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: V2ThreadStartResponse__FileSystemSpecialPath }; +export const V2ThreadStartResponse__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: V2ThreadStartResponse__AbsolutePathBuf, + 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: V2ThreadStartResponse__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadStartResponse__MemoryCitation = { readonly entries: ReadonlyArray; readonly threadIds: ReadonlyArray; @@ -15144,6 +15637,7 @@ export type V2ThreadStartResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -15165,6 +15659,7 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -15374,11 +15869,11 @@ export const V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = Schema.St total: V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown, }); -export type V2ThreadTurnsListResponse__CommandAction = +export type V2ThreadUnarchiveResponse__CommandAction = | { readonly command: string; readonly name: string; - readonly path: V2ThreadTurnsListResponse__AbsolutePathBuf; + readonly path: V2ThreadUnarchiveResponse__AbsolutePathBuf; readonly type: "read"; } | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } @@ -15389,12 +15884,12 @@ export type V2ThreadTurnsListResponse__CommandAction = readonly type: "search"; } | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadTurnsListResponse__CommandAction = Schema.Union( +export const V2ThreadUnarchiveResponse__CommandAction = Schema.Union( [ Schema.Struct({ command: Schema.String, name: Schema.String, - path: V2ThreadTurnsListResponse__AbsolutePathBuf, + path: V2ThreadUnarchiveResponse__AbsolutePathBuf, type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), }).annotate({ title: "ReadCommandAction" }), Schema.Struct({ @@ -15416,28 +15911,29 @@ export const V2ThreadTurnsListResponse__CommandAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadTurnsListResponse__CollabAgentState = { +export type V2ThreadUnarchiveResponse__CollabAgentState = { readonly message?: string | null; - readonly status: V2ThreadTurnsListResponse__CollabAgentStatus; + readonly status: V2ThreadUnarchiveResponse__CollabAgentStatus; }; -export const V2ThreadTurnsListResponse__CollabAgentState = Schema.Struct({ +export const V2ThreadUnarchiveResponse__CollabAgentState = Schema.Struct({ message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: V2ThreadTurnsListResponse__CollabAgentStatus, + status: V2ThreadUnarchiveResponse__CollabAgentStatus, }); -export type V2ThreadTurnsListResponse__MemoryCitation = { - readonly entries: ReadonlyArray; +export type V2ThreadUnarchiveResponse__MemoryCitation = { + readonly entries: ReadonlyArray; readonly threadIds: ReadonlyArray; }; -export const V2ThreadTurnsListResponse__MemoryCitation = Schema.Struct({ - entries: Schema.Array(V2ThreadTurnsListResponse__MemoryCitationEntry), +export const V2ThreadUnarchiveResponse__MemoryCitation = Schema.Struct({ + entries: Schema.Array(V2ThreadUnarchiveResponse__MemoryCitationEntry), threadIds: Schema.Array(Schema.String), }); -export type V2ThreadTurnsListResponse__CodexErrorInfo = +export type V2ThreadUnarchiveResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -15450,15 +15946,16 @@ export type V2ThreadTurnsListResponse__CodexErrorInfo = | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } } | { readonly activeTurnNotSteerable: { - readonly turnKind: V2ThreadTurnsListResponse__NonSteerableTurnKind; + readonly turnKind: V2ThreadUnarchiveResponse__NonSteerableTurnKind; }; }; -export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union( +export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -15526,7 +16023,7 @@ export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union( }), Schema.Struct({ activeTurnNotSteerable: Schema.Struct({ - turnKind: V2ThreadTurnsListResponse__NonSteerableTurnKind, + turnKind: V2ThreadUnarchiveResponse__NonSteerableTurnKind, }), }).annotate({ title: "ActiveTurnNotSteerableCodexErrorInfo", @@ -15540,33 +16037,33 @@ export const V2ThreadTurnsListResponse__CodexErrorInfo = Schema.Union( "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", }); -export type V2ThreadTurnsListResponse__FileUpdateChange = { +export type V2ThreadUnarchiveResponse__FileUpdateChange = { readonly diff: string; - readonly kind: V2ThreadTurnsListResponse__PatchChangeKind; + readonly kind: V2ThreadUnarchiveResponse__PatchChangeKind; readonly path: string; }; -export const V2ThreadTurnsListResponse__FileUpdateChange = Schema.Struct({ +export const V2ThreadUnarchiveResponse__FileUpdateChange = Schema.Struct({ diff: Schema.String, - kind: V2ThreadTurnsListResponse__PatchChangeKind, + kind: V2ThreadUnarchiveResponse__PatchChangeKind, path: Schema.String, }); -export type V2ThreadTurnsListResponse__UserInput = +export type V2ThreadUnarchiveResponse__UserInput = | { readonly text: string; - readonly text_elements?: ReadonlyArray; + readonly text_elements?: ReadonlyArray; readonly type: "text"; } | { readonly type: "image"; readonly url: string } | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; -export const V2ThreadTurnsListResponse__UserInput = Schema.Union( +export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( [ Schema.Struct({ text: Schema.String, text_elements: Schema.optionalKey( - Schema.Array(V2ThreadTurnsListResponse__TextElement).annotate({ + Schema.Array(V2ThreadUnarchiveResponse__TextElement).annotate({ description: "UI-defined spans within `text` used to render or persist special elements.", default: [], }), @@ -15595,11 +16092,44 @@ export const V2ThreadTurnsListResponse__UserInput = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadUnarchiveResponse__CommandAction = +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: V2ThreadUnarchiveResponse__AbsolutePathBuf; + readonly path: V2TurnCompletedNotification__AbsolutePathBuf; readonly type: "read"; } | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } @@ -15610,12 +16140,12 @@ export type V2ThreadUnarchiveResponse__CommandAction = readonly type: "search"; } | { readonly command: string; readonly type: "unknown" }; -export const V2ThreadUnarchiveResponse__CommandAction = Schema.Union( +export const V2TurnCompletedNotification__CommandAction = Schema.Union( [ Schema.Struct({ command: Schema.String, name: Schema.String, - path: V2ThreadUnarchiveResponse__AbsolutePathBuf, + path: V2TurnCompletedNotification__AbsolutePathBuf, type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), }).annotate({ title: "ReadCommandAction" }), Schema.Struct({ @@ -15637,28 +16167,29 @@ export const V2ThreadUnarchiveResponse__CommandAction = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadUnarchiveResponse__CollabAgentState = { +export type V2TurnCompletedNotification__CollabAgentState = { readonly message?: string | null; - readonly status: V2ThreadUnarchiveResponse__CollabAgentStatus; + readonly status: V2TurnCompletedNotification__CollabAgentStatus; }; -export const V2ThreadUnarchiveResponse__CollabAgentState = Schema.Struct({ +export const V2TurnCompletedNotification__CollabAgentState = Schema.Struct({ message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: V2ThreadUnarchiveResponse__CollabAgentStatus, + status: V2TurnCompletedNotification__CollabAgentStatus, }); -export type V2ThreadUnarchiveResponse__MemoryCitation = { - readonly entries: ReadonlyArray; +export type V2TurnCompletedNotification__MemoryCitation = { + readonly entries: ReadonlyArray; readonly threadIds: ReadonlyArray; }; -export const V2ThreadUnarchiveResponse__MemoryCitation = Schema.Struct({ - entries: Schema.Array(V2ThreadUnarchiveResponse__MemoryCitationEntry), +export const V2TurnCompletedNotification__MemoryCitation = Schema.Struct({ + entries: Schema.Array(V2TurnCompletedNotification__MemoryCitationEntry), threadIds: Schema.Array(Schema.String), }); -export type V2ThreadUnarchiveResponse__CodexErrorInfo = +export type V2TurnCompletedNotification__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -15671,15 +16202,16 @@ export type V2ThreadUnarchiveResponse__CodexErrorInfo = | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } } | { readonly activeTurnNotSteerable: { - readonly turnKind: V2ThreadUnarchiveResponse__NonSteerableTurnKind; + readonly turnKind: V2TurnCompletedNotification__NonSteerableTurnKind; }; }; -export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union( +export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union( [ Schema.Literals([ "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -15747,7 +16279,7 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union( }), Schema.Struct({ activeTurnNotSteerable: Schema.Struct({ - turnKind: V2ThreadUnarchiveResponse__NonSteerableTurnKind, + turnKind: V2TurnCompletedNotification__NonSteerableTurnKind, }), }).annotate({ title: "ActiveTurnNotSteerableCodexErrorInfo", @@ -15761,33 +16293,33 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union( "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", }); -export type V2ThreadUnarchiveResponse__FileUpdateChange = { +export type V2TurnCompletedNotification__FileUpdateChange = { readonly diff: string; - readonly kind: V2ThreadUnarchiveResponse__PatchChangeKind; + readonly kind: V2TurnCompletedNotification__PatchChangeKind; readonly path: string; }; -export const V2ThreadUnarchiveResponse__FileUpdateChange = Schema.Struct({ +export const V2TurnCompletedNotification__FileUpdateChange = Schema.Struct({ diff: Schema.String, - kind: V2ThreadUnarchiveResponse__PatchChangeKind, + kind: V2TurnCompletedNotification__PatchChangeKind, path: Schema.String, }); -export type V2ThreadUnarchiveResponse__UserInput = +export type V2TurnCompletedNotification__UserInput = | { readonly text: string; - readonly text_elements?: ReadonlyArray; + readonly text_elements?: ReadonlyArray; readonly type: "text"; } | { readonly type: "image"; readonly url: string } | { readonly path: string; readonly type: "localImage" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; -export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( +export const V2TurnCompletedNotification__UserInput = Schema.Union( [ Schema.Struct({ text: Schema.String, text_elements: Schema.optionalKey( - Schema.Array(V2ThreadUnarchiveResponse__TextElement).annotate({ + Schema.Array(V2TurnCompletedNotification__TextElement).annotate({ description: "UI-defined spans within `text` used to render or persist special elements.", default: [], }), @@ -15816,44 +16348,20 @@ export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( { mode: "oneOf" }, ); -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 V2TurnPlanUpdatedNotification__TurnPlanStep = { + readonly status: V2TurnPlanUpdatedNotification__TurnPlanStepStatus; + readonly step: string; +}; +export const V2TurnPlanUpdatedNotification__TurnPlanStep = Schema.Struct({ + status: V2TurnPlanUpdatedNotification__TurnPlanStepStatus, + step: Schema.String, +}); -export type V2TurnCompletedNotification__CommandAction = +export type V2TurnStartedNotification__CommandAction = | { readonly command: string; readonly name: string; - readonly path: V2TurnCompletedNotification__AbsolutePathBuf; + readonly path: V2TurnStartedNotification__AbsolutePathBuf; readonly type: "read"; } | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" } @@ -15864,242 +16372,12 @@ export type V2TurnCompletedNotification__CommandAction = readonly type: "search"; } | { readonly command: string; readonly type: "unknown" }; -export const V2TurnCompletedNotification__CommandAction = Schema.Union( +export const V2TurnStartedNotification__CommandAction = Schema.Union( [ Schema.Struct({ command: Schema.String, name: Schema.String, - path: V2TurnCompletedNotification__AbsolutePathBuf, - type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), - }).annotate({ title: "ReadCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }), - }).annotate({ title: "ListFilesCommandAction" }), - Schema.Struct({ - command: Schema.String, - path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }), - }).annotate({ title: "SearchCommandAction" }), - Schema.Struct({ - command: Schema.String, - type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }), - }).annotate({ title: "UnknownCommandAction" }), - ], - { mode: "oneOf" }, -); - -export type V2TurnCompletedNotification__CollabAgentState = { - readonly message?: string | null; - readonly status: V2TurnCompletedNotification__CollabAgentStatus; -}; -export const V2TurnCompletedNotification__CollabAgentState = Schema.Struct({ - message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: V2TurnCompletedNotification__CollabAgentStatus, -}); - -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" - | "usageLimitExceeded" - | "serverOverloaded" - | "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", - "usageLimitExceeded", - "serverOverloaded", - "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, -}); - -export type V2TurnCompletedNotification__UserInput = - | { - readonly text: string; - readonly text_elements?: ReadonlyArray; - readonly type: "text"; - } - | { readonly type: "image"; readonly url: string } - | { readonly path: string; readonly type: "localImage" } - | { readonly name: string; readonly path: string; readonly type: "skill" } - | { readonly name: string; readonly path: string; readonly type: "mention" }; -export const V2TurnCompletedNotification__UserInput = Schema.Union( - [ - Schema.Struct({ - text: Schema.String, - text_elements: Schema.optionalKey( - Schema.Array(V2TurnCompletedNotification__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({ - type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }), - url: Schema.String, - }).annotate({ title: "ImageUserInput" }), - Schema.Struct({ - path: Schema.String, - type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), - }).annotate({ title: "LocalImageUserInput" }), - 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 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, + path: V2TurnStartedNotification__AbsolutePathBuf, type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }), }).annotate({ title: "ReadCommandAction" }), Schema.Struct({ @@ -16143,6 +16421,7 @@ export type V2TurnStartedNotification__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -16164,6 +16443,7 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -16300,31 +16580,33 @@ export const V2TurnStartedNotification__UserInput = Schema.Union( { mode: "oneOf" }, ); +export type V2TurnStartParams__PermissionProfileModificationParams = { + readonly path: V2TurnStartParams__AbsolutePathBuf; + readonly type: "additionalWritableRoot"; +}; +export const V2TurnStartParams__PermissionProfileModificationParams = Schema.Union( + [ + Schema.Struct({ + path: V2TurnStartParams__AbsolutePathBuf, + type: Schema.Literal("additionalWritableRoot").annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParamsType", + }), + }).annotate({ + title: "AdditionalWritableRootPermissionProfileModificationParams", + description: "Additional concrete directory that should be writable.", + }), + ], + { mode: "oneOf" }, +); + export type V2TurnStartParams__SandboxPolicy = | { readonly type: "dangerFullAccess" } - | { - readonly access?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; - readonly networkAccess?: boolean; - readonly type: "readOnly"; - } + | { readonly networkAccess?: boolean; readonly type: "readOnly" } | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } | { readonly excludeSlashTmp?: boolean; readonly excludeTmpdirEnvVar?: boolean; readonly networkAccess?: boolean; - readonly readOnlyAccess?: - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; readonly type: "workspaceWrite"; readonly writableRoots?: ReadonlyArray; }; @@ -16336,29 +16618,6 @@ export const V2TurnStartParams__SandboxPolicy = Schema.Union( }), }).annotate({ title: "DangerFullAccessSandboxPolicy" }), Schema.Struct({ - access: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), }).annotate({ title: "ReadOnlySandboxPolicy" }), @@ -16374,29 +16633,6 @@ export const V2TurnStartParams__SandboxPolicy = Schema.Union( excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), - readOnlyAccess: Schema.optionalKey( - Schema.Union( - [ - Schema.Struct({ - includePlatformDefaults: Schema.optionalKey( - Schema.Boolean.annotate({ default: true }), - ), - readableRoots: Schema.optionalKey( - Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ - title: "RestrictedReadOnlyAccessType", - }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ - title: "FullAccessReadOnlyAccessType", - }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), - ], - { mode: "oneOf" }, - ).annotate({ default: { type: "fullAccess" } }), - ), type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), writableRoots: Schema.optionalKey( Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), @@ -16527,6 +16763,7 @@ export type V2TurnStartResponse__CodexErrorInfo = | "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" + | "cyberPolicy" | "internalServerError" | "unauthorized" | "badRequest" @@ -16548,6 +16785,7 @@ export const V2TurnStartResponse__CodexErrorInfo = Schema.Union( "contextWindowExceeded", "usageLimitExceeded", "serverOverloaded", + "cyberPolicy", "internalServerError", "unauthorized", "badRequest", @@ -16858,7 +17096,7 @@ export const ClientRequest__CommandExecParams = Schema.Struct({ sandboxPolicy: Schema.optionalKey( Schema.Union([ClientRequest__SandboxPolicy, Schema.Null]).annotate({ description: - "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted.", + "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( @@ -16898,6 +17136,15 @@ export const ClientRequest__CommandExecParams = Schema.Struct({ "Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.", }); +export type ClientRequest__FileSystemSandboxEntry = { + readonly access: ClientRequest__FileSystemAccessMode; + readonly path: ClientRequest__FileSystemPath; +}; +export const ClientRequest__FileSystemSandboxEntry = Schema.Struct({ + access: ClientRequest__FileSystemAccessMode, + path: ClientRequest__FileSystemPath, +}); + export type ClientRequest__FunctionCallOutputBody = | string | ReadonlyArray; @@ -16932,6 +17179,32 @@ export const ClientRequest__ConfigBatchWriteParams = Schema.Struct({ ), }); +export type ClientRequest__PluginShareSaveParams = { + readonly discoverability?: ClientRequest__PluginShareDiscoverability | null; + readonly pluginPath: ClientRequest__AbsolutePathBuf; + readonly remotePluginId?: string | null; + readonly shareTargets?: ReadonlyArray | null; +}; +export const ClientRequest__PluginShareSaveParams = Schema.Struct({ + discoverability: Schema.optionalKey( + Schema.Union([ClientRequest__PluginShareDiscoverability, Schema.Null]), + ), + pluginPath: ClientRequest__AbsolutePathBuf, + remotePluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + shareTargets: Schema.optionalKey( + Schema.Union([Schema.Array(ClientRequest__PluginShareTarget), Schema.Null]), + ), +}); + +export type ClientRequest__PluginShareUpdateTargetsParams = { + readonly remotePluginId: string; + readonly shareTargets: ReadonlyArray; +}; +export const ClientRequest__PluginShareUpdateTargetsParams = Schema.Struct({ + remotePluginId: Schema.String, + shareTargets: Schema.Array(ClientRequest__PluginShareTarget), +}); + export type ClientRequest__ExternalAgentConfigMigrationItem = { readonly cwd?: string | null; readonly description: string; @@ -16953,17 +17226,6 @@ export const ClientRequest__ExternalAgentConfigMigrationItem = Schema.Struct({ itemType: ClientRequest__ExternalAgentConfigMigrationItemType, }); -export type ClientRequest__DeviceKeySignParams = { - readonly keyId: string; - readonly payload: ClientRequest__DeviceKeySignPayload; -}; -export const ClientRequest__DeviceKeySignParams = Schema.Struct({ - keyId: Schema.String, - payload: ClientRequest__DeviceKeySignPayload, -}).annotate({ - description: "Sign an accepted structured payload with a controller-local device key.", -}); - export type ClientRequest__TurnStartParams = { readonly approvalPolicy?: ClientRequest__AskForApproval | null; readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null; @@ -16974,7 +17236,7 @@ export type ClientRequest__TurnStartParams = { readonly outputSchema?: unknown; readonly personality?: ClientRequest__Personality | null; readonly sandboxPolicy?: ClientRequest__SandboxPolicy | null; - readonly serviceTier?: ClientRequest__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly summary?: ClientRequest__ReasoningSummary | null; readonly threadId: string; }; @@ -17029,9 +17291,12 @@ export const ClientRequest__TurnStartParams = Schema.Struct({ }), ), serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([ClientRequest__ServiceTier, Schema.Null]), Schema.Null]).annotate({ - description: "Override the service tier for this turn and subsequent turns.", - }), + Schema.Union([ + Schema.String.annotate({ + description: "Override the service tier for this turn and subsequent turns.", + }), + Schema.Null, + ]), ), summary: Schema.optionalKey( Schema.Union([ClientRequest__ReasoningSummary, Schema.Null]).annotate({ @@ -17343,6 +17608,8 @@ export type ServerNotification__HookRunSummary = { | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; @@ -17372,6 +17639,8 @@ export const ServerNotification__HookRunSummary = Schema.Struct({ "project", "mdm", "sessionFlags", + "plugin", + "cloudRequirements", "legacyManagedConfigFile", "legacyManagedConfigMdm", "unknown", @@ -17793,6 +18062,17 @@ export const ServerNotification__ThreadStatusChangedNotification = Schema.Struct threadId: Schema.String, }); +export type ServerNotification__ThreadGoalUpdatedNotification = { + readonly goal: ServerNotification__ThreadGoal; + readonly threadId: string; + readonly turnId?: string | null; +}; +export const ServerNotification__ThreadGoalUpdatedNotification = Schema.Struct({ + goal: ServerNotification__ThreadGoal, + threadId: Schema.String, + turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + export type ServerNotification__ThreadTokenUsageUpdatedNotification = { readonly threadId: string; readonly tokenUsage: ServerNotification__ThreadTokenUsage; @@ -18073,6 +18353,15 @@ export const V2AppsListResponse__AppInfo = Schema.Struct({ pluginDisplayNames: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), }).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." }); +export type V2CommandExecParams__FileSystemSandboxEntry = { + readonly access: V2CommandExecParams__FileSystemAccessMode; + readonly path: V2CommandExecParams__FileSystemPath; +}; +export const V2CommandExecParams__FileSystemSandboxEntry = Schema.Struct({ + access: V2CommandExecParams__FileSystemAccessMode, + path: V2CommandExecParams__FileSystemPath, +}); + export type V2ConfigReadResponse__ConfigLayer = { readonly config: unknown; readonly disabledReason?: string | null; @@ -18190,6 +18479,8 @@ export type V2HookCompletedNotification__HookRunSummary = { | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; @@ -18219,6 +18510,8 @@ export const V2HookCompletedNotification__HookRunSummary = Schema.Struct({ "project", "mdm", "sessionFlags", + "plugin", + "cloudRequirements", "legacyManagedConfigFile", "legacyManagedConfigMdm", "unknown", @@ -18230,6 +18523,19 @@ export const V2HookCompletedNotification__HookRunSummary = Schema.Struct({ statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2HooksListResponse__HooksListEntry = { + readonly cwd: string; + readonly errors: ReadonlyArray; + readonly hooks: ReadonlyArray; + readonly warnings: ReadonlyArray; +}; +export const V2HooksListResponse__HooksListEntry = Schema.Struct({ + cwd: Schema.String, + errors: Schema.Array(V2HooksListResponse__HookErrorInfo), + hooks: Schema.Array(V2HooksListResponse__HookMetadata), + warnings: Schema.Array(Schema.String), +}); + export type V2HookStartedNotification__HookRunSummary = { readonly completedAt?: number | null; readonly displayOrder: number; @@ -18246,6 +18552,8 @@ export type V2HookStartedNotification__HookRunSummary = { | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; @@ -18275,6 +18583,8 @@ export const V2HookStartedNotification__HookRunSummary = Schema.Struct({ "project", "mdm", "sessionFlags", + "plugin", + "cloudRequirements", "legacyManagedConfigFile", "legacyManagedConfigMdm", "unknown", @@ -19011,13 +19321,19 @@ export type V2ModelListResponse__Model = { readonly inputModalities?: ReadonlyArray; readonly isDefault: boolean; readonly model: string; + readonly serviceTiers?: ReadonlyArray; readonly supportedReasoningEfforts: ReadonlyArray; readonly supportsPersonality?: boolean; readonly upgrade?: string | null; readonly upgradeInfo?: V2ModelListResponse__ModelUpgradeInfo | null; }; export const V2ModelListResponse__Model = Schema.Struct({ - additionalSpeedTiers: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), + additionalSpeedTiers: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "Deprecated: use `serviceTiers` instead.", + default: [], + }), + ), availabilityNux: Schema.optionalKey( Schema.Union([V2ModelListResponse__ModelAvailabilityNux, Schema.Null]), ), @@ -19031,6 +19347,9 @@ export const V2ModelListResponse__Model = Schema.Struct({ ), isDefault: Schema.Boolean, model: Schema.String, + serviceTiers: Schema.optionalKey( + Schema.Array(V2ModelListResponse__ModelServiceTier).annotate({ default: [] }), + ), supportedReasoningEfforts: Schema.Array(V2ModelListResponse__ReasoningEffortOption), supportsPersonality: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), upgrade: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -19039,46 +19358,21 @@ export const V2ModelListResponse__Model = Schema.Struct({ ), }); -export type V2PluginListResponse__PluginSummary = { - readonly authPolicy: V2PluginListResponse__PluginAuthPolicy; - readonly enabled: boolean; - readonly id: string; - readonly installPolicy: V2PluginListResponse__PluginInstallPolicy; - readonly installed: boolean; - readonly interface?: V2PluginListResponse__PluginInterface | null; - readonly name: string; - readonly source: V2PluginListResponse__PluginSource; -}; -export const V2PluginListResponse__PluginSummary = Schema.Struct({ - authPolicy: V2PluginListResponse__PluginAuthPolicy, - enabled: Schema.Boolean, - id: Schema.String, - installPolicy: V2PluginListResponse__PluginInstallPolicy, - installed: Schema.Boolean, - interface: Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInterface, Schema.Null])), - name: Schema.String, - source: V2PluginListResponse__PluginSource, -}); - -export type V2PluginReadResponse__PluginSummary = { - readonly authPolicy: V2PluginReadResponse__PluginAuthPolicy; - readonly enabled: boolean; - readonly id: string; - readonly installPolicy: V2PluginReadResponse__PluginInstallPolicy; - readonly installed: boolean; - readonly interface?: V2PluginReadResponse__PluginInterface | null; - readonly name: string; - readonly source: V2PluginReadResponse__PluginSource; +export type V2PluginListResponse__PluginShareContext = { + readonly creatorAccountUserId?: string | null; + readonly creatorName?: string | null; + readonly remotePluginId: string; + readonly shareTargets?: ReadonlyArray | null; + readonly shareUrl?: string | null; }; -export const V2PluginReadResponse__PluginSummary = Schema.Struct({ - authPolicy: V2PluginReadResponse__PluginAuthPolicy, - enabled: Schema.Boolean, - id: Schema.String, - installPolicy: V2PluginReadResponse__PluginInstallPolicy, - installed: Schema.Boolean, - interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInterface, Schema.Null])), - name: Schema.String, - source: V2PluginReadResponse__PluginSource, +export const V2PluginListResponse__PluginShareContext = Schema.Struct({ + creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + remotePluginId: Schema.String, + shareTargets: Schema.optionalKey( + Schema.Union([Schema.Array(V2PluginListResponse__PluginSharePrincipal), Schema.Null]), + ), + shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2PluginReadResponse__SkillSummary = { @@ -19086,7 +19380,7 @@ export type V2PluginReadResponse__SkillSummary = { readonly enabled: boolean; readonly interface?: V2PluginReadResponse__SkillInterface | null; readonly name: string; - readonly path: V2PluginReadResponse__AbsolutePathBuf; + readonly path?: V2PluginReadResponse__AbsolutePathBuf | null; readonly shortDescription?: string | null; }; export const V2PluginReadResponse__SkillSummary = Schema.Struct({ @@ -19094,10 +19388,44 @@ export const V2PluginReadResponse__SkillSummary = Schema.Struct({ enabled: Schema.Boolean, interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__SkillInterface, Schema.Null])), name: Schema.String, - path: V2PluginReadResponse__AbsolutePathBuf, + path: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])), shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2PluginReadResponse__PluginShareContext = { + readonly creatorAccountUserId?: string | null; + readonly creatorName?: string | null; + readonly remotePluginId: string; + readonly shareTargets?: ReadonlyArray | null; + readonly shareUrl?: string | null; +}; +export const V2PluginReadResponse__PluginShareContext = Schema.Struct({ + creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + remotePluginId: Schema.String, + shareTargets: Schema.optionalKey( + Schema.Union([Schema.Array(V2PluginReadResponse__PluginSharePrincipal), Schema.Null]), + ), + shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + +export type V2PluginShareListResponse__PluginShareContext = { + readonly creatorAccountUserId?: string | null; + readonly creatorName?: string | null; + readonly remotePluginId: string; + readonly shareTargets?: ReadonlyArray | null; + readonly shareUrl?: string | null; +}; +export const V2PluginShareListResponse__PluginShareContext = Schema.Struct({ + creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + remotePluginId: Schema.String, + shareTargets: Schema.optionalKey( + Schema.Union([Schema.Array(V2PluginShareListResponse__PluginSharePrincipal), Schema.Null]), + ), + shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}); + export type V2RawResponseItemCompletedNotification__FunctionCallOutputBody = | string | ReadonlyArray; @@ -19493,6 +19821,15 @@ export const V2SkillsListResponse__SkillMetadata = Schema.Struct({ ), }); +export type V2ThreadForkResponse__FileSystemSandboxEntry = { + readonly access: V2ThreadForkResponse__FileSystemAccessMode; + readonly path: V2ThreadForkResponse__FileSystemPath; +}; +export const V2ThreadForkResponse__FileSystemSandboxEntry = Schema.Struct({ + access: V2ThreadForkResponse__FileSystemAccessMode, + path: V2ThreadForkResponse__FileSystemPath, +}); + export type V2ThreadForkResponse__TurnError = { readonly additionalDetails?: string | null; readonly codexErrorInfo?: V2ThreadForkResponse__CodexErrorInfo | null; @@ -20930,6 +21267,15 @@ export const V2ThreadResumeParams__FunctionCallOutputBody = Schema.Union([ Schema.Array(V2ThreadResumeParams__FunctionCallOutputContentItem), ]); +export type V2ThreadResumeResponse__FileSystemSandboxEntry = { + readonly access: V2ThreadResumeResponse__FileSystemAccessMode; + readonly path: V2ThreadResumeResponse__FileSystemPath; +}; +export const V2ThreadResumeResponse__FileSystemSandboxEntry = Schema.Struct({ + access: V2ThreadResumeResponse__FileSystemAccessMode, + path: V2ThreadResumeResponse__FileSystemPath, +}); + export type V2ThreadResumeResponse__TurnError = { readonly additionalDetails?: string | null; readonly codexErrorInfo?: V2ThreadResumeResponse__CodexErrorInfo | null; @@ -22006,6 +22352,15 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadStartResponse__FileSystemSandboxEntry = { + readonly access: V2ThreadStartResponse__FileSystemAccessMode; + readonly path: V2ThreadStartResponse__FileSystemPath; +}; +export const V2ThreadStartResponse__FileSystemSandboxEntry = Schema.Struct({ + access: V2ThreadStartResponse__FileSystemAccessMode, + path: V2ThreadStartResponse__FileSystemPath, +}); + export type V2ThreadStartResponse__TurnError = { readonly additionalDetails?: string | null; readonly codexErrorInfo?: V2ThreadStartResponse__CodexErrorInfo | null; @@ -22362,34 +22717,34 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadTurnsListResponse__TurnError = { +export type V2ThreadUnarchiveResponse__TurnError = { readonly additionalDetails?: string | null; - readonly codexErrorInfo?: V2ThreadTurnsListResponse__CodexErrorInfo | null; + readonly codexErrorInfo?: V2ThreadUnarchiveResponse__CodexErrorInfo | null; readonly message: string; }; -export const V2ThreadTurnsListResponse__TurnError = Schema.Struct({ +export const V2ThreadUnarchiveResponse__TurnError = Schema.Struct({ additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), codexErrorInfo: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__CodexErrorInfo, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__CodexErrorInfo, Schema.Null]), ), message: Schema.String, }); -export type V2ThreadTurnsListResponse__ThreadItem = +export type V2ThreadUnarchiveResponse__ThreadItem = | { - readonly content: ReadonlyArray; + readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; } | { - readonly fragments: ReadonlyArray; + readonly fragments: ReadonlyArray; readonly id: string; readonly type: "hookPrompt"; } | { readonly id: string; - readonly memoryCitation?: V2ThreadTurnsListResponse__MemoryCitation | null; - readonly phase?: V2ThreadTurnsListResponse__MessagePhase | null; + readonly memoryCitation?: V2ThreadUnarchiveResponse__MemoryCitation | null; + readonly phase?: V2ThreadUnarchiveResponse__MessagePhase | null; readonly text: string; readonly type: "agentMessage"; } @@ -22403,51 +22758,51 @@ export type V2ThreadTurnsListResponse__ThreadItem = | { readonly aggregatedOutput?: string | null; readonly command: string; - readonly commandActions: ReadonlyArray; + readonly commandActions: ReadonlyArray; readonly cwd: string; readonly durationMs?: number | null; readonly exitCode?: number | null; readonly id: string; readonly processId?: string | null; readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction"; - readonly status: V2ThreadTurnsListResponse__CommandExecutionStatus; + readonly status: V2ThreadUnarchiveResponse__CommandExecutionStatus; readonly type: "commandExecution"; } | { - readonly changes: ReadonlyArray; + readonly changes: ReadonlyArray; readonly id: string; - readonly status: V2ThreadTurnsListResponse__PatchApplyStatus; + readonly status: V2ThreadUnarchiveResponse__PatchApplyStatus; readonly type: "fileChange"; } | { readonly arguments: unknown; readonly durationMs?: number | null; - readonly error?: V2ThreadTurnsListResponse__McpToolCallError | null; + readonly error?: V2ThreadUnarchiveResponse__McpToolCallError | null; readonly id: string; readonly mcpAppResourceUri?: string | null; - readonly result?: V2ThreadTurnsListResponse__McpToolCallResult | null; + readonly result?: V2ThreadUnarchiveResponse__McpToolCallResult | null; readonly server: string; - readonly status: V2ThreadTurnsListResponse__McpToolCallStatus; + readonly status: V2ThreadUnarchiveResponse__McpToolCallStatus; readonly tool: string; readonly type: "mcpToolCall"; } | { readonly arguments: unknown; - readonly contentItems?: ReadonlyArray | null; + readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; readonly namespace?: string | null; - readonly status: V2ThreadTurnsListResponse__DynamicToolCallStatus; + readonly status: V2ThreadUnarchiveResponse__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; readonly type: "dynamicToolCall"; } | { - readonly agentsStates: { readonly [x: string]: V2ThreadTurnsListResponse__CollabAgentState }; + readonly agentsStates: { readonly [x: string]: V2ThreadUnarchiveResponse__CollabAgentState }; readonly id: string; readonly model?: string | null; readonly prompt?: string | null; - readonly reasoningEffort?: V2ThreadTurnsListResponse__ReasoningEffort | null; + readonly reasoningEffort?: V2ThreadUnarchiveResponse__ReasoningEffort | null; readonly receiverThreadIds: ReadonlyArray; readonly senderThreadId: string; readonly status: "inProgress" | "completed" | "failed"; @@ -22455,46 +22810,46 @@ export type V2ThreadTurnsListResponse__ThreadItem = readonly type: "collabAgentToolCall"; } | { - readonly action?: V2ThreadTurnsListResponse__WebSearchAction | null; + readonly action?: V2ThreadUnarchiveResponse__WebSearchAction | null; readonly id: string; readonly query: string; readonly type: "webSearch"; } | { readonly id: string; - readonly path: V2ThreadTurnsListResponse__AbsolutePathBuf; + readonly path: V2ThreadUnarchiveResponse__AbsolutePathBuf; readonly type: "imageView"; } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadTurnsListResponse__AbsolutePathBuf | 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 V2ThreadTurnsListResponse__ThreadItem = Schema.Union( +export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( [ Schema.Struct({ - content: Schema.Array(V2ThreadTurnsListResponse__UserInput), + content: Schema.Array(V2ThreadUnarchiveResponse__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), }).annotate({ title: "UserMessageThreadItem" }), Schema.Struct({ - fragments: Schema.Array(V2ThreadTurnsListResponse__HookPromptFragment), + 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([V2ThreadTurnsListResponse__MemoryCitation, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__MemoryCitation, Schema.Null]), ), phase: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__MessagePhase, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__MessagePhase, Schema.Null]), ), text: Schema.String, type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }), @@ -22524,7 +22879,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( ]), ), command: Schema.String.annotate({ description: "The command to be executed." }), - commandActions: Schema.Array(V2ThreadTurnsListResponse__CommandAction).annotate({ + 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.", }), @@ -22567,15 +22922,15 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( "unifiedExecInteraction", ]).annotate({ default: "agent" }), ), - status: V2ThreadTurnsListResponse__CommandExecutionStatus, + status: V2ThreadUnarchiveResponse__CommandExecutionStatus, type: Schema.Literal("commandExecution").annotate({ title: "CommandExecutionThreadItemType", }), }).annotate({ title: "CommandExecutionThreadItem" }), Schema.Struct({ - changes: Schema.Array(V2ThreadTurnsListResponse__FileUpdateChange), + changes: Schema.Array(V2ThreadUnarchiveResponse__FileUpdateChange), id: Schema.String, - status: V2ThreadTurnsListResponse__PatchApplyStatus, + status: V2ThreadUnarchiveResponse__PatchApplyStatus, type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ @@ -22590,15 +22945,15 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( ]), ), error: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__McpToolCallError, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__McpToolCallError, Schema.Null]), ), id: Schema.String, mcpAppResourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__McpToolCallResult, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__McpToolCallResult, Schema.Null]), ), server: Schema.String, - status: V2ThreadTurnsListResponse__McpToolCallStatus, + status: V2ThreadUnarchiveResponse__McpToolCallStatus, tool: Schema.String, type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }), }).annotate({ title: "McpToolCallThreadItem" }), @@ -22606,7 +22961,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( arguments: Schema.Unknown, contentItems: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem), + Schema.Array(V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem), Schema.Null, ]), ), @@ -22621,7 +22976,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( ), id: Schema.String, namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: V2ThreadTurnsListResponse__DynamicToolCallStatus, + status: V2ThreadUnarchiveResponse__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }), @@ -22629,7 +22984,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( Schema.Struct({ agentsStates: Schema.Record( Schema.String, - V2ThreadTurnsListResponse__CollabAgentState, + 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( @@ -22649,7 +23004,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( ]), ), reasoningEffort: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__ReasoningEffort, Schema.Null]).annotate({ + Schema.Union([V2ThreadUnarchiveResponse__ReasoningEffort, Schema.Null]).annotate({ description: "Reasoning effort requested for the spawned agent, when applicable.", }), ), @@ -22676,7 +23031,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( }).annotate({ title: "CollabAgentToolCallThreadItem" }), Schema.Struct({ action: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__WebSearchAction, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, @@ -22684,7 +23039,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadTurnsListResponse__AbsolutePathBuf, + path: V2ThreadUnarchiveResponse__AbsolutePathBuf, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), Schema.Struct({ @@ -22692,7 +23047,7 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), savedPath: Schema.optionalKey( - Schema.Union([V2ThreadTurnsListResponse__AbsolutePathBuf, Schema.Null]), + Schema.Union([V2ThreadUnarchiveResponse__AbsolutePathBuf, Schema.Null]), ), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), @@ -22721,34 +23076,34 @@ export const V2ThreadTurnsListResponse__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type V2ThreadUnarchiveResponse__TurnError = { +export type V2TurnCompletedNotification__TurnError = { readonly additionalDetails?: string | null; - readonly codexErrorInfo?: V2ThreadUnarchiveResponse__CodexErrorInfo | null; + readonly codexErrorInfo?: V2TurnCompletedNotification__CodexErrorInfo | null; readonly message: string; }; -export const V2ThreadUnarchiveResponse__TurnError = Schema.Struct({ +export const V2TurnCompletedNotification__TurnError = Schema.Struct({ additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), codexErrorInfo: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__CodexErrorInfo, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__CodexErrorInfo, Schema.Null]), ), message: Schema.String, }); -export type V2ThreadUnarchiveResponse__ThreadItem = +export type V2TurnCompletedNotification__ThreadItem = | { - readonly content: ReadonlyArray; + readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; } | { - readonly fragments: ReadonlyArray; + readonly fragments: ReadonlyArray; readonly id: string; readonly type: "hookPrompt"; } | { readonly id: string; - readonly memoryCitation?: V2ThreadUnarchiveResponse__MemoryCitation | null; - readonly phase?: V2ThreadUnarchiveResponse__MessagePhase | null; + readonly memoryCitation?: V2TurnCompletedNotification__MemoryCitation | null; + readonly phase?: V2TurnCompletedNotification__MessagePhase | null; readonly text: string; readonly type: "agentMessage"; } @@ -22762,51 +23117,53 @@ export type V2ThreadUnarchiveResponse__ThreadItem = | { readonly aggregatedOutput?: string | null; readonly command: string; - readonly commandActions: ReadonlyArray; + readonly commandActions: ReadonlyArray; readonly cwd: string; readonly durationMs?: number | null; readonly exitCode?: number | null; readonly id: string; readonly processId?: string | null; readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction"; - readonly status: V2ThreadUnarchiveResponse__CommandExecutionStatus; + readonly status: V2TurnCompletedNotification__CommandExecutionStatus; readonly type: "commandExecution"; } | { - readonly changes: ReadonlyArray; + readonly changes: ReadonlyArray; readonly id: string; - readonly status: V2ThreadUnarchiveResponse__PatchApplyStatus; + readonly status: V2TurnCompletedNotification__PatchApplyStatus; readonly type: "fileChange"; } | { readonly arguments: unknown; readonly durationMs?: number | null; - readonly error?: V2ThreadUnarchiveResponse__McpToolCallError | null; + readonly error?: V2TurnCompletedNotification__McpToolCallError | null; readonly id: string; readonly mcpAppResourceUri?: string | null; - readonly result?: V2ThreadUnarchiveResponse__McpToolCallResult | null; + readonly result?: V2TurnCompletedNotification__McpToolCallResult | null; readonly server: string; - readonly status: V2ThreadUnarchiveResponse__McpToolCallStatus; + readonly status: V2TurnCompletedNotification__McpToolCallStatus; readonly tool: string; readonly type: "mcpToolCall"; } | { readonly arguments: unknown; - readonly contentItems?: ReadonlyArray | null; + readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; readonly namespace?: string | null; - readonly status: V2ThreadUnarchiveResponse__DynamicToolCallStatus; + readonly status: V2TurnCompletedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; readonly type: "dynamicToolCall"; } | { - readonly agentsStates: { readonly [x: string]: V2ThreadUnarchiveResponse__CollabAgentState }; + readonly agentsStates: { + readonly [x: string]: V2TurnCompletedNotification__CollabAgentState; + }; readonly id: string; readonly model?: string | null; readonly prompt?: string | null; - readonly reasoningEffort?: V2ThreadUnarchiveResponse__ReasoningEffort | null; + readonly reasoningEffort?: V2TurnCompletedNotification__ReasoningEffort | null; readonly receiverThreadIds: ReadonlyArray; readonly senderThreadId: string; readonly status: "inProgress" | "completed" | "failed"; @@ -22814,46 +23171,46 @@ export type V2ThreadUnarchiveResponse__ThreadItem = readonly type: "collabAgentToolCall"; } | { - readonly action?: V2ThreadUnarchiveResponse__WebSearchAction | null; + readonly action?: V2TurnCompletedNotification__WebSearchAction | null; readonly id: string; readonly query: string; readonly type: "webSearch"; } | { readonly id: string; - readonly path: V2ThreadUnarchiveResponse__AbsolutePathBuf; + readonly path: V2TurnCompletedNotification__AbsolutePathBuf; readonly type: "imageView"; } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2ThreadUnarchiveResponse__AbsolutePathBuf | 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 V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( +export const V2TurnCompletedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - content: Schema.Array(V2ThreadUnarchiveResponse__UserInput), + content: Schema.Array(V2TurnCompletedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), }).annotate({ title: "UserMessageThreadItem" }), Schema.Struct({ - fragments: Schema.Array(V2ThreadUnarchiveResponse__HookPromptFragment), + 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([V2ThreadUnarchiveResponse__MemoryCitation, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__MemoryCitation, Schema.Null]), ), phase: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__MessagePhase, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__MessagePhase, Schema.Null]), ), text: Schema.String, type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }), @@ -22883,7 +23240,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( ]), ), command: Schema.String.annotate({ description: "The command to be executed." }), - commandActions: Schema.Array(V2ThreadUnarchiveResponse__CommandAction).annotate({ + 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.", }), @@ -22926,15 +23283,15 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( "unifiedExecInteraction", ]).annotate({ default: "agent" }), ), - status: V2ThreadUnarchiveResponse__CommandExecutionStatus, + status: V2TurnCompletedNotification__CommandExecutionStatus, type: Schema.Literal("commandExecution").annotate({ title: "CommandExecutionThreadItemType", }), }).annotate({ title: "CommandExecutionThreadItem" }), Schema.Struct({ - changes: Schema.Array(V2ThreadUnarchiveResponse__FileUpdateChange), + changes: Schema.Array(V2TurnCompletedNotification__FileUpdateChange), id: Schema.String, - status: V2ThreadUnarchiveResponse__PatchApplyStatus, + status: V2TurnCompletedNotification__PatchApplyStatus, type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }), }).annotate({ title: "FileChangeThreadItem" }), Schema.Struct({ @@ -22949,15 +23306,15 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( ]), ), error: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__McpToolCallError, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__McpToolCallError, Schema.Null]), ), id: Schema.String, mcpAppResourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), result: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__McpToolCallResult, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__McpToolCallResult, Schema.Null]), ), server: Schema.String, - status: V2ThreadUnarchiveResponse__McpToolCallStatus, + status: V2TurnCompletedNotification__McpToolCallStatus, tool: Schema.String, type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }), }).annotate({ title: "McpToolCallThreadItem" }), @@ -22965,7 +23322,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( arguments: Schema.Unknown, contentItems: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem), + Schema.Array(V2TurnCompletedNotification__DynamicToolCallOutputContentItem), Schema.Null, ]), ), @@ -22980,7 +23337,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( ), id: Schema.String, namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - status: V2ThreadUnarchiveResponse__DynamicToolCallStatus, + status: V2TurnCompletedNotification__DynamicToolCallStatus, success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), tool: Schema.String, type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }), @@ -22988,7 +23345,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( Schema.Struct({ agentsStates: Schema.Record( Schema.String, - V2ThreadUnarchiveResponse__CollabAgentState, + 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( @@ -23008,7 +23365,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( ]), ), reasoningEffort: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__ReasoningEffort, Schema.Null]).annotate({ + Schema.Union([V2TurnCompletedNotification__ReasoningEffort, Schema.Null]).annotate({ description: "Reasoning effort requested for the spawned agent, when applicable.", }), ), @@ -23035,7 +23392,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( }).annotate({ title: "CollabAgentToolCallThreadItem" }), Schema.Struct({ action: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__WebSearchAction, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__WebSearchAction, Schema.Null]), ), id: Schema.String, query: Schema.String, @@ -23043,7 +23400,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ id: Schema.String, - path: V2ThreadUnarchiveResponse__AbsolutePathBuf, + path: V2TurnCompletedNotification__AbsolutePathBuf, type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), }).annotate({ title: "ImageViewThreadItem" }), Schema.Struct({ @@ -23051,7 +23408,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( result: Schema.String, revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), savedPath: Schema.optionalKey( - Schema.Union([V2ThreadUnarchiveResponse__AbsolutePathBuf, Schema.Null]), + Schema.Union([V2TurnCompletedNotification__AbsolutePathBuf, Schema.Null]), ), status: Schema.String, type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }), @@ -23080,34 +23437,34 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type V2TurnCompletedNotification__TurnError = { +export type V2TurnStartedNotification__TurnError = { readonly additionalDetails?: string | null; - readonly codexErrorInfo?: V2TurnCompletedNotification__CodexErrorInfo | null; + readonly codexErrorInfo?: V2TurnStartedNotification__CodexErrorInfo | null; readonly message: string; }; -export const V2TurnCompletedNotification__TurnError = Schema.Struct({ +export const V2TurnStartedNotification__TurnError = Schema.Struct({ additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), codexErrorInfo: Schema.optionalKey( - Schema.Union([V2TurnCompletedNotification__CodexErrorInfo, Schema.Null]), + Schema.Union([V2TurnStartedNotification__CodexErrorInfo, Schema.Null]), ), message: Schema.String, }); -export type V2TurnCompletedNotification__ThreadItem = +export type V2TurnStartedNotification__ThreadItem = | { - readonly content: ReadonlyArray; + readonly content: ReadonlyArray; readonly id: string; readonly type: "userMessage"; } | { - readonly fragments: ReadonlyArray; + readonly fragments: ReadonlyArray; readonly id: string; readonly type: "hookPrompt"; } | { readonly id: string; - readonly memoryCitation?: V2TurnCompletedNotification__MemoryCitation | null; - readonly phase?: V2TurnCompletedNotification__MessagePhase | null; + readonly memoryCitation?: V2TurnStartedNotification__MemoryCitation | null; + readonly phase?: V2TurnStartedNotification__MessagePhase | null; readonly text: string; readonly type: "agentMessage"; } @@ -23121,53 +23478,51 @@ export type V2TurnCompletedNotification__ThreadItem = | { readonly aggregatedOutput?: string | null; readonly command: string; - readonly commandActions: ReadonlyArray; + readonly commandActions: ReadonlyArray; readonly cwd: string; readonly durationMs?: number | null; readonly exitCode?: number | null; readonly id: string; readonly processId?: string | null; readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction"; - readonly status: V2TurnCompletedNotification__CommandExecutionStatus; + readonly status: V2TurnStartedNotification__CommandExecutionStatus; readonly type: "commandExecution"; } | { - readonly changes: ReadonlyArray; + readonly changes: ReadonlyArray; readonly id: string; - readonly status: V2TurnCompletedNotification__PatchApplyStatus; + readonly status: V2TurnStartedNotification__PatchApplyStatus; readonly type: "fileChange"; } | { readonly arguments: unknown; readonly durationMs?: number | null; - readonly error?: V2TurnCompletedNotification__McpToolCallError | null; + readonly error?: V2TurnStartedNotification__McpToolCallError | null; readonly id: string; readonly mcpAppResourceUri?: string | null; - readonly result?: V2TurnCompletedNotification__McpToolCallResult | null; + readonly result?: V2TurnStartedNotification__McpToolCallResult | null; readonly server: string; - readonly status: V2TurnCompletedNotification__McpToolCallStatus; + readonly status: V2TurnStartedNotification__McpToolCallStatus; readonly tool: string; readonly type: "mcpToolCall"; } | { readonly arguments: unknown; - readonly contentItems?: ReadonlyArray | null; + readonly contentItems?: ReadonlyArray | null; readonly durationMs?: number | null; readonly id: string; readonly namespace?: string | null; - readonly status: V2TurnCompletedNotification__DynamicToolCallStatus; + readonly status: V2TurnStartedNotification__DynamicToolCallStatus; readonly success?: boolean | null; readonly tool: string; readonly type: "dynamicToolCall"; } | { - readonly agentsStates: { - readonly [x: string]: V2TurnCompletedNotification__CollabAgentState; - }; + readonly agentsStates: { readonly [x: string]: V2TurnStartedNotification__CollabAgentState }; readonly id: string; readonly model?: string | null; readonly prompt?: string | null; - readonly reasoningEffort?: V2TurnCompletedNotification__ReasoningEffort | null; + readonly reasoningEffort?: V2TurnStartedNotification__ReasoningEffort | null; readonly receiverThreadIds: ReadonlyArray; readonly senderThreadId: string; readonly status: "inProgress" | "completed" | "failed"; @@ -23175,405 +23530,46 @@ export type V2TurnCompletedNotification__ThreadItem = readonly type: "collabAgentToolCall"; } | { - readonly action?: V2TurnCompletedNotification__WebSearchAction | null; + readonly action?: V2TurnStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; readonly type: "webSearch"; } | { readonly id: string; - readonly path: V2TurnCompletedNotification__AbsolutePathBuf; + readonly path: V2TurnStartedNotification__AbsolutePathBuf; readonly type: "imageView"; } | { readonly id: string; readonly result: string; readonly revisedPrompt?: string | null; - readonly savedPath?: V2TurnCompletedNotification__AbsolutePathBuf | 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 V2TurnCompletedNotification__ThreadItem = Schema.Union( +export const V2TurnStartedNotification__ThreadItem = Schema.Union( [ Schema.Struct({ - content: Schema.Array(V2TurnCompletedNotification__UserInput), + content: Schema.Array(V2TurnStartedNotification__UserInput), id: Schema.String, type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }), }).annotate({ title: "UserMessageThreadItem" }), Schema.Struct({ - fragments: Schema.Array(V2TurnCompletedNotification__HookPromptFragment), + 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([V2TurnCompletedNotification__MemoryCitation, Schema.Null]), + Schema.Union([V2TurnStartedNotification__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: - "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.", - }), - 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, - processId: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Identifier for the underlying PTY process (when available).", - }), - 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({ - arguments: Schema.Unknown, - 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, 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.Unknown, - 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"]).annotate({ - description: "Current status of the collab tool call.", - }), - tool: Schema.Literals([ - "spawnAgent", - "sendInput", - "resumeAgent", - "wait", - "closeAgent", - ]).annotate({ description: "Name of the collab tool that was invoked." }), - type: Schema.Literal("collabAgentToolCall").annotate({ - title: "CollabAgentToolCallThreadItemType", - }), - }).annotate({ title: "CollabAgentToolCallThreadItem" }), - Schema.Struct({ - action: Schema.optionalKey( - Schema.Union([V2TurnCompletedNotification__WebSearchAction, Schema.Null]), - ), - id: Schema.String, - query: Schema.String, - type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), - }).annotate({ title: "WebSearchThreadItem" }), - Schema.Struct({ - id: Schema.String, - path: V2TurnCompletedNotification__AbsolutePathBuf, - type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }), - }).annotate({ title: "ImageViewThreadItem" }), - 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 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 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 processId?: 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 arguments: unknown; - readonly durationMs?: number | null; - readonly error?: V2TurnStartedNotification__McpToolCallError | null; - readonly id: string; - readonly mcpAppResourceUri?: string | null; - readonly result?: V2TurnStartedNotification__McpToolCallResult | null; - readonly server: string; - readonly status: V2TurnStartedNotification__McpToolCallStatus; - readonly tool: string; - readonly type: "mcpToolCall"; - } - | { - readonly arguments: unknown; - 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"; - readonly tool: "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; - readonly type: "collabAgentToolCall"; - } - | { - readonly action?: V2TurnStartedNotification__WebSearchAction | null; - readonly id: string; - readonly query: string; - readonly type: "webSearch"; - } - | { - readonly id: string; - readonly path: V2TurnStartedNotification__AbsolutePathBuf; - readonly type: "imageView"; - } - | { - 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({ - 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]), + Schema.Union([V2TurnStartedNotification__MessagePhase, Schema.Null]), ), text: Schema.String, type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }), @@ -24152,6 +24148,38 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( { mode: "oneOf" }, ); +export type ClientRequest__PermissionProfileFileSystemPermissions = + | { + readonly entries: ReadonlyArray; + readonly globScanMaxDepth?: number | null; + readonly type: "restricted"; + } + | { readonly type: "unrestricted" }; +export const ClientRequest__PermissionProfileFileSystemPermissions = Schema.Union( + [ + Schema.Struct({ + entries: Schema.Array(ClientRequest__FileSystemSandboxEntry), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "RestrictedPermissionProfileFileSystemPermissions" }), + Schema.Struct({ + type: Schema.Literal("unrestricted").annotate({ + title: "UnrestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "UnrestrictedPermissionProfileFileSystemPermissions" }), + ], + { mode: "oneOf" }, +); + export type ClientRequest__ExternalAgentConfigImportParams = { readonly migrationItems: ReadonlyArray; }; @@ -24183,13 +24211,17 @@ export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissi ), read: Schema.optionalKey( Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__AbsolutePathBuf), + Schema.Array(CommandExecutionRequestApprovalParams__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), Schema.Null, ]), ), write: Schema.optionalKey( Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__AbsolutePathBuf), + Schema.Array(CommandExecutionRequestApprovalParams__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), Schema.Null, ]), ), @@ -24226,10 +24258,20 @@ export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = ]), ), read: Schema.optionalKey( - Schema.Union([Schema.Array(PermissionsRequestApprovalParams__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(PermissionsRequestApprovalParams__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), write: Schema.optionalKey( - Schema.Union([Schema.Array(PermissionsRequestApprovalParams__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(PermissionsRequestApprovalParams__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); @@ -24255,10 +24297,20 @@ export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions ]), ), read: Schema.optionalKey( - Schema.Union([Schema.Array(PermissionsRequestApprovalResponse__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(PermissionsRequestApprovalResponse__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), write: Schema.optionalKey( - Schema.Union([Schema.Array(PermissionsRequestApprovalResponse__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(PermissionsRequestApprovalResponse__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); @@ -24288,10 +24340,20 @@ export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct ]), ), read: Schema.optionalKey( - Schema.Union([Schema.Array(ServerNotification__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), write: Schema.optionalKey( - Schema.Union([Schema.Array(ServerNotification__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); @@ -24331,11 +24393,16 @@ export const ServerNotification__ErrorNotification = Schema.Struct({ }); export type ServerNotification__ItemCompletedNotification = { + readonly completedAtMs: number; readonly item: ServerNotification__ThreadItem; readonly threadId: string; readonly turnId: string; }; export const ServerNotification__ItemCompletedNotification = Schema.Struct({ + completedAtMs: Schema.Number.annotate({ + description: "Unix timestamp (in milliseconds) when this item lifecycle completed.", + format: "int64", + }).check(Schema.isInt()), item: ServerNotification__ThreadItem, threadId: Schema.String, turnId: Schema.String, @@ -24343,11 +24410,16 @@ export const ServerNotification__ItemCompletedNotification = Schema.Struct({ export type ServerNotification__ItemStartedNotification = { readonly item: ServerNotification__ThreadItem; + readonly startedAtMs: number; readonly threadId: string; readonly turnId: string; }; export const ServerNotification__ItemStartedNotification = Schema.Struct({ item: ServerNotification__ThreadItem, + startedAtMs: Schema.Number.annotate({ + description: "Unix timestamp (in milliseconds) when this item lifecycle started.", + format: "int64", + }).check(Schema.isInt()), threadId: Schema.String, turnId: Schema.String, }); @@ -24358,6 +24430,7 @@ export type ServerNotification__Turn = { readonly error?: ServerNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: ServerNotification__TurnStatus; }; @@ -24387,9 +24460,14 @@ export const ServerNotification__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(ServerNotification__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -24421,10 +24499,20 @@ export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({ ]), ), read: Schema.optionalKey( - Schema.Union([Schema.Array(ServerRequest__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(ServerRequest__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), write: Schema.optionalKey( - Schema.Union([Schema.Array(ServerRequest__AbsolutePathBuf), Schema.Null]), + Schema.Union([ + Schema.Array(ServerRequest__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); @@ -24436,6 +24524,38 @@ export const ServerRequest__McpElicitationMultiSelectEnumSchema = Schema.Union([ ServerRequest__McpElicitationTitledMultiSelectEnumSchema, ]); +export type V2CommandExecParams__PermissionProfileFileSystemPermissions = + | { + readonly entries: ReadonlyArray; + readonly globScanMaxDepth?: number | null; + readonly type: "restricted"; + } + | { readonly type: "unrestricted" }; +export const V2CommandExecParams__PermissionProfileFileSystemPermissions = Schema.Union( + [ + Schema.Struct({ + entries: Schema.Array(V2CommandExecParams__FileSystemSandboxEntry), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "RestrictedPermissionProfileFileSystemPermissions" }), + Schema.Struct({ + type: Schema.Literal("unrestricted").annotate({ + title: "UnrestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "UnrestrictedPermissionProfileFileSystemPermissions" }), + ], + { mode: "oneOf" }, +); + export type V2ConfigReadResponse__ProfileV2 = { readonly approval_policy?: V2ConfigReadResponse__AskForApproval | null; readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null; @@ -24445,7 +24565,7 @@ export type V2ConfigReadResponse__ProfileV2 = { readonly model_reasoning_effort?: V2ConfigReadResponse__ReasoningEffort | null; readonly model_reasoning_summary?: V2ConfigReadResponse__ReasoningSummary | null; readonly model_verbosity?: V2ConfigReadResponse__Verbosity | null; - readonly service_tier?: V2ConfigReadResponse__ServiceTier | null; + readonly service_tier?: string | null; readonly tools?: V2ConfigReadResponse__ToolsV2 | null; readonly web_search?: V2ConfigReadResponse__WebSearchMode | null; readonly [x: string]: unknown; @@ -24473,9 +24593,7 @@ export const V2ConfigReadResponse__ProfileV2 = Schema.StructWithRest( model_verbosity: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__Verbosity, Schema.Null]), ), - service_tier: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__ServiceTier, 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]), @@ -24519,13 +24637,17 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSy ), read: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf), + Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), Schema.Null, ]), ), write: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf), + Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), Schema.Null, ]), ), @@ -24555,61 +24677,135 @@ export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSyst ), read: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf), + Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), Schema.Null, ]), ), write: Schema.optionalKey( Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf), + Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf).annotate({ + description: "This will be removed in favor of `entries`.", + }), Schema.Null, ]), ), }); -export type V2PluginListResponse__PluginMarketplaceEntry = { - readonly interface?: V2PluginListResponse__MarketplaceInterface | 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 installed: boolean; + readonly interface?: V2PluginListResponse__PluginInterface | null; + readonly keywords?: ReadonlyArray; readonly name: string; - readonly path?: V2PluginListResponse__AbsolutePathBuf | null; - readonly plugins: ReadonlyArray; + readonly shareContext?: V2PluginListResponse__PluginShareContext | null; + readonly source: V2PluginListResponse__PluginSource; }; -export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({ - interface: Schema.optionalKey( - Schema.Union([V2PluginListResponse__MarketplaceInterface, Schema.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, + installed: Schema.Boolean, + interface: Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInterface, Schema.Null])), + keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), name: Schema.String, - path: Schema.optionalKey( - Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({ - description: - "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.", + shareContext: Schema.optionalKey( + Schema.Union([V2PluginListResponse__PluginShareContext, Schema.Null]).annotate({ + description: "Remote sharing context associated with this plugin when available.", }), ), - plugins: Schema.Array(V2PluginListResponse__PluginSummary), + source: V2PluginListResponse__PluginSource, }); -export type V2PluginReadResponse__PluginDetail = { - readonly apps: ReadonlyArray; - readonly description?: string | null; - readonly marketplaceName: string; - readonly marketplacePath: V2PluginReadResponse__AbsolutePathBuf; - readonly mcpServers: ReadonlyArray; - readonly skills: ReadonlyArray; - readonly summary: V2PluginReadResponse__PluginSummary; +export type V2PluginReadResponse__PluginSummary = { + readonly authPolicy: V2PluginReadResponse__PluginAuthPolicy; + readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE"; + readonly enabled: boolean; + readonly id: string; + readonly installPolicy: V2PluginReadResponse__PluginInstallPolicy; + readonly installed: boolean; + readonly interface?: V2PluginReadResponse__PluginInterface | null; + readonly keywords?: ReadonlyArray; + readonly name: string; + readonly shareContext?: V2PluginReadResponse__PluginShareContext | null; + readonly source: V2PluginReadResponse__PluginSource; }; -export const V2PluginReadResponse__PluginDetail = Schema.Struct({ - apps: Schema.Array(V2PluginReadResponse__AppSummary), - description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - marketplaceName: Schema.String, - marketplacePath: V2PluginReadResponse__AbsolutePathBuf, - mcpServers: Schema.Array(Schema.String), - skills: Schema.Array(V2PluginReadResponse__SkillSummary), - summary: V2PluginReadResponse__PluginSummary, +export 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, + installed: Schema.Boolean, + interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInterface, Schema.Null])), + keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), + name: Schema.String, + shareContext: Schema.optionalKey( + Schema.Union([V2PluginReadResponse__PluginShareContext, Schema.Null]).annotate({ + description: "Remote sharing context associated with this plugin when available.", + }), + ), + source: V2PluginReadResponse__PluginSource, +}); + +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 installed: boolean; + readonly interface?: V2PluginShareListResponse__PluginInterface | null; + readonly keywords?: ReadonlyArray; + readonly name: string; + readonly shareContext?: V2PluginShareListResponse__PluginShareContext | null; + readonly source: V2PluginShareListResponse__PluginSource; +}; +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, + installed: Schema.Boolean, + interface: Schema.optionalKey( + Schema.Union([V2PluginShareListResponse__PluginInterface, Schema.Null]), + ), + keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), + name: Schema.String, + shareContext: Schema.optionalKey( + Schema.Union([V2PluginShareListResponse__PluginShareContext, Schema.Null]).annotate({ + description: "Remote sharing context associated with this plugin when available.", + }), + ), + source: V2PluginShareListResponse__PluginSource, }); export type V2RawResponseItemCompletedNotification__ResponseItem = | { readonly content: ReadonlyArray; - readonly end_turn?: boolean | null; readonly id?: string | null; readonly phase?: V2RawResponseItemCompletedNotification__MessagePhase | null; readonly role: string; @@ -24683,17 +24879,13 @@ export type V2RawResponseItemCompletedNotification__ResponseItem = readonly status: string; readonly type: "image_generation_call"; } - | { - readonly ghost_commit: V2RawResponseItemCompletedNotification__GhostCommit; - readonly type: "ghost_snapshot"; - } | { readonly encrypted_content: string; readonly type: "compaction" } + | { readonly encrypted_content?: string | null; readonly type: "context_compaction" } | { readonly type: "other" }; export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union( [ Schema.Struct({ content: Schema.Array(V2RawResponseItemCompletedNotification__ContentItem), - end_turn: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), id: Schema.optionalKey( Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), @@ -24816,14 +25008,16 @@ export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union title: "ImageGenerationCallResponseItemType", }), }).annotate({ title: "ImageGenerationCallResponseItem" }), - Schema.Struct({ - ghost_commit: V2RawResponseItemCompletedNotification__GhostCommit, - type: Schema.Literal("ghost_snapshot").annotate({ title: "GhostSnapshotResponseItemType" }), - }).annotate({ title: "GhostSnapshotResponseItem" }), Schema.Struct({ encrypted_content: Schema.String, type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }), }).annotate({ title: "CompactionResponseItem" }), + Schema.Struct({ + encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, 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" }), @@ -24837,6 +25031,7 @@ export type V2ReviewStartResponse__Turn = { readonly error?: V2ReviewStartResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ReviewStartResponse__TurnStatus; }; @@ -24866,9 +25061,14 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ReviewStartResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -24892,12 +25092,45 @@ export const V2SkillsListResponse__SkillsListEntry = Schema.Struct({ skills: Schema.Array(V2SkillsListResponse__SkillMetadata), }); +export type V2ThreadForkResponse__PermissionProfileFileSystemPermissions = + | { + readonly entries: ReadonlyArray; + readonly globScanMaxDepth?: number | null; + readonly type: "restricted"; + } + | { readonly type: "unrestricted" }; +export const V2ThreadForkResponse__PermissionProfileFileSystemPermissions = Schema.Union( + [ + Schema.Struct({ + entries: Schema.Array(V2ThreadForkResponse__FileSystemSandboxEntry), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "RestrictedPermissionProfileFileSystemPermissions" }), + Schema.Struct({ + type: Schema.Literal("unrestricted").annotate({ + title: "UnrestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "UnrestrictedPermissionProfileFileSystemPermissions" }), + ], + { mode: "oneOf" }, +); + export type V2ThreadForkResponse__Turn = { readonly completedAt?: number | null; readonly durationMs?: number | null; readonly error?: V2ThreadForkResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadForkResponse__TurnStatus; }; @@ -24927,9 +25160,14 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadForkResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -24948,6 +25186,7 @@ export type V2ThreadListResponse__Turn = { readonly error?: V2ThreadListResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadListResponse__TurnStatus; }; @@ -24977,9 +25216,14 @@ export const V2ThreadListResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadListResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -24998,6 +25242,7 @@ export type V2ThreadMetadataUpdateResponse__Turn = { readonly error?: V2ThreadMetadataUpdateResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadMetadataUpdateResponse__TurnStatus; }; @@ -25027,9 +25272,14 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadMetadataUpdateResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25048,6 +25298,7 @@ export type V2ThreadReadResponse__Turn = { readonly error?: V2ThreadReadResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadReadResponse__TurnStatus; }; @@ -25077,9 +25328,14 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadReadResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25092,12 +25348,45 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({ status: V2ThreadReadResponse__TurnStatus, }); +export type V2ThreadResumeResponse__PermissionProfileFileSystemPermissions = + | { + readonly entries: ReadonlyArray; + readonly globScanMaxDepth?: number | null; + readonly type: "restricted"; + } + | { readonly type: "unrestricted" }; +export const V2ThreadResumeResponse__PermissionProfileFileSystemPermissions = Schema.Union( + [ + Schema.Struct({ + entries: Schema.Array(V2ThreadResumeResponse__FileSystemSandboxEntry), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "RestrictedPermissionProfileFileSystemPermissions" }), + Schema.Struct({ + type: Schema.Literal("unrestricted").annotate({ + title: "UnrestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "UnrestrictedPermissionProfileFileSystemPermissions" }), + ], + { 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; }; @@ -25127,9 +25416,14 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadResumeResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25148,6 +25442,7 @@ export type V2ThreadRollbackResponse__Turn = { readonly error?: V2ThreadRollbackResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadRollbackResponse__TurnStatus; }; @@ -25177,9 +25472,14 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadRollbackResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25198,6 +25498,7 @@ export type V2ThreadStartedNotification__Turn = { readonly error?: V2ThreadStartedNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadStartedNotification__TurnStatus; }; @@ -25227,9 +25528,14 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadStartedNotification__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25242,12 +25548,45 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({ status: V2ThreadStartedNotification__TurnStatus, }); +export type V2ThreadStartResponse__PermissionProfileFileSystemPermissions = + | { + readonly entries: ReadonlyArray; + readonly globScanMaxDepth?: number | null; + readonly type: "restricted"; + } + | { readonly type: "unrestricted" }; +export const V2ThreadStartResponse__PermissionProfileFileSystemPermissions = Schema.Union( + [ + Schema.Struct({ + entries: Schema.Array(V2ThreadStartResponse__FileSystemSandboxEntry), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + type: Schema.Literal("restricted").annotate({ + title: "RestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "RestrictedPermissionProfileFileSystemPermissions" }), + Schema.Struct({ + type: Schema.Literal("unrestricted").annotate({ + title: "UnrestrictedPermissionProfileFileSystemPermissionsType", + }), + }).annotate({ title: "UnrestrictedPermissionProfileFileSystemPermissions" }), + ], + { mode: "oneOf" }, +); + 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; }; @@ -25277,59 +25616,14 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadStartResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + description: "Thread items currently included in this turn payload.", }), - 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 V2ThreadTurnsListResponse__Turn = { - readonly completedAt?: number | null; - readonly durationMs?: number | null; - readonly error?: V2ThreadTurnsListResponse__TurnError | null; - readonly id: string; - readonly items: ReadonlyArray; - 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.", + itemsView: Schema.optionalKey( + Schema.Literals(["notLoaded", "summary", "full"]).annotate({ + description: "Describes how much of `items` has been loaded for this turn.", + default: "full", }), ), - id: Schema.String, - items: Schema.Array(V2ThreadTurnsListResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", - }), startedAt: Schema.optionalKey( Schema.Union([ Schema.Number.annotate({ @@ -25339,7 +25633,7 @@ export const V2ThreadTurnsListResponse__Turn = Schema.Struct({ Schema.Null, ]), ), - status: V2ThreadTurnsListResponse__TurnStatus, + status: V2ThreadStartResponse__TurnStatus, }); export type V2ThreadUnarchiveResponse__Turn = { @@ -25348,6 +25642,7 @@ export type V2ThreadUnarchiveResponse__Turn = { readonly error?: V2ThreadUnarchiveResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2ThreadUnarchiveResponse__TurnStatus; }; @@ -25377,9 +25672,14 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2ThreadUnarchiveResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25398,6 +25698,7 @@ export type V2TurnCompletedNotification__Turn = { readonly error?: V2TurnCompletedNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2TurnCompletedNotification__TurnStatus; }; @@ -25427,9 +25728,14 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2TurnCompletedNotification__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25448,6 +25754,7 @@ export type V2TurnStartedNotification__Turn = { readonly error?: V2TurnStartedNotification__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2TurnStartedNotification__TurnStatus; }; @@ -25477,9 +25784,14 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2TurnStartedNotification__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25498,6 +25810,7 @@ export type V2TurnStartResponse__Turn = { readonly error?: V2TurnStartResponse__TurnError | null; readonly id: string; readonly items: ReadonlyArray; + readonly itemsView?: "notLoaded" | "summary" | "full"; readonly startedAt?: number | null; readonly status: V2TurnStartResponse__TurnStatus; }; @@ -25527,9 +25840,14 @@ export const V2TurnStartResponse__Turn = Schema.Struct({ ), id: Schema.String, items: Schema.Array(V2TurnStartResponse__ThreadItem).annotate({ - description: - "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + 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({ @@ -25608,6 +25926,7 @@ export type ServerNotification__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -25624,6 +25943,7 @@ export type ServerNotification__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: ServerNotification__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -25691,6 +26011,9 @@ export const ServerNotification__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -25721,6 +26044,11 @@ export const ServerNotification__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([ServerNotification__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(ServerNotification__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -25793,7 +26121,7 @@ export type V2ConfigReadResponse__Config = { readonly review_model?: string | null; readonly sandbox_mode?: V2ConfigReadResponse__SandboxMode | null; readonly sandbox_workspace_write?: V2ConfigReadResponse__SandboxWorkspaceWrite | null; - readonly service_tier?: V2ConfigReadResponse__ServiceTier | null; + readonly service_tier?: string | null; readonly tools?: V2ConfigReadResponse__ToolsV2 | null; readonly web_search?: V2ConfigReadResponse__WebSearchMode | null; readonly [x: string]: unknown; @@ -25853,9 +26181,7 @@ export const V2ConfigReadResponse__Config = Schema.StructWithRest( sandbox_workspace_write: Schema.optionalKey( Schema.Union([V2ConfigReadResponse__SandboxWorkspaceWrite, Schema.Null]), ), - service_tier: Schema.optionalKey( - Schema.Union([V2ConfigReadResponse__ServiceTier, 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]), @@ -25904,6 +26230,62 @@ export const V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionP ), }); +export type V2PluginListResponse__PluginMarketplaceEntry = { + readonly interface?: V2PluginListResponse__MarketplaceInterface | null; + readonly name: string; + readonly path?: V2PluginListResponse__AbsolutePathBuf | null; + readonly plugins: ReadonlyArray; +}; +export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({ + interface: Schema.optionalKey( + Schema.Union([V2PluginListResponse__MarketplaceInterface, Schema.Null]), + ), + name: Schema.String, + path: Schema.optionalKey( + Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({ + description: + "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.", + }), + ), + plugins: Schema.Array(V2PluginListResponse__PluginSummary), +}); + +export type V2PluginReadResponse__PluginDetail = { + readonly apps: ReadonlyArray; + readonly description?: string | null; + readonly hooks: ReadonlyArray; + readonly marketplaceName: string; + readonly marketplacePath?: V2PluginReadResponse__AbsolutePathBuf | null; + readonly mcpServers: ReadonlyArray; + readonly skills: ReadonlyArray; + readonly summary: V2PluginReadResponse__PluginSummary; +}; +export const V2PluginReadResponse__PluginDetail = Schema.Struct({ + 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), + skills: Schema.Array(V2PluginReadResponse__SkillSummary), + summary: V2PluginReadResponse__PluginSummary, +}); + +export type V2PluginShareListResponse__PluginShareListItem = { + readonly localPluginPath?: V2PluginShareListResponse__AbsolutePathBuf | null; + readonly plugin: V2PluginShareListResponse__PluginSummary; + readonly shareUrl: string; +}; +export const V2PluginShareListResponse__PluginShareListItem = Schema.Struct({ + localPluginPath: Schema.optionalKey( + Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]), + ), + plugin: V2PluginShareListResponse__PluginSummary, + shareUrl: Schema.String, +}); + export type V2ThreadForkResponse__Thread = { readonly agentNickname?: string | null; readonly agentRole?: string | null; @@ -25918,6 +26300,7 @@ export type V2ThreadForkResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -25934,6 +26317,7 @@ export type V2ThreadForkResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadForkResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26001,6 +26385,9 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26031,6 +26418,11 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadForkResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadForkResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26055,6 +26447,7 @@ export type V2ThreadListResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26071,6 +26464,7 @@ export type V2ThreadListResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadListResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26138,6 +26532,9 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26168,6 +26565,11 @@ export const V2ThreadListResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadListResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadListResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26192,6 +26594,7 @@ export type V2ThreadMetadataUpdateResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26208,6 +26611,7 @@ export type V2ThreadMetadataUpdateResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadMetadataUpdateResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26275,6 +26679,9 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26305,6 +26712,11 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadMetadataUpdateResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadMetadataUpdateResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26329,6 +26741,7 @@ export type V2ThreadReadResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26345,6 +26758,7 @@ export type V2ThreadReadResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadReadResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26412,6 +26826,9 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26442,6 +26859,11 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadReadResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadReadResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26466,6 +26888,7 @@ export type V2ThreadResumeResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26482,6 +26905,7 @@ export type V2ThreadResumeResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadResumeResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26549,6 +26973,9 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26579,6 +27006,11 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadResumeResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadResumeResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26603,6 +27035,7 @@ export type V2ThreadStartedNotification__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26619,6 +27052,7 @@ export type V2ThreadStartedNotification__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadStartedNotification__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26686,6 +27120,9 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26716,6 +27153,11 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadStartedNotification__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadStartedNotification__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26740,6 +27182,7 @@ export type V2ThreadStartResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26756,6 +27199,7 @@ export type V2ThreadStartResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadStartResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26823,6 +27267,9 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26853,6 +27300,11 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadStartResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadStartResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -26877,6 +27329,7 @@ export type V2ThreadUnarchiveResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -26893,6 +27346,7 @@ export type V2ThreadUnarchiveResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadUnarchiveResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -26960,6 +27414,9 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -26990,6 +27447,11 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadUnarchiveResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadUnarchiveResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -27629,6 +28091,11 @@ export type ClientRequest = readonly method: "thread/shellCommand"; readonly params: ClientRequest__ThreadShellCommandParams; } + | { + readonly id: ClientRequest__RequestId; + readonly method: "thread/approveGuardianDeniedAction"; + readonly params: ClientRequest__ThreadApproveGuardianDeniedActionParams; + } | { readonly id: ClientRequest__RequestId; readonly method: "thread/rollback"; @@ -27649,11 +28116,6 @@ export type ClientRequest = 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/inject_items"; @@ -27664,6 +28126,11 @@ export type ClientRequest = readonly method: "skills/list"; readonly params: ClientRequest__SkillsListParams; } + | { + readonly id: ClientRequest__RequestId; + readonly method: "hooks/list"; + readonly params: ClientRequest__HooksListParams; + } | { readonly id: ClientRequest__RequestId; readonly method: "marketplace/add"; @@ -27674,6 +28141,11 @@ export type ClientRequest = 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"; @@ -27686,23 +28158,33 @@ export type ClientRequest = } | { readonly id: ClientRequest__RequestId; - readonly method: "app/list"; - readonly params: ClientRequest__AppsListParams; + readonly method: "plugin/skill/read"; + readonly params: ClientRequest__PluginSkillReadParams; } | { readonly id: ClientRequest__RequestId; - readonly method: "device/key/create"; - readonly params: ClientRequest__DeviceKeyCreateParams; + readonly method: "plugin/share/save"; + readonly params: ClientRequest__PluginShareSaveParams; } | { readonly id: ClientRequest__RequestId; - readonly method: "device/key/public"; - readonly params: ClientRequest__DeviceKeyPublicParams; + readonly method: "plugin/share/updateTargets"; + readonly params: ClientRequest__PluginShareUpdateTargetsParams; } | { readonly id: ClientRequest__RequestId; - readonly method: "device/key/sign"; - readonly params: ClientRequest__DeviceKeySignParams; + readonly method: "plugin/share/list"; + readonly params: ClientRequest__PluginShareListParams; + } + | { + readonly id: ClientRequest__RequestId; + readonly method: "plugin/share/delete"; + readonly params: ClientRequest__PluginShareDeleteParams; + } + | { + readonly id: ClientRequest__RequestId; + readonly method: "app/list"; + readonly params: ClientRequest__AppsListParams; } | { readonly id: ClientRequest__RequestId; @@ -27789,6 +28271,11 @@ export type ClientRequest = readonly method: "model/list"; readonly params: ClientRequest__ModelListParams; } + | { + readonly id: ClientRequest__RequestId; + readonly method: "modelProvider/capabilities/read"; + readonly params: ClientRequest__ModelProviderCapabilitiesReadParams; + } | { readonly id: ClientRequest__RequestId; readonly method: "experimentalFeature/list"; @@ -27829,6 +28316,11 @@ export type ClientRequest = readonly method: "windowsSandbox/setupStart"; readonly params: ClientRequest__WindowsSandboxSetupStartParams; } + | { + readonly id: ClientRequest__RequestId; + readonly method: "windowsSandbox/readiness"; + readonly params?: null; + } | { readonly id: ClientRequest__RequestId; readonly method: "account/login/start"; @@ -27986,6 +28478,13 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__ThreadShellCommandParams, }).annotate({ title: "Thread/shellCommandRequest" }), + Schema.Struct({ + id: ClientRequest__RequestId, + method: Schema.Literal("thread/approveGuardianDeniedAction").annotate({ + title: "Thread/approveGuardianDeniedActionRequestMethod", + }), + params: ClientRequest__ThreadApproveGuardianDeniedActionParams, + }).annotate({ title: "Thread/approveGuardianDeniedActionRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("thread/rollback").annotate({ title: "Thread/rollbackRequestMethod" }), @@ -28008,13 +28507,6 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("thread/read").annotate({ title: "Thread/readRequestMethod" }), params: ClientRequest__ThreadReadParams, }).annotate({ title: "Thread/readRequest" }), - Schema.Struct({ - id: ClientRequest__RequestId, - method: Schema.Literal("thread/turns/list").annotate({ - title: "Thread/turns/listRequestMethod", - }), - params: ClientRequest__ThreadTurnsListParams, - }).annotate({ title: "Thread/turns/listRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("thread/inject_items").annotate({ @@ -28031,6 +28523,11 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("skills/list").annotate({ title: "Skills/listRequestMethod" }), params: ClientRequest__SkillsListParams, }).annotate({ title: "Skills/listRequest" }), + 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" }), @@ -28043,6 +28540,13 @@ export const ClientRequest = Schema.Union( }), 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" }), @@ -28055,28 +28559,44 @@ export const ClientRequest = Schema.Union( }).annotate({ title: "Plugin/readRequest" }), Schema.Struct({ id: ClientRequest__RequestId, - method: Schema.Literal("app/list").annotate({ title: "App/listRequestMethod" }), - params: ClientRequest__AppsListParams, - }).annotate({ title: "App/listRequest" }), + 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("device/key/create").annotate({ - title: "Device/key/createRequestMethod", + method: Schema.Literal("plugin/share/list").annotate({ + title: "Plugin/share/listRequestMethod", }), - params: ClientRequest__DeviceKeyCreateParams, - }).annotate({ title: "Device/key/createRequest" }), + params: ClientRequest__PluginShareListParams, + }).annotate({ title: "Plugin/share/listRequest" }), Schema.Struct({ id: ClientRequest__RequestId, - method: Schema.Literal("device/key/public").annotate({ - title: "Device/key/publicRequestMethod", + method: Schema.Literal("plugin/share/delete").annotate({ + title: "Plugin/share/deleteRequestMethod", }), - params: ClientRequest__DeviceKeyPublicParams, - }).annotate({ title: "Device/key/publicRequest" }), + params: ClientRequest__PluginShareDeleteParams, + }).annotate({ title: "Plugin/share/deleteRequest" }), Schema.Struct({ id: ClientRequest__RequestId, - method: Schema.Literal("device/key/sign").annotate({ title: "Device/key/signRequestMethod" }), - params: ClientRequest__DeviceKeySignParams, - }).annotate({ title: "Device/key/signRequest" }), + method: Schema.Literal("app/list").annotate({ title: "App/listRequestMethod" }), + params: ClientRequest__AppsListParams, + }).annotate({ title: "App/listRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("fs/readFile").annotate({ title: "Fs/readFileRequestMethod" }), @@ -28170,6 +28690,13 @@ export const ClientRequest = Schema.Union( method: Schema.Literal("model/list").annotate({ title: "Model/listRequestMethod" }), params: ClientRequest__ModelListParams, }).annotate({ title: "Model/listRequest" }), + Schema.Struct({ + id: ClientRequest__RequestId, + method: Schema.Literal("modelProvider/capabilities/read").annotate({ + title: "ModelProvider/capabilities/readRequestMethod", + }), + params: ClientRequest__ModelProviderCapabilitiesReadParams, + }).annotate({ title: "ModelProvider/capabilities/readRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("experimentalFeature/list").annotate({ @@ -28226,6 +28753,13 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__WindowsSandboxSetupStartParams, }).annotate({ title: "WindowsSandbox/setupStartRequest" }), + Schema.Struct({ + id: ClientRequest__RequestId, + method: Schema.Literal("windowsSandbox/readiness").annotate({ + title: "WindowsSandbox/readinessRequestMethod", + }), + params: Schema.optionalKey(Schema.Null), + }).annotate({ title: "WindowsSandbox/readinessRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("account/login/start").annotate({ @@ -28394,29 +28928,87 @@ export const ClientRequest__DynamicToolSpec = Schema.Struct({ export type ClientRequest__NetworkAccess = "restricted" | "enabled"; export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type ClientRequest__ReadOnlyAccess = +export type ClientRequest__PermissionProfile = | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; + readonly fileSystem: ClientRequest__PermissionProfileFileSystemPermissions; + readonly network: ClientRequest__PermissionProfileNetworkPermissions; + readonly type: "managed"; } - | { readonly type: "fullAccess" }; -export const ClientRequest__ReadOnlyAccess = Schema.Union( + | { readonly type: "disabled" } + | { + readonly network: ClientRequest__PermissionProfileNetworkPermissions; + readonly type: "external"; + }; +export const ClientRequest__PermissionProfile = Schema.Union( [ Schema.Struct({ - includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - readableRoots: Schema.optionalKey( - Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), + fileSystem: ClientRequest__PermissionProfileFileSystemPermissions, + network: ClientRequest__PermissionProfileNetworkPermissions, + type: Schema.Literal("managed").annotate({ title: "ManagedPermissionProfileType" }), + }).annotate({ + title: "ManagedPermissionProfile", + description: "Codex owns sandbox construction for this profile.", + }), + Schema.Struct({ + type: Schema.Literal("disabled").annotate({ title: "DisabledPermissionProfileType" }), + }).annotate({ + title: "DisabledPermissionProfile", + description: "Do not apply an outer sandbox.", + }), Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), + network: ClientRequest__PermissionProfileNetworkPermissions, + type: Schema.Literal("external").annotate({ title: "ExternalPermissionProfileType" }), + }).annotate({ + title: "ExternalPermissionProfile", + description: "Filesystem isolation is enforced by an external caller.", + }), + ], + { mode: "oneOf" }, +); + +export type ClientRequest__PermissionProfileSelectionParams = { + readonly id: string; + readonly modifications?: ReadonlyArray | null; + readonly type: "profile"; +}; +export const ClientRequest__PermissionProfileSelectionParams = Schema.Union( + [ + Schema.Struct({ + id: Schema.String, + modifications: Schema.optionalKey( + Schema.Union([ + Schema.Array(ClientRequest__PermissionProfileModificationParams), + Schema.Null, + ]), + ), + type: Schema.Literal("profile").annotate({ + title: "ProfilePermissionProfileSelectionParamsType", + }), + }).annotate({ + title: "ProfilePermissionProfileSelectionParams", + description: + "Select a named built-in or user-defined profile and optionally apply bounded modifications that Codex knows how to validate.", + }), ], { mode: "oneOf" }, ); +export type ClientRequest__ProcessTerminalSize = { readonly cols: number; readonly rows: number }; +export const ClientRequest__ProcessTerminalSize = Schema.Struct({ + cols: Schema.Number.annotate({ + description: "Terminal width in character cells.", + format: "uint16", + }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + rows: Schema.Number.annotate({ + description: "Terminal height in character cells.", + format: "uint16", + }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), +}).annotate({ description: "PTY size in character cells for `process/spawn` PTY sessions." }); + export type ClientRequest__RealtimeOutputModality = "text" | "audio"; export const ClientRequest__RealtimeOutputModality = Schema.Literals(["text", "audio"]); @@ -28465,7 +29057,6 @@ export const ClientRequest__RealtimeVoice = Schema.Literals([ export type ClientRequest__ResponseItem = | { readonly content: ReadonlyArray; - readonly end_turn?: boolean | null; readonly id?: string | null; readonly phase?: ClientRequest__MessagePhase | null; readonly role: string; @@ -28539,14 +29130,13 @@ export type ClientRequest__ResponseItem = readonly status: string; readonly type: "image_generation_call"; } - | { readonly ghost_commit: ClientRequest__GhostCommit; readonly type: "ghost_snapshot" } | { readonly encrypted_content: string; readonly type: "compaction" } + | { readonly encrypted_content?: string | null; readonly type: "context_compaction" } | { readonly type: "other" }; export const ClientRequest__ResponseItem = Schema.Union( [ Schema.Struct({ content: Schema.Array(ClientRequest__ContentItem), - end_turn: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), id: Schema.optionalKey( Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), @@ -28661,14 +29251,16 @@ export const ClientRequest__ResponseItem = Schema.Union( title: "ImageGenerationCallResponseItemType", }), }).annotate({ title: "ImageGenerationCallResponseItem" }), - Schema.Struct({ - ghost_commit: ClientRequest__GhostCommit, - type: Schema.Literal("ghost_snapshot").annotate({ title: "GhostSnapshotResponseItemType" }), - }).annotate({ title: "GhostSnapshotResponseItem" }), Schema.Struct({ encrypted_content: Schema.String, type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }), }).annotate({ title: "CompactionResponseItem" }), + Schema.Struct({ + encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, 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" }), @@ -28676,6 +29268,14 @@ export const ClientRequest__ResponseItem = Schema.Union( { mode: "oneOf" }, ); +export type ClientRequest__ThreadGoalStatus = "active" | "paused" | "budgetLimited" | "complete"; +export const ClientRequest__ThreadGoalStatus = Schema.Literals([ + "active", + "paused", + "budgetLimited", + "complete", +]); + export type ClientRequest__ThreadMemoryMode = "enabled" | "disabled"; export const ClientRequest__ThreadMemoryMode = Schema.Literals(["enabled", "disabled"]); @@ -28726,6 +29326,18 @@ export const ClientRequest__ThreadRealtimeStartTransport = Schema.Union( { mode: "oneOf" }, ).annotate({ description: "EXPERIMENTAL - transport used by thread realtime." }); +export type ClientRequest__TurnEnvironmentParams = { + readonly cwd: ClientRequest__AbsolutePathBuf; + readonly environmentId: string; +}; +export const ClientRequest__TurnEnvironmentParams = Schema.Struct({ + cwd: ClientRequest__AbsolutePathBuf, + environmentId: Schema.String, +}); + +export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full"; +export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]); + export type CommandExecutionRequestApprovalParams = { readonly approvalId?: string | null; readonly command?: string | null; @@ -28820,7 +29432,7 @@ export const CommandExecutionRequestApprovalParams__AdditionalPermissionProfile Schema.Union([ CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null, - ]), + ]).annotate({ description: "Partial overlay used for per-command permission requests." }), ), }); @@ -29230,10 +29842,20 @@ export const PermissionsRequestApprovalParams = Schema.Struct({ export type PermissionsRequestApprovalResponse = { readonly permissions: PermissionsRequestApprovalResponse__GrantedPermissionProfile; readonly scope?: "turn" | "session"; + readonly strictAutoReview?: boolean | null; }; export const PermissionsRequestApprovalResponse = Schema.Struct({ permissions: PermissionsRequestApprovalResponse__GrantedPermissionProfile, scope: Schema.optionalKey(Schema.Literals(["turn", "session"]).annotate({ default: "turn" })), + strictAutoReview: Schema.optionalKey( + Schema.Union([ + Schema.Boolean.annotate({ + description: + "Review every subsequent command in this turn before normal sandboxed execution.", + }), + Schema.Null, + ]), + ), }).annotate({ title: "PermissionsRequestApprovalResponse" }); export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session"; @@ -29278,6 +29900,14 @@ export type ServerNotification = readonly method: "thread/name/updated"; readonly params: ServerNotification__ThreadNameUpdatedNotification; } + | { + readonly method: "thread/goal/updated"; + readonly params: ServerNotification__ThreadGoalUpdatedNotification; + } + | { + readonly method: "thread/goal/cleared"; + readonly params: ServerNotification__ThreadGoalClearedNotification; + } | { readonly method: "thread/tokenUsage/updated"; readonly params: ServerNotification__ThreadTokenUsageUpdatedNotification; @@ -29334,6 +29964,14 @@ export type ServerNotification = readonly method: "command/exec/outputDelta"; readonly params: ServerNotification__CommandExecOutputDeltaNotification; } + | { + readonly method: "process/outputDelta"; + readonly params: ServerNotification__ProcessOutputDeltaNotification; + } + | { + readonly method: "process/exited"; + readonly params: ServerNotification__ProcessExitedNotification; + } | { readonly method: "item/commandExecution/outputDelta"; readonly params: ServerNotification__CommandExecutionOutputDeltaNotification; @@ -29378,6 +30016,10 @@ export type ServerNotification = readonly method: "app/list/updated"; readonly params: ServerNotification__AppListUpdatedNotification; } + | { + readonly method: "remoteControl/status/changed"; + readonly params: ServerNotification__RemoteControlStatusChangedNotification; + } | { readonly method: "externalAgentConfig/import/completed"; readonly params: ServerNotification__ExternalAgentConfigImportCompletedNotification; @@ -29403,7 +30045,15 @@ export type ServerNotification = readonly method: "model/rerouted"; readonly params: ServerNotification__ModelReroutedNotification; } + | { + readonly method: "model/verification"; + readonly params: ServerNotification__ModelVerificationNotification; + } | { readonly method: "warning"; readonly params: ServerNotification__WarningNotification } + | { + readonly method: "guardianWarning"; + readonly params: ServerNotification__GuardianWarningNotification; + } | { readonly method: "deprecationNotice"; readonly params: ServerNotification__DeprecationNoticeNotification; @@ -29512,6 +30162,18 @@ export const ServerNotification = Schema.Union( }), params: ServerNotification__ThreadNameUpdatedNotification, }).annotate({ title: "Thread/name/updatedNotification" }), + Schema.Struct({ + method: Schema.Literal("thread/goal/updated").annotate({ + title: "Thread/goal/updatedNotificationMethod", + }), + params: ServerNotification__ThreadGoalUpdatedNotification, + }).annotate({ title: "Thread/goal/updatedNotification" }), + Schema.Struct({ + method: Schema.Literal("thread/goal/cleared").annotate({ + title: "Thread/goal/clearedNotificationMethod", + }), + params: ServerNotification__ThreadGoalClearedNotification, + }).annotate({ title: "Thread/goal/clearedNotification" }), Schema.Struct({ method: Schema.Literal("thread/tokenUsage/updated").annotate({ title: "Thread/tokenUsage/updatedNotificationMethod", @@ -29597,6 +30259,25 @@ export const ServerNotification = Schema.Union( description: "Stream base64-encoded stdout/stderr chunks for a running `command/exec` session.", }), + Schema.Struct({ + method: Schema.Literal("process/outputDelta").annotate({ + title: "Process/outputDeltaNotificationMethod", + }), + params: ServerNotification__ProcessOutputDeltaNotification, + }).annotate({ + title: "Process/outputDeltaNotification", + description: + "Stream base64-encoded stdout/stderr chunks for a running `process/spawn` session.", + }), + Schema.Struct({ + method: Schema.Literal("process/exited").annotate({ + title: "Process/exitedNotificationMethod", + }), + params: ServerNotification__ProcessExitedNotification, + }).annotate({ + title: "Process/exitedNotification", + description: "Final exit notification for a `process/spawn` session.", + }), Schema.Struct({ method: Schema.Literal("item/commandExecution/outputDelta").annotate({ title: "Item/commandExecution/outputDeltaNotificationMethod", @@ -29614,7 +30295,10 @@ export const ServerNotification = Schema.Union( title: "Item/fileChange/outputDeltaNotificationMethod", }), params: ServerNotification__FileChangeOutputDeltaNotification, - }).annotate({ title: "Item/fileChange/outputDeltaNotification" }), + }).annotate({ + title: "Item/fileChange/outputDeltaNotification", + description: "Deprecated legacy apply_patch output stream notification.", + }), Schema.Struct({ method: Schema.Literal("item/fileChange/patchUpdated").annotate({ title: "Item/fileChange/patchUpdatedNotificationMethod", @@ -29663,6 +30347,12 @@ export const ServerNotification = Schema.Union( }), params: ServerNotification__AppListUpdatedNotification, }).annotate({ title: "App/list/updatedNotification" }), + Schema.Struct({ + method: Schema.Literal("remoteControl/status/changed").annotate({ + title: "RemoteControl/status/changedNotificationMethod", + }), + params: ServerNotification__RemoteControlStatusChangedNotification, + }).annotate({ title: "RemoteControl/status/changedNotification" }), Schema.Struct({ method: Schema.Literal("externalAgentConfig/import/completed").annotate({ title: "ExternalAgentConfig/import/completedNotificationMethod", @@ -29706,10 +30396,22 @@ export const ServerNotification = Schema.Union( }), params: ServerNotification__ModelReroutedNotification, }).annotate({ title: "Model/reroutedNotification" }), + Schema.Struct({ + method: Schema.Literal("model/verification").annotate({ + title: "Model/verificationNotificationMethod", + }), + params: ServerNotification__ModelVerificationNotification, + }).annotate({ title: "Model/verificationNotification" }), Schema.Struct({ method: Schema.Literal("warning").annotate({ title: "WarningNotificationMethod" }), params: ServerNotification__WarningNotification, }).annotate({ title: "WarningNotification" }), + Schema.Struct({ + method: Schema.Literal("guardianWarning").annotate({ + title: "GuardianWarningNotificationMethod", + }), + params: ServerNotification__GuardianWarningNotification, + }).annotate({ title: "GuardianWarningNotification" }), Schema.Struct({ method: Schema.Literal("deprecationNotice").annotate({ title: "DeprecationNoticeNotificationMethod", @@ -29866,6 +30568,8 @@ export type ServerNotification__HookSource = | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; @@ -29875,11 +30579,19 @@ export const ServerNotification__HookSource = Schema.Literals([ "project", "mdm", "sessionFlags", + "plugin", + "cloudRequirements", "legacyManagedConfigFile", "legacyManagedConfigMdm", "unknown", ]); +export type ServerNotification__ProcessOutputStream = "stdout" | "stderr"; +export const ServerNotification__ProcessOutputStream = Schema.Literals([ + "stdout", + "stderr", +]).annotate({ description: "Stream label for `process/outputDelta` notifications." }); + export type ServerNotification__SessionSource = | "cli" | "vscode" @@ -29899,6 +30611,9 @@ export const ServerNotification__SessionSource = Schema.Union( { mode: "oneOf" }, ); +export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full"; +export const ServerNotification__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]); + export type ServerRequest = | { readonly id: ServerRequest__RequestId; @@ -30052,7 +30767,9 @@ export const ServerRequest__AdditionalPermissionProfile = Schema.Struct({ Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]), ), network: Schema.optionalKey( - Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]), + Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]).annotate({ + description: "Partial overlay used for per-command permission requests.", + }), ), }); @@ -30399,7 +31116,7 @@ export const V2CommandExecParams = Schema.Struct({ sandboxPolicy: Schema.optionalKey( Schema.Union([V2CommandExecParams__SandboxPolicy, Schema.Null]).annotate({ description: - "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted.", + "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( @@ -30443,25 +31160,40 @@ export const V2CommandExecParams = Schema.Struct({ export type V2CommandExecParams__NetworkAccess = "restricted" | "enabled"; export const V2CommandExecParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2CommandExecParams__ReadOnlyAccess = +export type V2CommandExecParams__PermissionProfile = | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; + readonly fileSystem: V2CommandExecParams__PermissionProfileFileSystemPermissions; + readonly network: V2CommandExecParams__PermissionProfileNetworkPermissions; + readonly type: "managed"; } - | { readonly type: "fullAccess" }; -export const V2CommandExecParams__ReadOnlyAccess = Schema.Union( + | { readonly type: "disabled" } + | { + readonly network: V2CommandExecParams__PermissionProfileNetworkPermissions; + readonly type: "external"; + }; +export const V2CommandExecParams__PermissionProfile = Schema.Union( [ Schema.Struct({ - includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - readableRoots: Schema.optionalKey( - Schema.Array(V2CommandExecParams__AbsolutePathBuf).annotate({ default: [] }), - ), - type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), + fileSystem: V2CommandExecParams__PermissionProfileFileSystemPermissions, + network: V2CommandExecParams__PermissionProfileNetworkPermissions, + type: Schema.Literal("managed").annotate({ title: "ManagedPermissionProfileType" }), + }).annotate({ + title: "ManagedPermissionProfile", + description: "Codex owns sandbox construction for this profile.", + }), + Schema.Struct({ + type: Schema.Literal("disabled").annotate({ title: "DisabledPermissionProfileType" }), + }).annotate({ + title: "DisabledPermissionProfile", + description: "Do not apply an outer sandbox.", + }), Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), + network: V2CommandExecParams__PermissionProfileNetworkPermissions, + type: Schema.Literal("external").annotate({ title: "ExternalPermissionProfileType" }), + }).annotate({ + title: "ExternalPermissionProfile", + description: "Filesystem isolation is enforced by an external caller.", + }), ], { mode: "oneOf" }, ); @@ -30707,13 +31439,42 @@ export const V2ConfigRequirementsReadResponse = Schema.Struct({ ), }).annotate({ title: "ConfigRequirementsReadResponse" }); -export type V2ConfigRequirementsReadResponse__ApprovalsReviewer = "user" | "guardian_subagent"; +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`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", +}); + +export type V2ConfigRequirementsReadResponse__ManagedHooksRequirements = { + readonly PermissionRequest: ReadonlyArray; + readonly PostCompact: ReadonlyArray; + readonly PostToolUse: ReadonlyArray; + readonly PreCompact: ReadonlyArray; + readonly PreToolUse: ReadonlyArray; + readonly SessionStart: ReadonlyArray; + readonly Stop: 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), + SessionStart: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), + Stop: 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__NetworkRequirements = { @@ -30907,97 +31668,6 @@ export const V2DeprecationNoticeNotification = Schema.Struct({ summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }), }).annotate({ title: "DeprecationNoticeNotification" }); -export type V2DeviceKeyCreateParams = { - readonly accountUserId: string; - readonly clientId: string; - readonly protectionPolicy?: V2DeviceKeyCreateParams__DeviceKeyProtectionPolicy | null; -}; -export const V2DeviceKeyCreateParams = Schema.Struct({ - accountUserId: Schema.String, - clientId: Schema.String, - protectionPolicy: Schema.optionalKey( - Schema.Union([V2DeviceKeyCreateParams__DeviceKeyProtectionPolicy, Schema.Null]).annotate({ - description: "Defaults to `hardware_only` when omitted.", - }), - ), -}).annotate({ - title: "DeviceKeyCreateParams", - description: "Create a controller-local device key with a random key id.", -}); - -export type V2DeviceKeyCreateResponse = { - readonly algorithm: V2DeviceKeyCreateResponse__DeviceKeyAlgorithm; - readonly keyId: string; - readonly protectionClass: V2DeviceKeyCreateResponse__DeviceKeyProtectionClass; - readonly publicKeySpkiDerBase64: string; -}; -export const V2DeviceKeyCreateResponse = Schema.Struct({ - algorithm: V2DeviceKeyCreateResponse__DeviceKeyAlgorithm, - keyId: Schema.String, - protectionClass: V2DeviceKeyCreateResponse__DeviceKeyProtectionClass, - publicKeySpkiDerBase64: Schema.String.annotate({ - description: "SubjectPublicKeyInfo DER encoded as base64.", - }), -}).annotate({ - title: "DeviceKeyCreateResponse", - description: "Device-key metadata and public key returned by create/public APIs.", -}); - -export type V2DeviceKeyPublicParams = { readonly keyId: string }; -export const V2DeviceKeyPublicParams = Schema.Struct({ keyId: Schema.String }).annotate({ - title: "DeviceKeyPublicParams", - description: "Fetch a controller-local device key public key by id.", -}); - -export type V2DeviceKeyPublicResponse = { - readonly algorithm: V2DeviceKeyPublicResponse__DeviceKeyAlgorithm; - readonly keyId: string; - readonly protectionClass: V2DeviceKeyPublicResponse__DeviceKeyProtectionClass; - readonly publicKeySpkiDerBase64: string; -}; -export const V2DeviceKeyPublicResponse = Schema.Struct({ - algorithm: V2DeviceKeyPublicResponse__DeviceKeyAlgorithm, - keyId: Schema.String, - protectionClass: V2DeviceKeyPublicResponse__DeviceKeyProtectionClass, - publicKeySpkiDerBase64: Schema.String.annotate({ - description: "SubjectPublicKeyInfo DER encoded as base64.", - }), -}).annotate({ - title: "DeviceKeyPublicResponse", - description: "Device-key public metadata returned by `device/key/public`.", -}); - -export type V2DeviceKeySignParams = { - readonly keyId: string; - readonly payload: V2DeviceKeySignParams__DeviceKeySignPayload; -}; -export const V2DeviceKeySignParams = Schema.Struct({ - keyId: Schema.String, - payload: V2DeviceKeySignParams__DeviceKeySignPayload, -}).annotate({ - title: "DeviceKeySignParams", - description: "Sign an accepted structured payload with a controller-local device key.", -}); - -export type V2DeviceKeySignResponse = { - readonly algorithm: V2DeviceKeySignResponse__DeviceKeyAlgorithm; - readonly signatureDerBase64: string; - readonly signedPayloadBase64: string; -}; -export const V2DeviceKeySignResponse = Schema.Struct({ - algorithm: V2DeviceKeySignResponse__DeviceKeyAlgorithm, - signatureDerBase64: Schema.String.annotate({ - description: "ECDSA signature DER encoded as base64.", - }), - signedPayloadBase64: Schema.String.annotate({ - description: - "Exact bytes signed by the device key, encoded as base64. Verifiers must verify this byte string directly and must not reserialize `payload`.", - }), -}).annotate({ - title: "DeviceKeySignResponse", - description: "ASN.1 DER signature returned by `device/key/sign`.", -}); - export type V2ErrorNotification = { readonly error: V2ErrorNotification__TurnError; readonly threadId: string; @@ -31166,7 +31836,11 @@ export const V2FileChangeOutputDeltaNotification = Schema.Struct({ itemId: Schema.String, threadId: Schema.String, turnId: Schema.String, -}).annotate({ title: "FileChangeOutputDeltaNotification" }); +}).annotate({ + title: "FileChangeOutputDeltaNotification", + description: + "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.", +}); export type V2FileChangePatchUpdatedNotification = { readonly changes: ReadonlyArray; @@ -31543,6 +32217,14 @@ export const V2GetAccountResponse = Schema.Struct({ requiresOpenaiAuth: Schema.Boolean, }).annotate({ title: "GetAccountResponse" }); +export type V2GuardianWarningNotification = { readonly message: string; readonly threadId: string }; +export const V2GuardianWarningNotification = Schema.Struct({ + message: Schema.String.annotate({ + description: "Concise guardian warning message for the user.", + }), + threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }), +}).annotate({ title: "GuardianWarningNotification" }); + export type V2HookCompletedNotification = { readonly run: V2HookCompletedNotification__HookRunSummary; readonly threadId: string; @@ -31560,6 +32242,8 @@ export type V2HookCompletedNotification__HookSource = | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; @@ -31569,11 +32253,29 @@ export const V2HookCompletedNotification__HookSource = Schema.Literals([ "project", "mdm", "sessionFlags", + "plugin", + "cloudRequirements", "legacyManagedConfigFile", "legacyManagedConfigMdm", "unknown", ]); +export type V2HooksListParams = { readonly cwds?: ReadonlyArray }; +export const V2HooksListParams = Schema.Struct({ + cwds: Schema.optionalKey( + Schema.Array(Schema.String).annotate({ + description: "When empty, defaults to the current session working directory.", + }), + ), +}).annotate({ title: "HooksListParams" }); + +export type V2HooksListResponse = { + readonly data: ReadonlyArray; +}; +export const V2HooksListResponse = Schema.Struct({ + data: Schema.Array(V2HooksListResponse__HooksListEntry), +}).annotate({ title: "HooksListResponse" }); + export type V2HookStartedNotification = { readonly run: V2HookStartedNotification__HookRunSummary; readonly threadId: string; @@ -31591,6 +32293,8 @@ export type V2HookStartedNotification__HookSource = | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; @@ -31600,17 +32304,24 @@ export const V2HookStartedNotification__HookSource = Schema.Literals([ "project", "mdm", "sessionFlags", + "plugin", + "cloudRequirements", "legacyManagedConfigFile", "legacyManagedConfigMdm", "unknown", ]); export type V2ItemCompletedNotification = { + readonly completedAtMs: number; readonly item: V2ItemCompletedNotification__ThreadItem; readonly threadId: string; readonly turnId: string; }; export const V2ItemCompletedNotification = Schema.Struct({ + completedAtMs: Schema.Number.annotate({ + description: "Unix timestamp (in milliseconds) when this item lifecycle completed.", + format: "int64", + }).check(Schema.isInt()), item: V2ItemCompletedNotification__ThreadItem, threadId: Schema.String, turnId: Schema.String, @@ -31727,11 +32438,16 @@ export const V2ItemGuardianApprovalReviewStartedNotification = Schema.Struct({ 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" }); @@ -31834,7 +32550,7 @@ export const V2ListMcpServerStatusResponse = Schema.Struct({ export type V2LoginAccountParams = | { readonly apiKey: string; readonly type: "apiKey" } - | { readonly type: "chatgpt" } + | { readonly codexStreamlinedLogin?: boolean; readonly type: "chatgpt" } | { readonly type: "chatgptDeviceCode" } | { readonly accessToken: string; @@ -31849,6 +32565,7 @@ export const V2LoginAccountParams = Schema.Union( type: Schema.Literal("apiKey").annotate({ title: "ApiKeyv2::LoginAccountParamsType" }), }).annotate({ title: "ApiKeyv2::LoginAccountParams" }), Schema.Struct({ + codexStreamlinedLogin: Schema.optionalKey(Schema.Boolean), type: Schema.Literal("chatgpt").annotate({ title: "Chatgptv2::LoginAccountParamsType" }), }).annotate({ title: "Chatgptv2::LoginAccountParams" }), Schema.Struct({ @@ -31972,6 +32689,22 @@ export const V2MarketplaceRemoveResponse = Schema.Struct({ marketplaceName: Schema.String, }).annotate({ title: "MarketplaceRemoveResponse" }); +export type V2MarketplaceUpgradeParams = { readonly marketplaceName?: string | null }; +export const V2MarketplaceUpgradeParams = Schema.Struct({ + marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}).annotate({ title: "MarketplaceUpgradeParams" }); + +export type V2MarketplaceUpgradeResponse = { + readonly errors: ReadonlyArray; + readonly selectedMarketplaces: ReadonlyArray; + readonly upgradedRoots: ReadonlyArray; +}; +export const V2MarketplaceUpgradeResponse = Schema.Struct({ + errors: Schema.Array(V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo), + selectedMarketplaces: Schema.Array(Schema.String), + upgradedRoots: Schema.Array(V2MarketplaceUpgradeResponse__AbsolutePathBuf), +}).annotate({ title: "MarketplaceUpgradeResponse" }); + export type V2McpResourceReadParams = { readonly server: string; readonly threadId?: string | null; @@ -32128,6 +32861,22 @@ export const V2ModelListResponse = Schema.Struct({ ), }).annotate({ title: "ModelListResponse" }); +export type V2ModelProviderCapabilitiesReadParams = {}; +export const V2ModelProviderCapabilitiesReadParams = Schema.Struct({}).annotate({ + title: "ModelProviderCapabilitiesReadParams", +}); + +export type V2ModelProviderCapabilitiesReadResponse = { + readonly imageGeneration: boolean; + readonly namespaceTools: boolean; + readonly webSearch: boolean; +}; +export const V2ModelProviderCapabilitiesReadResponse = Schema.Struct({ + imageGeneration: Schema.Boolean, + namespaceTools: Schema.Boolean, + webSearch: Schema.Boolean, +}).annotate({ title: "ModelProviderCapabilitiesReadResponse" }); + export type V2ModelReroutedNotification = { readonly fromModel: string; readonly reason: V2ModelReroutedNotification__ModelRerouteReason; @@ -32143,6 +32892,17 @@ export const V2ModelReroutedNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "ModelReroutedNotification" }); +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 V2PlanDeltaNotification = { readonly delta: string; readonly itemId: string; @@ -32184,6 +32944,7 @@ export const V2PluginInstallResponse = Schema.Struct({ export type V2PluginListParams = { readonly cwds?: ReadonlyArray | null; + readonly marketplaceKinds?: ReadonlyArray | null; }; export const V2PluginListParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -32195,6 +32956,15 @@ export const V2PluginListParams = Schema.Struct({ Schema.Null, ]), ), + marketplaceKinds: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2PluginListParams__PluginListMarketplaceKind).annotate({ + description: + "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.", + }), + Schema.Null, + ]), + ), }).annotate({ title: "PluginListParams" }); export type V2PluginListResponse = { @@ -32210,6 +32980,12 @@ export const V2PluginListResponse = Schema.Struct({ marketplaces: Schema.Array(V2PluginListResponse__PluginMarketplaceEntry), }).annotate({ title: "PluginListResponse" }); +export type V2PluginListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; +export const V2PluginListResponse__PluginAvailability = Schema.Literals([ + "DISABLED_BY_ADMIN", + "AVAILABLE", +]); + export type V2PluginReadParams = { readonly marketplacePath?: V2PluginReadParams__AbsolutePathBuf | null; readonly pluginName: string; @@ -32228,6 +33004,98 @@ export const V2PluginReadResponse = Schema.Struct({ plugin: V2PluginReadResponse__PluginDetail, }).annotate({ title: "PluginReadResponse" }); +export type V2PluginReadResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; +export const V2PluginReadResponse__PluginAvailability = Schema.Literals([ + "DISABLED_BY_ADMIN", + "AVAILABLE", +]); + +export type V2PluginShareDeleteParams = { readonly remotePluginId: string }; +export const V2PluginShareDeleteParams = Schema.Struct({ remotePluginId: Schema.String }).annotate({ + title: "PluginShareDeleteParams", +}); + +export type V2PluginShareDeleteResponse = {}; +export const V2PluginShareDeleteResponse = Schema.Struct({}).annotate({ + title: "PluginShareDeleteResponse", +}); + +export type V2PluginShareListParams = {}; +export const V2PluginShareListParams = Schema.Struct({}).annotate({ + title: "PluginShareListParams", +}); + +export type V2PluginShareListResponse = { + readonly data: ReadonlyArray; +}; +export const V2PluginShareListResponse = Schema.Struct({ + data: Schema.Array(V2PluginShareListResponse__PluginShareListItem), +}).annotate({ title: "PluginShareListResponse" }); + +export type V2PluginShareListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE"; +export const V2PluginShareListResponse__PluginAvailability = Schema.Literals([ + "DISABLED_BY_ADMIN", + "AVAILABLE", +]); + +export type V2PluginShareSaveParams = { + readonly discoverability?: V2PluginShareSaveParams__PluginShareDiscoverability | null; + readonly pluginPath: V2PluginShareSaveParams__AbsolutePathBuf; + readonly remotePluginId?: string | null; + readonly shareTargets?: ReadonlyArray | null; +}; +export const V2PluginShareSaveParams = Schema.Struct({ + discoverability: Schema.optionalKey( + Schema.Union([V2PluginShareSaveParams__PluginShareDiscoverability, Schema.Null]), + ), + pluginPath: V2PluginShareSaveParams__AbsolutePathBuf, + remotePluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + shareTargets: Schema.optionalKey( + Schema.Union([Schema.Array(V2PluginShareSaveParams__PluginShareTarget), Schema.Null]), + ), +}).annotate({ title: "PluginShareSaveParams" }); + +export type V2PluginShareSaveResponse = { + readonly remotePluginId: string; + readonly shareUrl: string; +}; +export const V2PluginShareSaveResponse = Schema.Struct({ + remotePluginId: Schema.String, + shareUrl: Schema.String, +}).annotate({ title: "PluginShareSaveResponse" }); + +export type V2PluginShareUpdateTargetsParams = { + readonly remotePluginId: string; + readonly shareTargets: ReadonlyArray; +}; +export const V2PluginShareUpdateTargetsParams = Schema.Struct({ + remotePluginId: Schema.String, + shareTargets: Schema.Array(V2PluginShareUpdateTargetsParams__PluginShareTarget), +}).annotate({ title: "PluginShareUpdateTargetsParams" }); + +export type V2PluginShareUpdateTargetsResponse = { + readonly principals: ReadonlyArray; +}; +export const V2PluginShareUpdateTargetsResponse = Schema.Struct({ + principals: Schema.Array(V2PluginShareUpdateTargetsResponse__PluginSharePrincipal), +}).annotate({ title: "PluginShareUpdateTargetsResponse" }); + +export type V2PluginSkillReadParams = { + readonly remoteMarketplaceName: string; + readonly remotePluginId: string; + readonly skillName: string; +}; +export const V2PluginSkillReadParams = Schema.Struct({ + remoteMarketplaceName: Schema.String, + remotePluginId: Schema.String, + skillName: Schema.String, +}).annotate({ title: "PluginSkillReadParams" }); + +export type V2PluginSkillReadResponse = { readonly contents?: string | null }; +export const V2PluginSkillReadResponse = Schema.Struct({ + contents: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}).annotate({ title: "PluginSkillReadResponse" }); + export type V2PluginUninstallParams = { readonly pluginId: string }; export const V2PluginUninstallParams = Schema.Struct({ pluginId: Schema.String }).annotate({ title: "PluginUninstallParams", @@ -32238,6 +33106,71 @@ export const V2PluginUninstallResponse = Schema.Struct({}).annotate({ title: "PluginUninstallResponse", }); +export type V2ProcessExitedNotification = { + readonly exitCode: number; + readonly processHandle: string; + readonly stderr: string; + readonly stderrCapReached: boolean; + readonly stdout: string; + readonly stdoutCapReached: boolean; +}; +export const V2ProcessExitedNotification = Schema.Struct({ + exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check( + Schema.isInt(), + ), + processHandle: Schema.String.annotate({ + description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", + }), + stderr: Schema.String.annotate({ + description: + "Buffered stderr capture.\n\nEmpty when stderr was streamed via `process/outputDelta`.", + }), + stderrCapReached: Schema.Boolean.annotate({ + description: + "Whether stderr reached `outputBytesCap`.\n\nIn streaming mode, stderr is empty and cap state is also reported on the final stderr `process/outputDelta` notification.", + }), + stdout: Schema.String.annotate({ + description: + "Buffered stdout capture.\n\nEmpty when stdout was streamed via `process/outputDelta`.", + }), + stdoutCapReached: Schema.Boolean.annotate({ + description: + "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.", + }), +}).annotate({ + title: "ProcessExitedNotification", + description: "Final process exit notification for `process/spawn`.", +}); + +export type V2ProcessOutputDeltaNotification = { + readonly capReached: boolean; + readonly deltaBase64: string; + readonly processHandle: string; + readonly stream: "stdout" | "stderr"; +}; +export const V2ProcessOutputDeltaNotification = Schema.Struct({ + capReached: Schema.Boolean.annotate({ + description: + "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.", + }), + deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }), + processHandle: Schema.String.annotate({ + description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", + }), + stream: Schema.Literals(["stdout", "stderr"]).annotate({ + description: "Stream label for `process/outputDelta` notifications.", + }), +}).annotate({ + title: "ProcessOutputDeltaNotification", + description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.", +}); + +export type V2ProcessOutputDeltaNotification__ProcessOutputStream = "stdout" | "stderr"; +export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Literals([ + "stdout", + "stderr", +]).annotate({ description: "Stream label for `process/outputDelta` notifications." }); + export type V2RawResponseItemCompletedNotification = { readonly item: V2RawResponseItemCompletedNotification__ResponseItem; readonly threadId: string; @@ -32292,6 +33225,18 @@ export const V2ReasoningTextDeltaNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "ReasoningTextDeltaNotification" }); +export type V2RemoteControlStatusChangedNotification = { + readonly environmentId?: string | null; + readonly status: V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus; +}; +export const V2RemoteControlStatusChangedNotification = Schema.Struct({ + environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + status: V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus, +}).annotate({ + title: "RemoteControlStatusChangedNotification", + description: "Current remote-control connection status and environment id exposed to clients.", +}); + export type V2ReviewStartParams = { readonly delivery?: V2ReviewStartParams__ReviewDelivery | null; readonly target: V2ReviewStartParams__ReviewTarget; @@ -32366,6 +33311,13 @@ export const V2ReviewStartResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); +export type V2ReviewStartResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ReviewStartResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2SendAddCreditsNudgeEmailParams = { readonly creditType: V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType; }; @@ -32466,6 +33418,22 @@ export const V2TerminalInteractionNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "TerminalInteractionNotification" }); +export type V2ThreadApproveGuardianDeniedActionParams = { + readonly event: unknown; + readonly threadId: string; +}; +export const V2ThreadApproveGuardianDeniedActionParams = Schema.Struct({ + event: Schema.Unknown.annotate({ + description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.", + }), + threadId: Schema.String, +}).annotate({ title: "ThreadApproveGuardianDeniedActionParams" }); + +export type V2ThreadApproveGuardianDeniedActionResponse = {}; +export const V2ThreadApproveGuardianDeniedActionResponse = Schema.Struct({}).annotate({ + title: "ThreadApproveGuardianDeniedActionResponse", +}); + export type V2ThreadArchivedNotification = { readonly threadId: string }; export const V2ThreadArchivedNotification = Schema.Struct({ threadId: Schema.String }).annotate({ title: "ThreadArchivedNotification", @@ -32507,8 +33475,9 @@ export type V2ThreadForkParams = { readonly model?: string | null; readonly modelProvider?: string | null; readonly sandbox?: V2ThreadForkParams__SandboxMode | null; - readonly serviceTier?: V2ThreadForkParams__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly threadId: string; + readonly threadSource?: V2ThreadForkParams__ThreadSource | null; }; export const V2ThreadForkParams = Schema.Struct({ approvalPolicy: Schema.optionalKey( @@ -32537,33 +33506,74 @@ export const V2ThreadForkParams = Schema.Struct({ ), modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([V2ThreadForkParams__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([V2ThreadForkParams__ServiceTier, Schema.Null]), Schema.Null]), - ), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadForkParams__ThreadSource, Schema.Null]).annotate({ + description: + "Optional client-supplied analytics source classification for this forked thread.", + }), + ), }).annotate({ title: "ThreadForkParams", description: "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", }); +export type V2ThreadForkParams__PermissionProfileSelectionParams = { + readonly id: string; + readonly modifications?: ReadonlyArray | null; + readonly type: "profile"; +}; +export const V2ThreadForkParams__PermissionProfileSelectionParams = Schema.Union( + [ + Schema.Struct({ + id: Schema.String, + modifications: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2ThreadForkParams__PermissionProfileModificationParams), + Schema.Null, + ]), + ), + type: Schema.Literal("profile").annotate({ + title: "ProfilePermissionProfileSelectionParamsType", + }), + }).annotate({ + title: "ProfilePermissionProfileSelectionParams", + description: + "Select a named built-in or user-defined profile and optionally apply bounded modifications that Codex knows how to validate.", + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadForkResponse = { readonly approvalPolicy: V2ThreadForkResponse__AskForApproval; - readonly approvalsReviewer: "user" | "guardian_subagent"; + readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent"; readonly cwd: V2ThreadForkResponse__AbsolutePathBuf; readonly instructionSources?: ReadonlyArray; readonly model: string; readonly modelProvider: string; readonly reasoningEffort?: V2ThreadForkResponse__ReasoningEffort | null; - readonly sandbox: V2ThreadForkResponse__SandboxPolicy; - readonly serviceTier?: V2ThreadForkResponse__ServiceTier | null; + readonly sandbox: + | { readonly type: "dangerFullAccess" } + | { readonly networkAccess?: boolean; readonly type: "readOnly" } + | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } + | { + readonly excludeSlashTmp?: boolean; + readonly excludeTmpdirEnvVar?: boolean; + readonly networkAccess?: boolean; + readonly type: "workspaceWrite"; + readonly writableRoots?: ReadonlyArray; + }; + readonly serviceTier?: string | null; readonly thread: V2ThreadForkResponse__Thread; }; export const V2ThreadForkResponse = Schema.Struct({ approvalPolicy: V2ThreadForkResponse__AskForApproval, - approvalsReviewer: Schema.Literals(["user", "guardian_subagent"]).annotate({ + 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`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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: V2ThreadForkResponse__AbsolutePathBuf, instructionSources: Schema.optionalKey( @@ -32577,18 +33587,82 @@ export const V2ThreadForkResponse = Schema.Struct({ reasoningEffort: Schema.optionalKey( Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]), ), - sandbox: V2ThreadForkResponse__SandboxPolicy, - serviceTier: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ServiceTier, Schema.Null])), + sandbox: Schema.Union( + [ + Schema.Struct({ + type: Schema.Literal("dangerFullAccess").annotate({ + title: "DangerFullAccessSandboxPolicyType", + }), + }).annotate({ title: "DangerFullAccessSandboxPolicy" }), + Schema.Struct({ + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), + }).annotate({ title: "ReadOnlySandboxPolicy" }), + Schema.Struct({ + networkAccess: Schema.optionalKey( + Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), + ), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), + Schema.Struct({ + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("workspaceWrite").annotate({ + title: "WorkspaceWriteSandboxPolicyType", + }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), + ], + { mode: "oneOf" }, + ).annotate({ + description: + "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", + }), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), thread: V2ThreadForkResponse__Thread, }).annotate({ title: "ThreadForkResponse" }); -export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "guardian_subagent"; +export type V2ThreadForkResponse__ActivePermissionProfile = { + readonly extends?: string | null; + readonly id: string; + readonly modifications?: ReadonlyArray; +}; +export const V2ThreadForkResponse__ActivePermissionProfile = Schema.Struct({ + extends: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", + }), + 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.", + }), + modifications: Schema.optionalKey( + Schema.Array(V2ThreadForkResponse__ActivePermissionProfileModification).annotate({ + description: + "Bounded user-requested modifications applied on top of the named profile, if any.", + default: [], + }), + ), +}); + +export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2ThreadForkResponse__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ThreadForkResponse__ByteRange = { readonly end: number; readonly start: number }; @@ -32637,25 +33711,83 @@ export const V2ThreadForkResponse__CommandExecutionSource = Schema.Literals([ export type V2ThreadForkResponse__NetworkAccess = "restricted" | "enabled"; export const V2ThreadForkResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2ThreadForkResponse__ReadOnlyAccess = +export type V2ThreadForkResponse__PermissionProfile = | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; + readonly fileSystem: V2ThreadForkResponse__PermissionProfileFileSystemPermissions; + readonly network: V2ThreadForkResponse__PermissionProfileNetworkPermissions; + readonly type: "managed"; } - | { readonly type: "fullAccess" }; -export const V2ThreadForkResponse__ReadOnlyAccess = Schema.Union( + | { readonly type: "disabled" } + | { + readonly network: V2ThreadForkResponse__PermissionProfileNetworkPermissions; + readonly type: "external"; + }; +export const V2ThreadForkResponse__PermissionProfile = Schema.Union( [ Schema.Struct({ - includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), + fileSystem: V2ThreadForkResponse__PermissionProfileFileSystemPermissions, + network: V2ThreadForkResponse__PermissionProfileNetworkPermissions, + type: Schema.Literal("managed").annotate({ title: "ManagedPermissionProfileType" }), + }).annotate({ + title: "ManagedPermissionProfile", + description: "Codex owns sandbox construction for this profile.", + }), + Schema.Struct({ + type: Schema.Literal("disabled").annotate({ title: "DisabledPermissionProfileType" }), + }).annotate({ + title: "DisabledPermissionProfile", + description: "Do not apply an outer sandbox.", + }), + Schema.Struct({ + network: V2ThreadForkResponse__PermissionProfileNetworkPermissions, + type: Schema.Literal("external").annotate({ title: "ExternalPermissionProfileType" }), + }).annotate({ + title: "ExternalPermissionProfile", + description: "Filesystem isolation is enforced by an external caller.", + }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadForkResponse__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 V2ThreadForkResponse__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("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), ], { mode: "oneOf" }, ); @@ -32706,6 +33838,29 @@ export const V2ThreadForkResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadForkResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadForkResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + +export type V2ThreadGoalClearedNotification = { readonly threadId: string }; +export const V2ThreadGoalClearedNotification = Schema.Struct({ threadId: Schema.String }).annotate({ + title: "ThreadGoalClearedNotification", +}); + +export type V2ThreadGoalUpdatedNotification = { + readonly goal: V2ThreadGoalUpdatedNotification__ThreadGoal; + readonly threadId: string; + readonly turnId?: string | null; +}; +export const V2ThreadGoalUpdatedNotification = Schema.Struct({ + goal: V2ThreadGoalUpdatedNotification__ThreadGoal, + threadId: Schema.String, + turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}).annotate({ title: "ThreadGoalUpdatedNotification" }); + export type V2ThreadInjectItemsParams = { readonly items: ReadonlyArray; readonly threadId: string; @@ -32725,13 +33880,14 @@ export const V2ThreadInjectItemsResponse = Schema.Struct({}).annotate({ export type V2ThreadListParams = { readonly archived?: boolean | null; readonly cursor?: string | null; - readonly cwd?: string | null; + readonly cwd?: V2ThreadListParams__ThreadListCwdFilter | null; readonly limit?: number | null; readonly modelProviders?: ReadonlyArray | null; readonly searchTerm?: string | null; readonly sortDirection?: V2ThreadListParams__SortDirection | null; readonly sortKey?: V2ThreadListParams__ThreadSortKey | null; readonly sourceKinds?: ReadonlyArray | null; + readonly useStateDbOnly?: boolean; }; export const V2ThreadListParams = Schema.Struct({ archived: Schema.optionalKey( @@ -32752,13 +33908,10 @@ export const V2ThreadListParams = Schema.Struct({ ]), ), cwd: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.", - }), - Schema.Null, - ]), + 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([ @@ -32807,6 +33960,12 @@ export const V2ThreadListParams = Schema.Struct({ Schema.Null, ]), ), + useStateDbOnly: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.", + }), + ), }).annotate({ title: "ThreadListParams" }); export type V2ThreadListResponse = { @@ -32925,6 +34084,13 @@ export const V2ThreadListResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadListResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadListResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadLoadedListParams = { readonly cursor?: string | null; readonly limit?: number | null; @@ -33089,6 +34255,13 @@ export const V2ThreadMetadataUpdateResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadMetadataUpdateResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadNameUpdatedNotification = { readonly threadId: string; readonly threadName?: string | null; @@ -33203,6 +34376,13 @@ export const V2ThreadReadResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadReadResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadReadResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadRealtimeClosedNotification = { readonly reason?: string | null; readonly threadId: string; @@ -33261,12 +34441,12 @@ export const V2ThreadRealtimeSdpNotification = Schema.Struct({ }); export type V2ThreadRealtimeStartedNotification = { - readonly sessionId?: string | null; + readonly realtimeSessionId?: string | null; readonly threadId: string; readonly version: V2ThreadRealtimeStartedNotification__RealtimeConversationVersion; }; export const V2ThreadRealtimeStartedNotification = Schema.Struct({ - sessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + realtimeSessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, version: V2ThreadRealtimeStartedNotification__RealtimeConversationVersion, }).annotate({ @@ -33315,7 +34495,7 @@ export type V2ThreadResumeParams = { readonly modelProvider?: string | null; readonly personality?: V2ThreadResumeParams__Personality | null; readonly sandbox?: V2ThreadResumeParams__SandboxMode | null; - readonly serviceTier?: V2ThreadResumeParams__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly threadId: string; }; export const V2ThreadResumeParams = Schema.Struct({ @@ -33345,9 +34525,7 @@ export const V2ThreadResumeParams = Schema.Struct({ modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), personality: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__SandboxMode, Schema.Null])), - serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([V2ThreadResumeParams__ServiceTier, Schema.Null]), Schema.Null]), - ), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), threadId: Schema.String, }).annotate({ title: "ThreadResumeParams", @@ -33355,10 +34533,36 @@ export const V2ThreadResumeParams = Schema.Struct({ "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", }); +export type V2ThreadResumeParams__PermissionProfileSelectionParams = { + readonly id: string; + readonly modifications?: ReadonlyArray | null; + readonly type: "profile"; +}; +export const V2ThreadResumeParams__PermissionProfileSelectionParams = Schema.Union( + [ + Schema.Struct({ + id: Schema.String, + modifications: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2ThreadResumeParams__PermissionProfileModificationParams), + Schema.Null, + ]), + ), + type: Schema.Literal("profile").annotate({ + title: "ProfilePermissionProfileSelectionParamsType", + }), + }).annotate({ + title: "ProfilePermissionProfileSelectionParams", + description: + "Select a named built-in or user-defined profile and optionally apply bounded modifications that Codex knows how to validate.", + }), + ], + { mode: "oneOf" }, +); + export type V2ThreadResumeParams__ResponseItem = | { readonly content: ReadonlyArray; - readonly end_turn?: boolean | null; readonly id?: string | null; readonly phase?: V2ThreadResumeParams__MessagePhase | null; readonly role: string; @@ -33432,14 +34636,13 @@ export type V2ThreadResumeParams__ResponseItem = readonly status: string; readonly type: "image_generation_call"; } - | { readonly ghost_commit: V2ThreadResumeParams__GhostCommit; readonly type: "ghost_snapshot" } | { readonly encrypted_content: string; readonly type: "compaction" } + | { readonly encrypted_content?: string | null; readonly type: "context_compaction" } | { readonly type: "other" }; export const V2ThreadResumeParams__ResponseItem = Schema.Union( [ Schema.Struct({ content: Schema.Array(V2ThreadResumeParams__ContentItem), - end_turn: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), id: Schema.optionalKey( Schema.Union([Schema.String.annotate({ writeOnly: true }), Schema.Null]), ), @@ -33554,14 +34757,16 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( title: "ImageGenerationCallResponseItemType", }), }).annotate({ title: "ImageGenerationCallResponseItem" }), - Schema.Struct({ - ghost_commit: V2ThreadResumeParams__GhostCommit, - type: Schema.Literal("ghost_snapshot").annotate({ title: "GhostSnapshotResponseItemType" }), - }).annotate({ title: "GhostSnapshotResponseItem" }), Schema.Struct({ encrypted_content: Schema.String, type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }), }).annotate({ title: "CompactionResponseItem" }), + Schema.Struct({ + encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, 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" }), @@ -33571,21 +34776,31 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union( export type V2ThreadResumeResponse = { readonly approvalPolicy: V2ThreadResumeResponse__AskForApproval; - readonly approvalsReviewer: "user" | "guardian_subagent"; + readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent"; readonly cwd: V2ThreadResumeResponse__AbsolutePathBuf; readonly instructionSources?: ReadonlyArray; readonly model: string; readonly modelProvider: string; readonly reasoningEffort?: V2ThreadResumeResponse__ReasoningEffort | null; - readonly sandbox: V2ThreadResumeResponse__SandboxPolicy; - readonly serviceTier?: V2ThreadResumeResponse__ServiceTier | null; + readonly sandbox: + | { readonly type: "dangerFullAccess" } + | { readonly networkAccess?: boolean; readonly type: "readOnly" } + | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } + | { + readonly excludeSlashTmp?: boolean; + readonly excludeTmpdirEnvVar?: boolean; + readonly networkAccess?: boolean; + readonly type: "workspaceWrite"; + readonly writableRoots?: ReadonlyArray; + }; + readonly serviceTier?: string | null; readonly thread: V2ThreadResumeResponse__Thread; }; export const V2ThreadResumeResponse = Schema.Struct({ approvalPolicy: V2ThreadResumeResponse__AskForApproval, - approvalsReviewer: Schema.Literals(["user", "guardian_subagent"]).annotate({ + 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`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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, instructionSources: Schema.optionalKey( @@ -33599,18 +34814,85 @@ export const V2ThreadResumeResponse = Schema.Struct({ reasoningEffort: Schema.optionalKey( Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]), ), - sandbox: V2ThreadResumeResponse__SandboxPolicy, - serviceTier: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ServiceTier, Schema.Null])), + sandbox: Schema.Union( + [ + Schema.Struct({ + type: Schema.Literal("dangerFullAccess").annotate({ + title: "DangerFullAccessSandboxPolicyType", + }), + }).annotate({ title: "DangerFullAccessSandboxPolicy" }), + Schema.Struct({ + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), + }).annotate({ title: "ReadOnlySandboxPolicy" }), + Schema.Struct({ + networkAccess: Schema.optionalKey( + Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), + ), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), + Schema.Struct({ + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("workspaceWrite").annotate({ + title: "WorkspaceWriteSandboxPolicyType", + }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), + ], + { mode: "oneOf" }, + ).annotate({ + description: + "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", + }), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), thread: V2ThreadResumeResponse__Thread, }).annotate({ title: "ThreadResumeResponse" }); -export type V2ThreadResumeResponse__ApprovalsReviewer = "user" | "guardian_subagent"; +export type V2ThreadResumeResponse__ActivePermissionProfile = { + readonly extends?: string | null; + readonly id: string; + readonly modifications?: ReadonlyArray; +}; +export const V2ThreadResumeResponse__ActivePermissionProfile = Schema.Struct({ + extends: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", + }), + 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.", + }), + modifications: Schema.optionalKey( + Schema.Array(V2ThreadResumeResponse__ActivePermissionProfileModification).annotate({ + description: + "Bounded user-requested modifications applied on top of the named profile, if any.", + default: [], + }), + ), +}); + +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`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ThreadResumeResponse__ByteRange = { readonly end: number; readonly start: number }; @@ -33662,25 +34944,83 @@ export const V2ThreadResumeResponse__CommandExecutionSource = Schema.Literals([ export type V2ThreadResumeResponse__NetworkAccess = "restricted" | "enabled"; export const V2ThreadResumeResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2ThreadResumeResponse__ReadOnlyAccess = +export type V2ThreadResumeResponse__PermissionProfile = | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; + readonly fileSystem: V2ThreadResumeResponse__PermissionProfileFileSystemPermissions; + readonly network: V2ThreadResumeResponse__PermissionProfileNetworkPermissions; + readonly type: "managed"; } - | { readonly type: "fullAccess" }; -export const V2ThreadResumeResponse__ReadOnlyAccess = Schema.Union( + | { readonly type: "disabled" } + | { + readonly network: V2ThreadResumeResponse__PermissionProfileNetworkPermissions; + readonly type: "external"; + }; +export const V2ThreadResumeResponse__PermissionProfile = Schema.Union( [ Schema.Struct({ - includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }), + fileSystem: V2ThreadResumeResponse__PermissionProfileFileSystemPermissions, + network: V2ThreadResumeResponse__PermissionProfileNetworkPermissions, + type: Schema.Literal("managed").annotate({ title: "ManagedPermissionProfileType" }), + }).annotate({ + title: "ManagedPermissionProfile", + description: "Codex owns sandbox construction for this profile.", + }), + Schema.Struct({ + type: Schema.Literal("disabled").annotate({ title: "DisabledPermissionProfileType" }), + }).annotate({ + title: "DisabledPermissionProfile", + description: "Do not apply an outer sandbox.", + }), + Schema.Struct({ + network: V2ThreadResumeResponse__PermissionProfileNetworkPermissions, + type: Schema.Literal("external").annotate({ title: "ExternalPermissionProfileType" }), + }).annotate({ + title: "ExternalPermissionProfile", + description: "Filesystem isolation is enforced by an external caller.", + }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadResumeResponse__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 V2ThreadResumeResponse__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("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), + 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" }, ); @@ -33731,6 +35071,13 @@ export const V2ThreadResumeResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadResumeResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadRollbackParams = { readonly numTurns: number; readonly threadId: string }; export const V2ThreadRollbackParams = Schema.Struct({ numTurns: Schema.Number.annotate({ @@ -33758,6 +35105,7 @@ export type V2ThreadRollbackResponse = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -33774,6 +35122,7 @@ export type V2ThreadRollbackResponse = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -33843,6 +35192,9 @@ export const V2ThreadRollbackResponse = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -33873,6 +35225,11 @@ export const V2ThreadRollbackResponse = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -33966,6 +35323,7 @@ export type V2ThreadRollbackResponse__Thread = { readonly name?: string | null; readonly path?: string | null; readonly preview: string; + readonly sessionId: string; readonly source: | "cli" | "vscode" @@ -33982,6 +35340,7 @@ export type V2ThreadRollbackResponse__Thread = { readonly activeFlags: ReadonlyArray; readonly type: "active"; }; + readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null; readonly turns: ReadonlyArray; readonly updatedAt: number; }; @@ -34049,6 +35408,9 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ preview: Schema.String.annotate({ description: "Usually the first user message in the thread, if available.", }), + 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"]), @@ -34079,6 +35441,11 @@ export const V2ThreadRollbackResponse__Thread = Schema.Struct({ ], { mode: "oneOf" }, ).annotate({ description: "Current runtime status for the thread." }), + threadSource: Schema.optionalKey( + Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({ + description: "Optional analytics source classification for this thread.", + }), + ), turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({ description: "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", @@ -34116,6 +35483,13 @@ export const V2ThreadRollbackResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadRollbackResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadRollbackResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadSetNameParams = { readonly name: string; readonly threadId: string }; export const V2ThreadSetNameParams = Schema.Struct({ name: Schema.String, @@ -34241,6 +35615,13 @@ export const V2ThreadStartedNotification__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadStartedNotification__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadStartParams = { readonly approvalPolicy?: V2ThreadStartParams__AskForApproval | null; readonly approvalsReviewer?: V2ThreadStartParams__ApprovalsReviewer | null; @@ -34254,8 +35635,9 @@ export type V2ThreadStartParams = { readonly personality?: V2ThreadStartParams__Personality | null; readonly sandbox?: V2ThreadStartParams__SandboxMode | null; readonly serviceName?: string | null; - readonly serviceTier?: V2ThreadStartParams__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly sessionStartSource?: V2ThreadStartParams__ThreadStartSource | null; + readonly threadSource?: V2ThreadStartParams__ThreadSource | null; }; export const V2ThreadStartParams = Schema.Struct({ approvalPolicy: Schema.optionalKey( @@ -34279,12 +35661,15 @@ export const V2ThreadStartParams = Schema.Struct({ personality: Schema.optionalKey(Schema.Union([V2ThreadStartParams__Personality, Schema.Null])), sandbox: Schema.optionalKey(Schema.Union([V2ThreadStartParams__SandboxMode, Schema.Null])), serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - serviceTier: Schema.optionalKey( - Schema.Union([Schema.Union([V2ThreadStartParams__ServiceTier, Schema.Null]), 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__DynamicToolSpec = { @@ -34302,23 +35687,69 @@ export const V2ThreadStartParams__DynamicToolSpec = Schema.Struct({ namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2ThreadStartParams__PermissionProfileSelectionParams = { + readonly id: string; + readonly modifications?: ReadonlyArray | null; + readonly type: "profile"; +}; +export const V2ThreadStartParams__PermissionProfileSelectionParams = Schema.Union( + [ + Schema.Struct({ + id: Schema.String, + modifications: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2ThreadStartParams__PermissionProfileModificationParams), + Schema.Null, + ]), + ), + type: Schema.Literal("profile").annotate({ + title: "ProfilePermissionProfileSelectionParamsType", + }), + }).annotate({ + title: "ProfilePermissionProfileSelectionParams", + description: + "Select a named built-in or user-defined profile and optionally apply bounded modifications that Codex knows how to validate.", + }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadStartParams__TurnEnvironmentParams = { + readonly cwd: V2ThreadStartParams__AbsolutePathBuf; + readonly environmentId: string; +}; +export const V2ThreadStartParams__TurnEnvironmentParams = Schema.Struct({ + cwd: V2ThreadStartParams__AbsolutePathBuf, + environmentId: Schema.String, +}); + export type V2ThreadStartResponse = { readonly approvalPolicy: V2ThreadStartResponse__AskForApproval; - readonly approvalsReviewer: "user" | "guardian_subagent"; + readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent"; readonly cwd: V2ThreadStartResponse__AbsolutePathBuf; readonly instructionSources?: ReadonlyArray; readonly model: string; readonly modelProvider: string; readonly reasoningEffort?: V2ThreadStartResponse__ReasoningEffort | null; - readonly sandbox: V2ThreadStartResponse__SandboxPolicy; - readonly serviceTier?: V2ThreadStartResponse__ServiceTier | null; + readonly sandbox: + | { readonly type: "dangerFullAccess" } + | { readonly networkAccess?: boolean; readonly type: "readOnly" } + | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" } + | { + readonly excludeSlashTmp?: boolean; + readonly excludeTmpdirEnvVar?: boolean; + readonly networkAccess?: boolean; + readonly type: "workspaceWrite"; + readonly writableRoots?: ReadonlyArray; + }; + readonly serviceTier?: string | null; readonly thread: V2ThreadStartResponse__Thread; }; export const V2ThreadStartResponse = Schema.Struct({ approvalPolicy: V2ThreadStartResponse__AskForApproval, - approvalsReviewer: Schema.Literals(["user", "guardian_subagent"]).annotate({ + 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`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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: V2ThreadStartResponse__AbsolutePathBuf, instructionSources: Schema.optionalKey( @@ -34332,18 +35763,82 @@ export const V2ThreadStartResponse = Schema.Struct({ reasoningEffort: Schema.optionalKey( Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]), ), - sandbox: V2ThreadStartResponse__SandboxPolicy, - serviceTier: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ServiceTier, Schema.Null])), + sandbox: Schema.Union( + [ + Schema.Struct({ + type: Schema.Literal("dangerFullAccess").annotate({ + title: "DangerFullAccessSandboxPolicyType", + }), + }).annotate({ title: "DangerFullAccessSandboxPolicy" }), + Schema.Struct({ + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }), + }).annotate({ title: "ReadOnlySandboxPolicy" }), + Schema.Struct({ + networkAccess: Schema.optionalKey( + Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }), + ), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), + Schema.Struct({ + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("workspaceWrite").annotate({ + title: "WorkspaceWriteSandboxPolicyType", + }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), + ], + { mode: "oneOf" }, + ).annotate({ + description: + "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", + }), + serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), thread: V2ThreadStartResponse__Thread, }).annotate({ title: "ThreadStartResponse" }); -export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "guardian_subagent"; +export type V2ThreadStartResponse__ActivePermissionProfile = { + readonly extends?: string | null; + readonly id: string; + readonly modifications?: ReadonlyArray; +}; +export const V2ThreadStartResponse__ActivePermissionProfile = Schema.Struct({ + extends: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", + }), + 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.", + }), + modifications: Schema.optionalKey( + Schema.Array(V2ThreadStartResponse__ActivePermissionProfileModification).annotate({ + description: + "Bounded user-requested modifications applied on top of the named profile, if any.", + default: [], + }), + ), +}); + +export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; export const V2ThreadStartResponse__ApprovalsReviewer = Schema.Literals([ "user", + "auto_review", "guardian_subagent", ]).annotate({ description: - "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.", + "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 V2ThreadStartResponse__ByteRange = { readonly end: number; readonly start: number }; @@ -34395,25 +35890,83 @@ export const V2ThreadStartResponse__CommandExecutionSource = Schema.Literals([ export type V2ThreadStartResponse__NetworkAccess = "restricted" | "enabled"; export const V2ThreadStartResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2ThreadStartResponse__ReadOnlyAccess = +export type V2ThreadStartResponse__PermissionProfile = | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; + readonly fileSystem: V2ThreadStartResponse__PermissionProfileFileSystemPermissions; + readonly network: V2ThreadStartResponse__PermissionProfileNetworkPermissions; + readonly type: "managed"; } - | { readonly type: "fullAccess" }; -export const V2ThreadStartResponse__ReadOnlyAccess = Schema.Union( + | { readonly type: "disabled" } + | { + readonly network: V2ThreadStartResponse__PermissionProfileNetworkPermissions; + readonly type: "external"; + }; +export const V2ThreadStartResponse__PermissionProfile = Schema.Union( [ Schema.Struct({ - includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - readableRoots: Schema.optionalKey( - Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), + fileSystem: V2ThreadStartResponse__PermissionProfileFileSystemPermissions, + network: V2ThreadStartResponse__PermissionProfileNetworkPermissions, + type: Schema.Literal("managed").annotate({ title: "ManagedPermissionProfileType" }), + }).annotate({ + title: "ManagedPermissionProfile", + description: "Codex owns sandbox construction for this profile.", + }), + Schema.Struct({ + type: Schema.Literal("disabled").annotate({ title: "DisabledPermissionProfileType" }), + }).annotate({ + title: "DisabledPermissionProfile", + description: "Do not apply an outer sandbox.", + }), + Schema.Struct({ + network: V2ThreadStartResponse__PermissionProfileNetworkPermissions, + type: Schema.Literal("external").annotate({ title: "ExternalPermissionProfileType" }), + }).annotate({ + title: "ExternalPermissionProfile", + description: "Filesystem isolation is enforced by an external caller.", + }), + ], + { mode: "oneOf" }, +); + +export type V2ThreadStartResponse__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 V2ThreadStartResponse__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("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), + type: Schema.Literal("externalSandbox").annotate({ + title: "ExternalSandboxSandboxPolicyType", + }), + }).annotate({ title: "ExternalSandboxSandboxPolicy" }), Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), + excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), + type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }), + writableRoots: Schema.optionalKey( + Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }), + ), + }).annotate({ title: "WorkspaceWriteSandboxPolicy" }), ], { mode: "oneOf" }, ); @@ -34464,6 +36017,13 @@ export const V2ThreadStartResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadStartResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadStartResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadStatusChangedNotification = { readonly status: V2ThreadStatusChangedNotification__ThreadStatus; readonly threadId: string; @@ -34484,110 +36044,6 @@ export const V2ThreadTokenUsageUpdatedNotification = Schema.Struct({ turnId: Schema.String, }).annotate({ title: "ThreadTokenUsageUpdatedNotification" }); -export type V2ThreadTurnsListParams = { - readonly cursor?: string | null; - readonly limit?: number | null; - readonly sortDirection?: V2ThreadTurnsListParams__SortDirection | null; - readonly threadId: string; -}; -export const V2ThreadTurnsListParams = Schema.Struct({ - cursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: "Opaque cursor to pass to the next call to continue after the last turn.", - }), - Schema.Null, - ]), - ), - 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([V2ThreadTurnsListParams__SortDirection, Schema.Null]).annotate({ - description: "Optional turn pagination direction; defaults to descending.", - }), - ), - threadId: Schema.String, -}).annotate({ title: "ThreadTurnsListParams" }); - -export type V2ThreadTurnsListResponse = { - readonly backwardsCursor?: string | null; - readonly data: ReadonlyArray; - readonly nextCursor?: string | null; -}; -export const V2ThreadTurnsListResponse = 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 turn. Use it with the opposite `sortDirection` to include the anchor turn again and catch updates to that turn.", - }), - Schema.Null, - ]), - ), - data: Schema.Array(V2ThreadTurnsListResponse__Turn), - nextCursor: Schema.optionalKey( - Schema.Union([ - Schema.String.annotate({ - description: - "Opaque cursor to pass to the next call to continue after the last turn. if None, there are no more turns to return.", - }), - Schema.Null, - ]), - ), -}).annotate({ title: "ThreadTurnsListResponse" }); - -export type V2ThreadTurnsListResponse__ByteRange = { readonly end: number; readonly start: number }; -export const V2ThreadTurnsListResponse__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 V2ThreadTurnsListResponse__CollabAgentTool = - | "spawnAgent" - | "sendInput" - | "resumeAgent" - | "wait" - | "closeAgent"; -export const V2ThreadTurnsListResponse__CollabAgentTool = Schema.Literals([ - "spawnAgent", - "sendInput", - "resumeAgent", - "wait", - "closeAgent", -]); - -export type V2ThreadTurnsListResponse__CollabAgentToolCallStatus = - | "inProgress" - | "completed" - | "failed"; -export const V2ThreadTurnsListResponse__CollabAgentToolCallStatus = Schema.Literals([ - "inProgress", - "completed", - "failed", -]); - -export type V2ThreadTurnsListResponse__CommandExecutionSource = - | "agent" - | "userShell" - | "unifiedExecStartup" - | "unifiedExecInteraction"; -export const V2ThreadTurnsListResponse__CommandExecutionSource = Schema.Literals([ - "agent", - "userShell", - "unifiedExecStartup", - "unifiedExecInteraction", -]); - export type V2ThreadUnarchivedNotification = { readonly threadId: string }; export const V2ThreadUnarchivedNotification = Schema.Struct({ threadId: Schema.String }).annotate({ title: "ThreadUnarchivedNotification", @@ -34695,6 +36151,13 @@ export const V2ThreadUnarchiveResponse__ThreadStatus = Schema.Union( { mode: "oneOf" }, ); +export type V2ThreadUnarchiveResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2ThreadUnsubscribeParams = { readonly threadId: string }; export const V2ThreadUnsubscribeParams = Schema.Struct({ threadId: Schema.String }).annotate({ title: "ThreadUnsubscribeParams", @@ -34765,6 +36228,13 @@ export const V2TurnCompletedNotification__CommandExecutionSource = Schema.Litera "unifiedExecInteraction", ]); +export type V2TurnCompletedNotification__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2TurnCompletedNotification__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2TurnDiffUpdatedNotification = { readonly diff: string; readonly threadId: string; @@ -34859,6 +36329,13 @@ export const V2TurnStartedNotification__CommandExecutionSource = Schema.Literals "unifiedExecInteraction", ]); +export type V2TurnStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2TurnStartedNotification__TurnItemsView = Schema.Literals([ + "notLoaded", + "summary", + "full", +]); + export type V2TurnStartParams = { readonly approvalPolicy?: V2TurnStartParams__AskForApproval | null; readonly approvalsReviewer?: V2TurnStartParams__ApprovalsReviewer | null; @@ -34869,7 +36346,7 @@ export type V2TurnStartParams = { readonly outputSchema?: unknown; readonly personality?: V2TurnStartParams__Personality | null; readonly sandboxPolicy?: V2TurnStartParams__SandboxPolicy | null; - readonly serviceTier?: V2TurnStartParams__ServiceTier | null | null; + readonly serviceTier?: string | null; readonly summary?: V2TurnStartParams__ReasoningSummary | null; readonly threadId: string; }; @@ -34925,9 +36402,11 @@ export const V2TurnStartParams = Schema.Struct({ ), serviceTier: Schema.optionalKey( Schema.Union([ - Schema.Union([V2TurnStartParams__ServiceTier, Schema.Null]), + Schema.String.annotate({ + description: "Override the service tier for this turn and subsequent turns.", + }), Schema.Null, - ]).annotate({ description: "Override the service tier for this turn and subsequent turns." }), + ]), ), summary: Schema.optionalKey( Schema.Union([V2TurnStartParams__ReasoningSummary, Schema.Null]).annotate({ @@ -34959,29 +36438,42 @@ export const V2TurnStartParams__CollaborationMode = Schema.Struct({ export type V2TurnStartParams__NetworkAccess = "restricted" | "enabled"; export const V2TurnStartParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]); -export type V2TurnStartParams__ReadOnlyAccess = - | { - readonly includePlatformDefaults?: boolean; - readonly readableRoots?: ReadonlyArray; - readonly type: "restricted"; - } - | { readonly type: "fullAccess" }; -export const V2TurnStartParams__ReadOnlyAccess = Schema.Union( +export type V2TurnStartParams__PermissionProfileSelectionParams = { + readonly id: string; + readonly modifications?: ReadonlyArray | null; + readonly type: "profile"; +}; +export const V2TurnStartParams__PermissionProfileSelectionParams = Schema.Union( [ Schema.Struct({ - includePlatformDefaults: Schema.optionalKey(Schema.Boolean.annotate({ default: true })), - readableRoots: Schema.optionalKey( - Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }), + id: Schema.String, + modifications: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2TurnStartParams__PermissionProfileModificationParams), + Schema.Null, + ]), ), - type: Schema.Literal("restricted").annotate({ title: "RestrictedReadOnlyAccessType" }), - }).annotate({ title: "RestrictedReadOnlyAccess" }), - Schema.Struct({ - type: Schema.Literal("fullAccess").annotate({ title: "FullAccessReadOnlyAccessType" }), - }).annotate({ title: "FullAccessReadOnlyAccess" }), + type: Schema.Literal("profile").annotate({ + title: "ProfilePermissionProfileSelectionParamsType", + }), + }).annotate({ + title: "ProfilePermissionProfileSelectionParams", + description: + "Select a named built-in or user-defined profile and optionally apply bounded modifications that Codex knows how to validate.", + }), ], { mode: "oneOf" }, ); +export type V2TurnStartParams__TurnEnvironmentParams = { + readonly cwd: V2TurnStartParams__AbsolutePathBuf; + readonly environmentId: string; +}; +export const V2TurnStartParams__TurnEnvironmentParams = Schema.Struct({ + cwd: V2TurnStartParams__AbsolutePathBuf, + environmentId: Schema.String, +}); + export type V2TurnStartResponse = { readonly turn: V2TurnStartResponse__Turn }; export const V2TurnStartResponse = Schema.Struct({ turn: V2TurnStartResponse__Turn }).annotate({ title: "TurnStartResponse", @@ -35030,6 +36522,9 @@ export const V2TurnStartResponse__CommandExecutionSource = Schema.Literals([ "unifiedExecInteraction", ]); +export type V2TurnStartResponse__TurnItemsView = "notLoaded" | "summary" | "full"; +export const V2TurnStartResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]); + export type V2TurnSteerParams = { readonly expectedTurnId: string; readonly input: ReadonlyArray; @@ -35072,6 +36567,13 @@ export const V2WarningNotification = Schema.Struct({ ), }).annotate({ title: "WarningNotification" }); +export type V2WindowsSandboxReadinessResponse = { + readonly status: V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness; +}; +export const V2WindowsSandboxReadinessResponse = Schema.Struct({ + status: V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness, +}).annotate({ title: "WindowsSandboxReadinessResponse" }); + export type V2WindowsSandboxSetupCompletedNotification = { readonly error?: string | null; readonly mode: V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode;