diff --git a/AGENTS.md b/AGENTS.md index 118674cc..a12ba23e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -217,9 +217,11 @@ Important files: Cafe Code's Codex adapter uses `codex app-server`, which speaks JSON-RPC over stdio by default. Official docs describe the app-server protocol as JSON-RPC-like messages where requests have `id`, responses echo the `id`, and notifications omit `id`. The official app-server websocket listener is experimental/unsupported; Cafe should keep using stdio JSONL for local app-server control unless upstream changes that recommendation. -The generated `packages/effect-codex-app-server` protocol surface is currently aligned to upstream Codex `rust-v0.144.6` tag object `1e66aaa95b5ab39d3ef3057cd50bdecd576a8356` (commit `5d1fbf26c43abc65a203928b2e31561cb039e06d`). The `0.144.5..0.144.6` release changes only bundled model metadata plus the crate version; app-server protocol schema, TUI lifecycle, stream handling, and session ownership are unchanged, so the generated `0.144.5` protocol surface remains byte-for-byte valid. The inherited protocol surface preserves the `turn/start`, `turn/steer`, `turn/completed`, and `thread/read` lifecycle contracts used by Cafe; keeps detailed rate-limit/reset-credit, MCP OAuth/status, model safety-buffering, local environment, plugin/app context, and account usage surfaces; adds header-backed auth plus hosted-login branding fields; and factors web-search/image-generation thread items into shared protocol types. Regenerate this package when a future stable bump changes protocol types rather than hand-editing generated schemas. +The generated `packages/effect-codex-app-server` protocol surface is currently aligned to upstream Codex `rust-v0.145.0` tag object `1635de866c61d1b76e50b31928ee6d61482435a8` (commit `25af12f7e61572b0bc18ddb1008be543b91519b0`). This stable release promotes the notification emission timestamp, environment-scoped runtime roots and connection notifications, exact cache-write usage, spend-control state, paginated history, app metadata reads, raw response completion, and audio/realtime protocol variants that Cafe audited while they were on the `0.145.0-alpha` line. Regenerate from the exact stable commit when a future target changes protocol types; never hand-edit generated schemas. -The 2026-07-19 forward-compatibility audit found npm `latest` and the installed stable CLI at `0.144.6`; `0.145.0-alpha.24` (tag object `af5204457f5d091adad53e7f320d48ecf5e847b3`, commit `d4829e44472cba573a71eeb415f8c11ba3580129`) is not Cafe's protocol target. The alpha line adds an optional flattened `emittedAtMs` field to every app-server notification and moves `runtimeWorkspaceRoots` into each selected turn environment while retaining the top-level field for compatibility. Cafe's generic JSONL notification envelope preserves a valid provider emission timestamp and uses it for canonical provider-event timing, falling back to local receipt time when the field is absent, malformed, or implausibly future-dated. This allows diagnostics to distinguish provider emission from ingestion lag without persisting additional prompt/output content. Cafe dual-sends local workspace roots in the selected local environment and in the legacy top-level field so both stable `0.144.6` and the alpha shape behave correctly. The alpha line also adds `cacheWriteInputTokens` to usage breakdowns, removes `templateId` from MCP app-context metadata, changes the Amazon Bedrock account payload to `usesCodexManagedCredentials`, and adds experimental `app/read` metadata lookup. Earlier alpha additions include opt-in, non-replayed `rawResponse/completed` notifications behind `thread/start.experimentalRawEvents`; experimental selected-environment connection notifications; backwards-paginated thread history and fork controls; and `spendControlReached` rate-limit state. The alpha TUI safety-buffer retry interrupts the buffered turn, forks after the preceding completed turn, and retries on the fork rather than rewriting the source conversation. Do not enable the high-volume raw stream, depend on alpha pagination/fork/app-read fields, reinterpret spend-control state, or hand-edit generated stable schemas for alpha-only fields before an intentional stable-version bump; regenerate the protocol package from the new stable tag, then adapt Cafe's usage and MCP metadata projections when those changes reach stable. +The 2026-07-22 `0.144.6..0.145.0` TUI/app-server audit found no change to the normal user-input routing contract: the TUI still tries `turn/steer` against its known active turn, retries once with the server-reported turn id on an expected-turn mismatch, starts a new turn only after app-server reports no active turn, and queues steers rejected by review/compact turns. Cafe's existing queue, stale-turn reconciliation, and provider-thread routing remain the correct shape. Cafe preserves valid `emittedAtMs` values as canonical provider-event time, dual-sends local runtime roots in the selected environment plus the legacy compatibility field, records `cacheWriteInputTokens` without counting it as generated output, preserves `spendControlReached` and individual spend-limit metadata without enforcing billing policy locally, and routes environment notifications by their native provider thread. Cafe intentionally leaves `experimentalRawEvents` disabled because per-response raw events are high-volume and non-replayed; paginated Codex history remains an upstream resume capability rather than a replacement for Cafe's durable thread database. Audio/realtime input is schema-compatible but is not advertised until Cafe has an explicit attachment/playback UX. The upstream remote-compaction-v2 implementation still builds the normal model-visible tool catalog in `compact_remote_v2_attempt.rs`, so the hosted image-tool reliability quarantine below remains necessary. + +Preserve upstream Codex user-input routing as one transport command path with one recovery owner. `ProviderCommandReactor` owns the no-active-turn fallback and submits the same message through `turn/start` exactly once; the renderer's pending-steer state is observability only and must not independently resubmit when a terminal projection arrives. Renderer resubmission is limited to upstream-equivalent explicit rejection paths, such as non-steerable review/compact turns, and the documented interrupt flow after the provider has discarded pending input. Cafe Code's Codex UX and lifecycle design should follow the Codex CLI/TUI command-line implementation, not Codex GUI behavior. The CLI is the primary upstream comparison point because it has the operational model Cafe Code needs: user input is accepted into local queues, live `turn/steer` is attempted only against a known active turn, stale active-turn state is reconciled automatically, non-steerable review/compact turns re-queue the user's input, and local app-server/session state is treated as disposable while durable Codex thread identity is preserved through upstream thread state. @@ -235,7 +237,7 @@ Codex lifecycle facts to preserve: - Upstream Codex TUI 0.144.3 routes every app-server notification by its native provider `threadId`; primary and subagent threads have separate event channels, so a child `turn/completed` can never terminalize the primary turn. Cafe intentionally presents one aggregate conversation instead: register child provider threads from both legacy `collabAgentToolCall.receiverThreadIds` and multi-agent-v2 `subAgentActivity.agentThreadId`, suppress child thread/turn lifecycle notifications, and route child item/output events to the initiating parent turn's work log. A v2 `subAgentActivity` describes the activity target, not necessarily a newly created child: child-to-root interaction legitimately carries `agentThreadId = ` and `agentPath = "/root"`. Never register `/root` or the known primary provider thread as a child, and remove any inherited reverse mapping before routing. Apply the already-routed parent turn transitively when a subagent spawns another subagent. A terminal `error` notification from a routed child is a parent work-log warning, not primary session failure; preserve its detail without creating a persistent thread-error banner. Because Cafe aggregates channels that the TUI keeps separate, key in-flight assistant segment state by both the Cafe turn and native provider `threadId`; interleaved root/subagent deltas must never complete or truncate one another. Never report the Cafe turn finished while its provider-owned primary turn is still producing output merely because a child agent completed. - Upstream Codex TUI 0.144.5 keeps per-agent running state in `AgentNavigationState`: it prefers each live buffered child channel's active-turn state and falls back to `thread/read(includeTurns:false)`, where only `ThreadStatus::Active` is running and an error containing `thread not loaded:` is terminal. Cafe combines those separate channels, so a root `turn/completed` is not aggregate completion while any registered child is active or unresolved. Defer root completion, preserve the parent Cafe turn as active, reconcile unresolved child liveness with bounded `thread/read` polling, preserve prior liveness across transient read failures, and emit aggregate completion only after every currently registered descendant is non-active. If same-runtime live child-channel work arrives after the aggregate was already projected terminal, emit the explicit `live-provider-continuation` recovery transition before projecting that work: restore the same turn to `running`, clear its completion timestamp, and keep new user input on the normal steer/queue path until the descendants finish. Never weaken the stale-replay guard globally; historical content, snapshot backfill, and ordinary replayed `running` session rows must not reopen a terminal turn. Recovery diagnostics belong in the bounded work log and may include counts/timestamps/opaque ids, never prompt or output text. - Mirror the TUI's native notification targeting for hook lifecycle, guardian approval-review lifecycle, guardian warnings, MCP progress, raw response items, and model lifecycle notifications. These events carry their own provider `threadId`, `turnId`, and sometimes item/review/run identity; never attach them to whichever Cafe thread happens to own the app-server process. Project hook and guardian-review lifecycle into bounded work-log entries so long-running turns remain observable without blocking toasts. Hook output and review rationale are untrusted provider text: cap work-log previews, omit hook source paths and executable action payloads from summaries, and leave the canonical raw provider event available only through the existing protected persistence/debug boundaries. -- Cafe must mirror the Codex TUI's local environment and runtime workspace-root handling. For Codex `thread/start`, `thread/resume`, and new `turn/start` requests, send the current `cwd`, experimental `environments: [{ environmentId: "local", cwd, runtimeWorkspaceRoots }]`, and the same current/configured project roots in the legacy top-level experimental `runtimeWorkspaceRoots` field after initializing with `experimentalApi: true`. The environment-scoped field follows Codex `0.145.0-alpha` execution-environment ownership, where remote environments can have unrelated filesystems; the top-level field preserves stable `0.144.5` compatibility and may only be removed after Cafe intentionally bumps its stable target. For workspace-write modes, still send the additional roots as sandbox writable roots. Do not copy roots between unrelated execution environments, and do not send workspace-root, model, effort, sandbox, or collaboration overrides on `turn/steer`, because upstream TUI steer only injects user input into the active turn. +- Cafe must mirror the Codex TUI's local environment and runtime workspace-root handling. For Codex `thread/start`, `thread/resume`, and new `turn/start` requests, send the current `cwd`, experimental `environments: [{ environmentId: "local", cwd, runtimeWorkspaceRoots }]`, and the same current/configured project roots in the legacy top-level experimental `runtimeWorkspaceRoots` field after initializing with `experimentalApi: true`. Environment-scoped roots are stable in Codex `0.145.0` and preserve execution-environment ownership where remote environments can have unrelated filesystems; retain the top-level field only as compatibility for older installed app-server versions. For workspace-write modes, still send the additional roots as sandbox writable roots. Do not copy roots between unrelated execution environments, and do not send workspace-root, model, effort, sandbox, or collaboration overrides on `turn/steer`, because upstream TUI steer only injects user input into the active turn. - Do not spawn `codex app-server` with the project workspace as its process cwd. Codex 0.143 still resolves request cwd through `std::env::current_dir()` even for absolute cwd payloads, so macOS TCC or stale/protected project directories can make every `turn/start` fail with `invalid cwd: Operation not permitted` before app-server reads the requested workspace. Spawn app-server from Cafe's backend-owned state directory and pass the project cwd through `thread/start`/`thread/resume`/`turn/start` plus the `local` environment selection instead. - Upstream Codex `rust-v0.143.0` rejects remote HTTP(S) image URLs in `turn/start`, `turn/steer`, and response item injection. Cafe chat attachments must remain backend-persisted local uploads and must be forwarded to Codex as inline `data:` URLs read from the attachment store. Do not forward renderer-provided remote image URLs or arbitrary filesystem paths into Codex request input. - If Codex returns a provisional `turn/start` or `turn/steer` ACK turn id and the later app-server `turn/started` notification reports a different provider-owned turn id, treat the app-server notification as authoritative when the runtime session directory agrees. Repair Cafe's projected active turn to the concrete provider turn, retire the provisional active turn as stale, and clear renderer pending-steer markers from the explicit Codex steer-processing activity even if it lands under the repaired turn id. This matches the CLI/TUI rule that request ACKs are not lifecycle truth. @@ -313,7 +315,7 @@ Codex home rules: ## Claude Integration -Cafe Code's Claude adapter uses `@anthropic-ai/claude-agent-sdk`, currently pinned to v0.3.216 to match Claude Code v2.1.216. +Cafe Code's Claude adapter uses `@anthropic-ai/claude-agent-sdk`, currently pinned to v0.3.216. Cafe passes each configured `pathToClaudeCodeExecutable` to the SDK, so the provider process may be a newer system Claude Code binary; compatibility audits must compare both the imported SDK control surface and the exact configured CLI version. Claude lifecycle facts to preserve: @@ -329,7 +331,8 @@ Claude lifecycle facts to preserve: - Provider-service `sendTurn` must consult live adapter session state for every adapter advertising `liveSteer: "supported"`, not only for Codex. If Claude still owns a running turn, route the input through `steerTurn` so it enters Claude's non-interrupting queue. Inside the Claude adapter, only provider-initiated synthetic background turns may be auto-closed before a new user turn; a direct second `sendTurn` against a real active user turn must fail closed without mutating that turn, because the service is responsible for routing it through the queue. - Claude Code 2.1.208 / Agent SDK 0.3.208 introduced no new `SDKMessage` or system-subtype discriminants, but upstream fixed truncated headless `stream-json` output and missing terminal result messages, bounded several long-session SDK/CLI caches, cached permission-rule and MCP tool-pool assembly, and corrected transient long-context metadata after CLI auto-update. These fixes directly benefit Cafe's long-lived `AsyncIterable` sessions, so keep the SDK wrapper and system Claude Code binary on matching current patch releases. The SDK control wire shape now permits omitted `max_thinking_tokens` to reset a session override, while the public `Query.setMaxThinkingTokens()` method still requires `number | null`; do not synthesize an omitted control request through local casts. Claude Code also honors `CLAUDE_CODE_PROCESS_WRAPPER` for its own child/self-spawns, and Cafe's Claude environment must continue preserving explicitly supplied process/provider environment variables. - Claude Code 2.1.212 / Agent SDK 0.3.212 add no new public `SDKMessage` or system-subtype discriminants. The SDK adds settings metadata for `feedbackDrafts` and generated schemas for the built-in `SendFeedback` and `ProposeSkills` tools; Cafe's tool pipeline must continue handling unfamiliar built-ins as generic dynamic tool calls instead of rejecting or silently dropping them. Upstream also makes headless/SDK `set_model` control requests effective on the next model round-trip even when issued mid-turn and fixes streaming control requests being marked complete before their handlers finish. Cafe should continue awaiting `Query.setModel()` and must not locally infer model-switch completion before that promise resolves. The CLI patch additionally fixes plan-mode file-changing Bash commands bypassing the SDK `canUseTool` callback, prevents `.claude/worktrees` symlink traversal outside the repository, preserves `continue:false` hook halts, and kills running Bash process trees on SIGTERM; keep Cafe's SDK and system CLI matched so these security and lifecycle fixes apply consistently. -- Claude Code 2.1.214-2.1.216 / Agent SDK 0.3.216 add no new top-level `SDKMessage` or system-subtype discriminants. Version 2.1.214 includes permission-analysis fixes and fixes truncated `stream-json` output for slow SDK consumers; 0.3.216 adds result correlation/latency fields and tool-result metadata, so Cafe must keep the wrapper and system CLI on the matching patch. The SDK's `canUseTool` callback now exposes `matchedAskRule` when an explicit `permissions.ask` rule requires human confirmation; that specific user policy must override Cafe's broad full-access auto-allow path, and Cafe must not persist the rule's potentially sensitive `ruleContent` in request diagnostics. `tool_progress` now carries periodic `heartbeat`, optional `subagent_type`, and structured `subagent_retry`: treat every progress frame as active-turn liveness, do not project plain heartbeats into durable work-log activities, and persist at most one bounded `task.progress` row per concrete retry attempt. `SDKAssistantMessage.aborted` marks partial text cut off by interruption; preserve the partial output but let the result/interrupt lifecycle event remain terminal truth rather than inferring normal completion from the assistant snapshot. The new `EndConversation` built-in remains a generic dynamic tool call, `SessionStart` source `fork` is hook metadata, and the added Google Cloud account-provider value is account metadata rather than a new Cafe provider driver. +- Claude Code 2.1.214-2.1.216 / Agent SDK 0.3.216 add no new top-level `SDKMessage` or system-subtype discriminants. Version 2.1.214 includes permission-analysis fixes and fixes truncated `stream-json` output for slow SDK consumers; 0.3.216 adds result correlation/latency fields and tool-result metadata, so Cafe should normally keep the wrapper and system CLI on the matching patch unless the supply-chain age gate temporarily holds a just-published wrapper as documented below. The SDK's `canUseTool` callback now exposes `matchedAskRule` when an explicit `permissions.ask` rule requires human confirmation; that specific user policy must override Cafe's broad full-access auto-allow path, and Cafe must not persist the rule's potentially sensitive `ruleContent` in request diagnostics. `tool_progress` now carries periodic `heartbeat`, optional `subagent_type`, and structured `subagent_retry`: treat every progress frame as active-turn liveness, do not project plain heartbeats into durable work-log activities, and persist at most one bounded `task.progress` row per concrete retry attempt. `SDKAssistantMessage.aborted` marks partial text cut off by interruption; preserve the partial output but let the result/interrupt lifecycle event remain terminal truth rather than inferring normal completion from the assistant snapshot. The new `EndConversation` built-in remains a generic dynamic tool call, `SessionStart` source `fork` is hook metadata, and the added Google Cloud account-provider value is account metadata rather than a new Cafe provider driver. +- The 2026-07-22 Claude Code 2.1.217 / Agent SDK 0.3.217 audit found no new top-level `SDKMessage`, system subtype, command lifecycle state, usage field, or permission-mode value. The public SDK delta adds only `emojiCompletionEnabled` and `voiceEnabled` settings; its bridge API lets permission-response callbacks reject malformed/forged responses and adds a remote session-rename callback, neither of which Cafe's local `query()` adapter uses. Claude Code itself fixes transcript-write diagnostics, bounded brace expansion, background-session symlink canonicalization, MCP-output retention, background-agent limits, and Opus 4.8 compaction. Cafe already launches the configured system `2.1.217` executable, so those runtime fixes apply. Keep the imported SDK at `0.3.216` until the exact `0.3.217` package clears Yarn's default 24-hour release-age quarantine; do not add a broad package preapproval or disable the age gate merely to update on publication day. Re-run the type/message audit and bump the exact wrapper normally after the quarantine expires. - Start Claude sessions with `includePartialMessages: true` and `agentProgressSummaries: true`. `includePartialMessages` keeps assistant streaming granular, and upstream documents `agentProgressSummaries` as the supported way to receive periodic AI-written summaries for long-running foreground/background subagents. Do not replace this with system-prompt nagging; provider progress should come from SDK/runtime events and render through the work log. - Permission mode has two distinct paths in upstream Claude Agent SDK: initial `query()` options and `Query.setPermissionMode()` for an already-active streaming session. Cafe Code must bind the first turn's interaction mode into `query()` when starting a Claude session and must not send a redundant pre-prompt `setPermissionMode()` for default/full-access sends, because current Claude Code can reject that control request before it has a transcript message/conversation to attach it to. - Claude Code 2.1.216 exposes four normal interactive permission states: Manual/Ask permissions (`default` on the Agent SDK control wire, with `manual` accepted by the CLI), Accept edits (`acceptEdits`), Plan (`plan`), and classifier-backed Auto (`auto`). Cafe's Claude composer must present those as one provider-specific mode selector rather than an independent Build/Plan toggle plus an ambiguous access selector, and focused-composer Shift+Tab must cycle through those four states in that order. Preserve Bypass permissions (`bypassPermissions`) as a separately and dangerously labeled optional state outside the normal shortcut cycle because older Cafe Full access threads already persist that policy; do not mislabel it as Auto. Upstream keeps `dontAsk` CLI-only, so Cafe's desktop-style selector does not expose it. Persist Auto as `interactionMode: "auto"`; preserve the underlying generic runtime policy while Plan or Auto is selected so live `Query.setPermissionMode()` transitions do not require a provider restart. If a thread later switches to Codex, normalize every non-plan Claude interaction value to Codex `default`, because Codex app-server accepts only `default` and `plan` collaboration modes. @@ -402,7 +405,7 @@ If Claude behavior is unclear, check the official Claude Agent SDK docs, the ins - Message timelines must handle late provider events after completion without duplicating terminal banners or losing streamed content. - Per-thread detail subscriptions must apply snapshots and events monotonically by orchestration sequence. Events at or below the detail snapshot sequence are stale for that subscription and must not regress focused-thread session or turn state. - Recoverable non-transport subscription failures must use capped exponential backoff instead of retrying a permanently invalid snapshot four times per second. Receiving an early snapshot chunk does not by itself prove recovery, because the same subscription may fail on a later chunk or event; reset the failure ramp only after a quiet failure window. Transport reconnect handling remains independent. -- Codex steer UI state should mirror upstream CLI semantics: a `turn/steer` ACK is not enough to clear a pending steer marker. Keep the renderer in a visible "steering" state until Codex emits the provider-side user-message/processing-start signal, a terminal turn, or a documented recovery/failure event. +- Codex steer UI state should mirror upstream CLI semantics: a `turn/steer` ACK is not enough to clear a pending steer marker. Keep the renderer in a visible "steering" state until Codex emits the provider-side user-message/processing-start signal or the backend records a documented recovery/failure event. A terminal turn projection alone must neither clear nor replay the steer: app-server may report the old turn terminal while the backend is already falling through from `turn/steer` to `turn/start`, and renderer replay would duplicate the user's instruction. - A WebSocket interruption while `orchestration.dispatchCommand` is awaiting its response is an indeterminate acknowledgement, not proof that the command failed. The server commits the orchestration event and durable command receipt atomically, so the renderer must retry the exact same command object and `commandId` after reconnect. Never generate a replacement id, remove the optimistic steering row, restore the composer, or invite a manual resend until a definitive rejection or the bounded reconnect window is exhausted; otherwise one lost ACK can submit the same Codex steer multiple times. - Shell and per-thread detail WebSocket subscriptions are critical recovery streams. They must retry recoverable stream/protocol failures, force a fresh snapshot after reconnect, and never leave the renderer pinned to stale active-turn state while the backend projection/database has already advanced. Heartbeat timeouts should recycle the WebSocket session so subscriptions reattach instead of waiting on a half-dead socket. - Recoverable provider, transport, and auto-retry diagnostics should not interrupt the user with toasts. Surface them in the work log, thread banners, connection diagnostics, or debug output unless immediate user action is required. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 45cda8c1..e191eb44 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@cafecode/desktop", - "version": "0.1.0", + "version": "0.1.1", "private": true, "license": "AGPL-3.0-or-later", "type": "module", diff --git a/apps/server/package.json b/apps/server/package.json index 601d8e66..c4df2c2f 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,6 +1,6 @@ { "name": "@cafeai/cafe-code", - "version": "0.1.0", + "version": "0.1.1", "description": "A minimal AI chat harness for coding agents.", "keywords": [ "agent", diff --git a/apps/server/src/provider/Layers/CodexAdapter.test.ts b/apps/server/src/provider/Layers/CodexAdapter.test.ts index 85397ff1..9ea8f2ac 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.test.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.test.ts @@ -2035,6 +2035,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { total: { inputTokens: 11_833, cachedInputTokens: 3456, + cacheWriteInputTokens: 77, outputTokens: 6, reasoningOutputTokens: 0, totalTokens: 11_839, @@ -2042,6 +2043,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { last: { inputTokens: 120, cachedInputTokens: 0, + cacheWriteInputTokens: 12, outputTokens: 6, reasoningOutputTokens: 0, totalTokens: 126, @@ -2068,11 +2070,14 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => { maxTokens: 258_400, inputTokens: 120, cachedInputTokens: 0, + cacheWriteInputTokens: 12, + totalCacheWriteInputTokens: 77, outputTokens: 6, reasoningOutputTokens: 0, lastUsedTokens: 126, lastInputTokens: 120, lastCachedInputTokens: 0, + lastCacheWriteInputTokens: 12, lastOutputTokens: 6, lastReasoningOutputTokens: 0, compactsAutomatically: true, diff --git a/apps/server/src/provider/Layers/CodexAdapter.ts b/apps/server/src/provider/Layers/CodexAdapter.ts index fdb75424..f63bc5a6 100644 --- a/apps/server/src/provider/Layers/CodexAdapter.ts +++ b/apps/server/src/provider/Layers/CodexAdapter.ts @@ -501,6 +501,8 @@ function normalizeCodexTokenUsage( const maxTokens = usage.modelContextWindow ?? undefined; const inputTokens = usage.last.inputTokens; const cachedInputTokens = usage.last.cachedInputTokens; + const cacheWriteInputTokens = usage.last.cacheWriteInputTokens; + const totalCacheWriteInputTokens = usage.total.cacheWriteInputTokens; const outputTokens = usage.last.outputTokens; const reasoningOutputTokens = usage.last.reasoningOutputTokens; const totalOutputTokens = usage.total.outputTokens; @@ -514,11 +516,16 @@ function normalizeCodexTokenUsage( ...(maxTokens !== undefined ? { maxTokens } : {}), ...(inputTokens !== undefined ? { inputTokens } : {}), ...(cachedInputTokens !== undefined ? { cachedInputTokens } : {}), + ...(cacheWriteInputTokens !== undefined ? { cacheWriteInputTokens } : {}), + ...(totalCacheWriteInputTokens !== undefined ? { totalCacheWriteInputTokens } : {}), ...(outputTokens !== undefined ? { outputTokens } : {}), ...(reasoningOutputTokens !== undefined ? { reasoningOutputTokens } : {}), ...(usedTokens !== undefined ? { lastUsedTokens: usedTokens } : {}), ...(inputTokens !== undefined ? { lastInputTokens: inputTokens } : {}), ...(cachedInputTokens !== undefined ? { lastCachedInputTokens: cachedInputTokens } : {}), + ...(cacheWriteInputTokens !== undefined + ? { lastCacheWriteInputTokens: cacheWriteInputTokens } + : {}), ...(outputTokens !== undefined ? { lastOutputTokens: outputTokens } : {}), ...(reasoningOutputTokens !== undefined ? { lastReasoningOutputTokens: reasoningOutputTokens } diff --git a/apps/server/src/provider/Layers/CodexProvider.ts b/apps/server/src/provider/Layers/CodexProvider.ts index 8743858b..9bfdc952 100644 --- a/apps/server/src/provider/Layers/CodexProvider.ts +++ b/apps/server/src/provider/Layers/CodexProvider.ts @@ -360,6 +360,18 @@ function mapGeneratedCredits( }; } +function mapGeneratedSpendControlLimit( + limit: CodexSchema.V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot | null | undefined, +): Exclude { + if (limit === null || limit === undefined) return null; + return { + limit: limit.limit, + remainingPercent: limit.remainingPercent, + resetsAt: limit.resetsAt, + used: limit.used, + }; +} + function mapGeneratedRateLimitSnapshot( snapshot: CodexSchema.V2GetAccountRateLimitsResponse__RateLimitSnapshot, ): ServerProviderAccountRateLimitSnapshot { @@ -370,6 +382,12 @@ function mapGeneratedRateLimitSnapshot( ...(snapshot.rateLimitReachedType !== undefined ? { rateLimitReachedType: snapshot.rateLimitReachedType } : {}), + ...(snapshot.spendControlReached !== undefined + ? { spendControlReached: snapshot.spendControlReached } + : {}), + ...(snapshot.individualLimit !== undefined + ? { individualLimit: mapGeneratedSpendControlLimit(snapshot.individualLimit) } + : {}), ...(snapshot.primary !== undefined ? { primary: mapGeneratedRateLimitWindow(snapshot.primary) } : {}), @@ -474,6 +492,22 @@ function mapRawCredits(value: unknown): ServerProviderAccountRateLimitSnapshot[" }; } +function mapRawSpendControlLimit( + value: unknown, +): ServerProviderAccountRateLimitSnapshot["individualLimit"] { + if (value === null) return null; + const record = readRecord(value); + if (!record) return undefined; + const limit = readTrimmedMetadata(record.limit); + const remainingPercent = readFiniteNumber(record.remaining_percent ?? record.remainingPercent); + const resetsAt = readNonNegativeInteger(record.resets_at ?? record.resetsAt); + const used = readTrimmedMetadata(record.used); + if (!limit || remainingPercent === undefined || resetsAt === undefined || !used) { + return undefined; + } + return { limit, remainingPercent, resetsAt, used }; +} + function mapRawRateLimitReachedType(value: unknown): string | undefined { const direct = readTrimmedMetadata(value); if (direct) return direct; @@ -548,17 +582,28 @@ function mapRawRateLimitSnapshot(input: { readonly credits?: unknown; readonly planType?: string | undefined; readonly rateLimitReachedType?: string | undefined; + readonly spendControlReached?: unknown; + readonly individualLimit?: unknown; }): ServerProviderAccountRateLimitSnapshot { const rateLimit = readRecord(input.rateLimit); const primary = mapRawRateLimitWindow(rateLimit?.primary_window ?? rateLimit?.primary); const secondary = mapRawRateLimitWindow(rateLimit?.secondary_window ?? rateLimit?.secondary); const credits = mapRawCredits(input.credits); + const rawSpendControlReached = + input.spendControlReached ?? rateLimit?.spend_control_reached ?? rateLimit?.spendControlReached; + const spendControlReached = + typeof rawSpendControlReached === "boolean" ? rawSpendControlReached : undefined; + const individualLimit = mapRawSpendControlLimit( + input.individualLimit ?? rateLimit?.individual_limit ?? rateLimit?.individualLimit, + ); return { limitId: input.limitId, ...(input.limitName ? { limitName: input.limitName } : {}), ...(input.planType ? { planType: input.planType } : {}), ...(input.rateLimitReachedType ? { rateLimitReachedType: input.rateLimitReachedType } : {}), + ...(spendControlReached !== undefined ? { spendControlReached } : {}), + ...(individualLimit !== undefined ? { individualLimit } : {}), ...(primary ? { primary } : {}), ...(secondary ? { secondary } : {}), ...(credits ? { credits } : {}), @@ -583,6 +628,8 @@ function parseCodexAccountRateLimitsPayload( limitId: "codex", rateLimit: record.rate_limit ?? record.rateLimit, credits: record.credits, + spendControlReached: record.spend_control_reached ?? record.spendControlReached, + individualLimit: record.individual_limit ?? record.individualLimit, ...(planType ? { planType } : {}), ...(rateLimitReachedType ? { rateLimitReachedType } : {}), }); @@ -604,6 +651,8 @@ function parseCodexAccountRateLimitsPayload( limitId, limitName: readTrimmedMetadata(additional.limit_name ?? additional.limitName), rateLimit: additional.rate_limit ?? additional.rateLimit, + spendControlReached: additional.spend_control_reached ?? additional.spendControlReached, + individualLimit: additional.individual_limit ?? additional.individualLimit, ...(planType ? { planType } : {}), }); } diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts index 1cc2cbcf..acca3047 100644 --- a/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts +++ b/apps/server/src/provider/Layers/CodexSessionRuntime.test.ts @@ -277,6 +277,23 @@ describe("Codex child conversation routing", () => { suppressLifecycle: false, }, ); + assert.deepStrictEqual( + resolveCodexChildConversationNotification( + routes, + { + method: "thread/environment/disconnected", + params: { + threadId: "thread-child", + environmentId: "local", + }, + }, + "thread-parent", + ), + { + parentTurnId, + suppressLifecycle: true, + }, + ); }); it("keeps nested subagent output on the original visible parent turn", () => { diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.ts index dad549a3..75f5e155 100644 --- a/apps/server/src/provider/Layers/CodexSessionRuntime.ts +++ b/apps/server/src/provider/Layers/CodexSessionRuntime.ts @@ -1454,6 +1454,8 @@ function readNotificationThreadId(notification: CodexServerNotification): string case "thread/name/updated": case "thread/goal/updated": case "thread/goal/cleared": + case "thread/environment/connected": + case "thread/environment/disconnected": case "thread/settings/updated": case "thread/tokenUsage/updated": case "turn/started": @@ -1548,8 +1550,8 @@ export function readCodexNotificationRouteFields(notification: CodexServerNotifi itemId: readNotificationItemId(notification), }; case "rawResponse/completed": - // Codex 0.145 alpha emits this only when `experimentalRawEvents` is - // enabled. Cafe intentionally leaves that stream disabled, but retain + // Codex 0.145 emits this only when `experimentalRawEvents` is enabled. + // Cafe intentionally leaves that stream disabled, but retain // its native turn route if a future stable target enables it so exact // response-usage telemetry can never leak across aggregate threads. return { @@ -1667,6 +1669,8 @@ function shouldSuppressChildConversationNotification(method: string): boolean { method === "thread/deleted" || method === "thread/unarchived" || method === "thread/closed" || + method === "thread/environment/connected" || + method === "thread/environment/disconnected" || method === "thread/compacted" || method === "thread/name/updated" || method === "thread/tokenUsage/updated" || diff --git a/apps/server/src/provider/Layers/ProviderRegistry.test.ts b/apps/server/src/provider/Layers/ProviderRegistry.test.ts index da0b1784..23ff0a21 100644 --- a/apps/server/src/provider/Layers/ProviderRegistry.test.ts +++ b/apps/server/src/provider/Layers/ProviderRegistry.test.ts @@ -1555,6 +1555,13 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T unlimited: false, balance: "9.99", }, + spend_control_reached: true, + individual_limit: { + limit: "100.00", + remaining_percent: 0, + resets_at: 1_780_200_000, + used: "100.00", + }, rate_limit_reset_credits: { available_count: 2, credits: [ @@ -1606,6 +1613,13 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T assert.strictEqual(status.accountRateLimits?.rateLimits.planType, "pro"); assert.strictEqual(status.accountRateLimits?.rateLimits.primary?.windowDurationMins, 300); assert.strictEqual(status.accountRateLimits?.rateLimits.secondary?.usedPercent, 75); + assert.strictEqual(status.accountRateLimits?.rateLimits.spendControlReached, true); + assert.deepStrictEqual(status.accountRateLimits?.rateLimits.individualLimit, { + limit: "100.00", + remainingPercent: 0, + resetsAt: 1_780_200_000, + used: "100.00", + }); assert.strictEqual(status.accountRateLimits?.rateLimitResetCredits?.availableCount, 2); assert.deepStrictEqual(status.accountRateLimits?.rateLimitResetCredits?.credits, [ { diff --git a/apps/web/package.json b/apps/web/package.json index a03b086a..b5a1bdab 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@cafecode/web", - "version": "0.1.0", + "version": "0.1.1", "private": true, "license": "AGPL-3.0-or-later", "type": "module", diff --git a/apps/web/src/components/ChatView.logic.test.ts b/apps/web/src/components/ChatView.logic.test.ts index 0836625c..8edf4f9a 100644 --- a/apps/web/src/components/ChatView.logic.test.ts +++ b/apps/web/src/components/ChatView.logic.test.ts @@ -19,7 +19,7 @@ import { mergePendingSteerSnapshotsForInterruptedTurn, resolveFollowUpQueuePhase, resolveSendEnvMode, - shouldReplayCodexPendingSteerAfterTerminal, + shouldResolvePendingSteerDispatch, shouldPinTimelineToEndForLocalMessage, shouldWriteThreadErrorToCurrentServerThread, waitForStartedServerThread, @@ -114,41 +114,57 @@ describe("mergePendingSteerSnapshotsForInterruptedTurn", () => { }); }); -describe("shouldReplayCodexPendingSteerAfterTerminal", () => { - it("replays Codex steers when a turn ended before the steer entered provider items", () => { +describe("shouldResolvePendingSteerDispatch", () => { + it("keeps a Codex steer pending when only the previous turn became terminal", () => { expect( - shouldReplayCodexPendingSteerAfterTerminal({ + shouldResolvePendingSteerDispatch({ provider: "codex", terminalTurnAfterSteer: true, steerProcessingStarted: false, steerFailureRecorded: false, steerRecoveryRecorded: false, + assistantResponseAfterSteer: false, }), - ).toBe(true); + ).toBe(false); }); - it("does not replay once Codex emitted the steer processing marker", () => { + it("resolves once Codex emits the steer processing marker", () => { expect( - shouldReplayCodexPendingSteerAfterTerminal({ + shouldResolvePendingSteerDispatch({ provider: "codex", terminalTurnAfterSteer: true, steerProcessingStarted: true, steerFailureRecorded: false, steerRecoveryRecorded: false, + assistantResponseAfterSteer: false, }), - ).toBe(false); + ).toBe(true); }); - it("does not replay non-Codex terminal turns", () => { + it("resolves once the backend records Codex's no-active-turn recovery", () => { expect( - shouldReplayCodexPendingSteerAfterTerminal({ + shouldResolvePendingSteerDispatch({ + provider: "codex", + terminalTurnAfterSteer: true, + steerProcessingStarted: false, + steerFailureRecorded: false, + steerRecoveryRecorded: true, + assistantResponseAfterSteer: false, + }), + ).toBe(true); + }); + + it("preserves the existing terminal-resolution rule for non-Codex providers", () => { + expect( + shouldResolvePendingSteerDispatch({ provider: "claude", terminalTurnAfterSteer: true, steerProcessingStarted: false, steerFailureRecorded: false, steerRecoveryRecorded: false, + assistantResponseAfterSteer: false, }), - ).toBe(false); + ).toBe(true); }); }); diff --git a/apps/web/src/components/ChatView.logic.ts b/apps/web/src/components/ChatView.logic.ts index 71c911d3..99df9455 100644 --- a/apps/web/src/components/ChatView.logic.ts +++ b/apps/web/src/components/ChatView.logic.ts @@ -172,19 +172,32 @@ export function mergePendingSteerSnapshotsForInterruptedTurn( }; } -export function shouldReplayCodexPendingSteerAfterTerminal(input: { +export function shouldResolvePendingSteerDispatch(input: { readonly provider: string | null | undefined; readonly terminalTurnAfterSteer: boolean; readonly steerProcessingStarted: boolean; readonly steerFailureRecorded: boolean; readonly steerRecoveryRecorded: boolean; + readonly assistantResponseAfterSteer: boolean; }): boolean { + if (input.steerFailureRecorded || input.steerRecoveryRecorded) { + return true; + } + + if (input.provider === "codex") { + // Upstream Codex owns the active-turn race inside one UserTurn command: + // `turn/steer` falls through to exactly one `turn/start` only after + // app-server reports that the cached active turn is gone. A terminal + // projection by itself is therefore not permission for the renderer to + // replay the same input. Wait for provider processing or the backend's + // explicit recovery/failure activity instead. + return input.steerProcessingStarted; + } + return ( - input.provider === "codex" && - input.terminalTurnAfterSteer && - !input.steerProcessingStarted && - !input.steerFailureRecorded && - !input.steerRecoveryRecorded + input.steerProcessingStarted || + input.assistantResponseAfterSteer || + input.terminalTurnAfterSteer ); } diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index a6130d50..f5cbede2 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -169,7 +169,7 @@ import { resolveSendEnvMode, revokeBlobPreviewUrl, revokeUserMessagePreviewUrls, - shouldReplayCodexPendingSteerAfterTerminal, + shouldResolvePendingSteerDispatch, shouldPinTimelineToEndForLocalMessage, shouldWriteThreadErrorToCurrentServerThread, waitForStartedServerThread, @@ -289,11 +289,14 @@ function summarizeDebugContextWindowUsagePayload(payloadValue: unknown) { maxTokens: readDebugNumber(payload.maxTokens), inputTokens: readDebugNumber(payload.inputTokens), cachedInputTokens: readDebugNumber(payload.cachedInputTokens), + cacheWriteInputTokens: readDebugNumber(payload.cacheWriteInputTokens), + totalCacheWriteInputTokens: readDebugNumber(payload.totalCacheWriteInputTokens), outputTokens: readDebugNumber(payload.outputTokens), reasoningOutputTokens: readDebugNumber(payload.reasoningOutputTokens), lastUsedTokens: readDebugNumber(payload.lastUsedTokens), lastInputTokens: readDebugNumber(payload.lastInputTokens), lastCachedInputTokens: readDebugNumber(payload.lastCachedInputTokens), + lastCacheWriteInputTokens: readDebugNumber(payload.lastCacheWriteInputTokens), lastOutputTokens: readDebugNumber(payload.lastOutputTokens), lastReasoningOutputTokens: readDebugNumber(payload.lastReasoningOutputTokens), toolUses: readDebugNumber(payload.toolUses), @@ -306,6 +309,9 @@ function summarizeDebugContextWindowUsagePayload(payloadValue: unknown) { usage.cachedInputTokens !== null || usage.lastCachedInputTokens !== null ? "cached-input" : null, + usage.cacheWriteInputTokens !== null || usage.lastCacheWriteInputTokens !== null + ? "cache-write-input" + : null, usage.outputTokens !== null || usage.lastOutputTokens !== null ? "output" : null, usage.reasoningOutputTokens !== null || usage.lastReasoningOutputTokens !== null ? "reasoning-output" @@ -318,6 +324,8 @@ function summarizeDebugContextWindowUsagePayload(payloadValue: unknown) { totals: { inputTokens: usage.inputTokens, cachedInputTokens: usage.cachedInputTokens, + cacheWriteInputTokens: usage.cacheWriteInputTokens, + totalCacheWriteInputTokens: usage.totalCacheWriteInputTokens, outputTokens: usage.outputTokens, reasoningOutputTokens: usage.reasoningOutputTokens, }, @@ -325,6 +333,7 @@ function summarizeDebugContextWindowUsagePayload(payloadValue: unknown) { usedTokens: usage.lastUsedTokens, inputTokens: usage.lastInputTokens, cachedInputTokens: usage.lastCachedInputTokens, + cacheWriteInputTokens: usage.lastCacheWriteInputTokens, outputTokens: usage.lastOutputTokens, reasoningOutputTokens: usage.lastReasoningOutputTokens, }, @@ -1658,39 +1667,13 @@ function threadHasSteerProcessingStarted(thread: Thread, pending: PendingSteerDi } function threadHasResolvedPendingSteer(thread: Thread, pending: PendingSteerDispatch) { - const hasExplicitProcessingStarted = threadHasSteerProcessingStarted(thread, pending); - if ( - threadHasSteerRecoveryForMessage(thread, pending.messageId) || - threadHasSteerFailureForMessage(thread, pending.messageId) - ) { - return true; - } - - if (thread.session?.provider === "codex") { - // Upstream Codex app-server ACKs `turn/steer` before the steer is visible in - // the active turn. Keep Cafe's UI in a pending "steering" state until the - // provider emits the explicit processing-start signal instead of clearing on - // unrelated assistant text that was already in flight. - return hasExplicitProcessingStarted; - } - - return ( - hasExplicitProcessingStarted || - threadHasAssistantResponseAfterSteer(thread, pending) || - threadHasTerminalTurnAfterSteer(thread, pending) - ); -} - -function threadShouldReplayUnprocessedTerminalCodexSteer( - thread: Thread, - pending: PendingSteerDispatch, -): boolean { - return shouldReplayCodexPendingSteerAfterTerminal({ + return shouldResolvePendingSteerDispatch({ provider: thread.session?.provider, terminalTurnAfterSteer: threadHasTerminalTurnAfterSteer(thread, pending), steerProcessingStarted: threadHasSteerProcessingStarted(thread, pending), steerFailureRecorded: threadHasSteerFailureForMessage(thread, pending.messageId), steerRecoveryRecorded: threadHasSteerRecoveryForMessage(thread, pending.messageId), + assistantResponseAfterSteer: threadHasAssistantResponseAfterSteer(thread, pending), }); } @@ -2234,124 +2217,6 @@ export default function ChatView(props: ChatViewProps) { })); } }, [activeThread, removePendingSteerDispatch, setFollowUpQueueByThreadId]); - useEffect(() => { - const threadsById = new Map(allThreads.map((thread) => [thread.id, thread])); - const pendingByThread = new Map(); - - for (const [messageId, pending] of Object.entries(pendingSteerDispatchByMessageId)) { - const thread = threadsById.get(pending.threadId); - if (thread === undefined) { - continue; - } - const interruptRecovery = - pendingSteerInterruptRecoveryByThreadIdRef.current[pending.threadId]; - if ( - interruptRecovery?.pendingMessageIds.some((pendingMessageId) => { - return String(pendingMessageId) === messageId; - }) === true - ) { - continue; - } - if (!threadShouldReplayUnprocessedTerminalCodexSteer(thread, pending)) { - continue; - } - - const existing = pendingByThread.get(pending.threadId) ?? []; - existing.push(pending); - pendingByThread.set(pending.threadId, existing); - } - - if (pendingByThread.size === 0) { - return; - } - - const replayedMessageIds = new Set(); - const queuedItems: Array<{ - readonly threadId: ThreadId; - readonly item: FollowUpQueueItem; - }> = []; - - for (const [threadId, pendingSteers] of pendingByThread) { - const orderedPendingSteers = pendingSteers.toSorted((left, right) => - left.dispatchedAt.localeCompare(right.dispatchedAt), - ); - const merged = mergePendingSteerSnapshotsForInterruptedTurn( - orderedPendingSteers.map((pending) => pending.snapshot), - ); - if (merged === null || (merged.promptText.length === 0 && merged.images.length === 0)) { - for (const pending of orderedPendingSteers) { - replayedMessageIds.add(String(pending.messageId)); - } - recordFollowUpQueueDebugAttempt("pending-steer-terminal-replay", "empty-merged-steers", { - threadId, - }); - continue; - } - - const firstPendingSteer = orderedPendingSteers[0]; - if (firstPendingSteer === undefined) { - continue; - } - for (const pending of orderedPendingSteers) { - replayedMessageIds.add(String(pending.messageId)); - } - - const queuedItem: FollowUpQueueItem = { - ...firstPendingSteer.snapshot, - promptText: merged.promptText, - images: merged.images, - id: newMessageId(), - environmentId: firstPendingSteer.environmentId, - threadId, - queuedAt: new Date().toISOString(), - expanded: false, - blockedReason: null, - }; - queuedItems.push({ threadId, item: queuedItem }); - recordFollowUpQueueDebugAttempt("pending-steer-terminal-replay", "requeued-merged-steers", { - threadId, - itemId: queuedItem.id, - }); - } - - if (replayedMessageIds.size === 0) { - return; - } - - updatePendingSteerDispatches((current) => { - let next: Record | null = null; - for (const messageId of replayedMessageIds) { - if (!(messageId in current)) { - continue; - } - next ??= { ...current }; - delete next[messageId]; - } - return next ?? current; - }); - setOptimisticUserMessages((existing) => { - const removed = existing.filter((message) => replayedMessageIds.has(String(message.id))); - for (const message of removed) { - revokeUserMessagePreviewUrls(message); - } - return existing.filter((message) => !replayedMessageIds.has(String(message.id))); - }); - if (queuedItems.length > 0) { - setFollowUpQueueByThreadId((existing) => { - const next = { ...existing }; - for (const { threadId, item } of queuedItems) { - next[threadId] = [item, ...(next[threadId] ?? EMPTY_FOLLOW_UP_QUEUE)]; - } - return next; - }); - } - }, [ - allThreads, - pendingSteerDispatchByMessageId, - recordFollowUpQueueDebugAttempt, - setFollowUpQueueByThreadId, - updatePendingSteerDispatches, - ]); useEffect(() => { const recoveries = Object.values(pendingSteerInterruptRecoveryByThreadId); if (recoveries.length === 0) { diff --git a/apps/web/src/lib/contextWindow.ts b/apps/web/src/lib/contextWindow.ts index b6ae6d40..5e1c4c41 100644 --- a/apps/web/src/lib/contextWindow.ts +++ b/apps/web/src/lib/contextWindow.ts @@ -56,11 +56,14 @@ export function deriveLatestContextWindowSnapshot( remainingPercentage, inputTokens: asFiniteNumber(payload?.inputTokens), cachedInputTokens: asFiniteNumber(payload?.cachedInputTokens), + cacheWriteInputTokens: asFiniteNumber(payload?.cacheWriteInputTokens), + totalCacheWriteInputTokens: asFiniteNumber(payload?.totalCacheWriteInputTokens), outputTokens: asFiniteNumber(payload?.outputTokens), reasoningOutputTokens: asFiniteNumber(payload?.reasoningOutputTokens), lastUsedTokens: asFiniteNumber(payload?.lastUsedTokens), lastInputTokens: asFiniteNumber(payload?.lastInputTokens), lastCachedInputTokens: asFiniteNumber(payload?.lastCachedInputTokens), + lastCacheWriteInputTokens: asFiniteNumber(payload?.lastCacheWriteInputTokens), lastOutputTokens: asFiniteNumber(payload?.lastOutputTokens), lastReasoningOutputTokens: asFiniteNumber(payload?.lastReasoningOutputTokens), toolUses: asFiniteNumber(payload?.toolUses), diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 6d1ff387..653ca26a 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@cafecode/contracts", - "version": "0.1.0", + "version": "0.1.1", "private": true, "license": "AGPL-3.0-or-later", "files": [ diff --git a/packages/contracts/src/providerRuntime.ts b/packages/contracts/src/providerRuntime.ts index db331b1d..cde465be 100644 --- a/packages/contracts/src/providerRuntime.ts +++ b/packages/contracts/src/providerRuntime.ts @@ -327,11 +327,14 @@ export const ThreadTokenUsageSnapshot = Schema.Struct({ maxTokens: Schema.optional(PositiveInt), inputTokens: Schema.optional(NonNegativeInt), cachedInputTokens: Schema.optional(NonNegativeInt), + cacheWriteInputTokens: Schema.optional(NonNegativeInt), + totalCacheWriteInputTokens: Schema.optional(NonNegativeInt), outputTokens: Schema.optional(NonNegativeInt), reasoningOutputTokens: Schema.optional(NonNegativeInt), lastUsedTokens: Schema.optional(NonNegativeInt), lastInputTokens: Schema.optional(NonNegativeInt), lastCachedInputTokens: Schema.optional(NonNegativeInt), + lastCacheWriteInputTokens: Schema.optional(NonNegativeInt), lastOutputTokens: Schema.optional(NonNegativeInt), lastReasoningOutputTokens: Schema.optional(NonNegativeInt), toolUses: Schema.optional(NonNegativeInt), diff --git a/packages/contracts/src/server.ts b/packages/contracts/src/server.ts index 6350222e..76f99fc8 100644 --- a/packages/contracts/src/server.ts +++ b/packages/contracts/src/server.ts @@ -81,11 +81,22 @@ export const ServerProviderAccountCredits = Schema.Struct({ }); export type ServerProviderAccountCredits = typeof ServerProviderAccountCredits.Type; +export const ServerProviderAccountSpendControlLimit = Schema.Struct({ + limit: TrimmedNonEmptyString, + remainingPercent: Schema.Number, + resetsAt: NonNegativeInt, + used: TrimmedNonEmptyString, +}); +export type ServerProviderAccountSpendControlLimit = + typeof ServerProviderAccountSpendControlLimit.Type; + export const ServerProviderAccountRateLimitSnapshot = Schema.Struct({ limitId: Schema.optionalKey(Schema.NullOr(TrimmedNonEmptyString)), limitName: Schema.optionalKey(Schema.NullOr(TrimmedNonEmptyString)), planType: Schema.optionalKey(Schema.NullOr(TrimmedNonEmptyString)), rateLimitReachedType: Schema.optionalKey(Schema.NullOr(TrimmedNonEmptyString)), + spendControlReached: Schema.optionalKey(Schema.NullOr(Schema.Boolean)), + individualLimit: Schema.optionalKey(Schema.NullOr(ServerProviderAccountSpendControlLimit)), primary: Schema.optionalKey(Schema.NullOr(ServerProviderAccountRateLimitWindow)), secondary: Schema.optionalKey(Schema.NullOr(ServerProviderAccountRateLimitWindow)), credits: Schema.optionalKey(Schema.NullOr(ServerProviderAccountCredits)), diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts index 80a93689..9fed50a6 100644 --- a/packages/effect-codex-app-server/scripts/generate.ts +++ b/packages/effect-codex-app-server/scripts/generate.ts @@ -17,7 +17,7 @@ import { } from "effect/unstable/http"; import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"; -const UPSTREAM_REF = "87db9bc18ba5bc82c1cb4e4381b44f693ee35623"; +const UPSTREAM_REF = "25af12f7e61572b0bc18ddb1008be543b91519b0"; 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 8b4e58a9..a7e39fd3 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: 87db9bc18ba5bc82c1cb4e4381b44f693ee35623 +// Upstream protocol ref: 25af12f7e61572b0bc18ddb1008be543b91519b0 import * as CodexSchema from "./schema.gen.ts"; @@ -40,7 +40,9 @@ export const CLIENT_REQUEST_METHODS = { "plugin/share/list": "plugin/share/list", "plugin/share/checkout": "plugin/share/checkout", "plugin/share/delete": "plugin/share/delete", + "app/read": "app/read", "app/list": "app/list", + "app/installed": "app/installed", "fs/readFile": "fs/readFile", "fs/writeFile": "fs/writeFile", "fs/createDirectory": "fs/createDirectory", @@ -125,6 +127,8 @@ export const SERVER_NOTIFICATION_METHODS = { "thread/name/updated": "thread/name/updated", "thread/goal/updated": "thread/goal/updated", "thread/goal/cleared": "thread/goal/cleared", + "thread/environment/connected": "thread/environment/connected", + "thread/environment/disconnected": "thread/environment/disconnected", "thread/settings/updated": "thread/settings/updated", "thread/tokenUsage/updated": "thread/tokenUsage/updated", "turn/started": "turn/started", @@ -138,6 +142,7 @@ export const SERVER_NOTIFICATION_METHODS = { "item/autoApprovalReview/completed": "item/autoApprovalReview/completed", "item/completed": "item/completed", "rawResponseItem/completed": "rawResponseItem/completed", + "rawResponse/completed": "rawResponse/completed", "item/agentMessage/delta": "item/agentMessage/delta", "item/plan/delta": "item/plan/delta", "command/exec/outputDelta": "command/exec/outputDelta", @@ -227,7 +232,9 @@ export interface ClientRequestParamsByMethod { readonly "plugin/share/list": typeof CodexSchema.V2PluginShareListParams.Type; readonly "plugin/share/checkout": typeof CodexSchema.V2PluginShareCheckoutParams.Type; readonly "plugin/share/delete": typeof CodexSchema.V2PluginShareDeleteParams.Type; + readonly "app/read": typeof CodexSchema.V2AppsReadParams.Type; readonly "app/list": typeof CodexSchema.V2AppsListParams.Type; + readonly "app/installed": typeof CodexSchema.V2AppsInstalledParams.Type; readonly "fs/readFile": typeof CodexSchema.V2FsReadFileParams.Type; readonly "fs/writeFile": typeof CodexSchema.V2FsWriteFileParams.Type; readonly "fs/createDirectory": typeof CodexSchema.V2FsCreateDirectoryParams.Type; @@ -320,7 +327,9 @@ export interface ClientRequestResponsesByMethod { readonly "plugin/share/list": typeof CodexSchema.V2PluginShareListResponse.Type; readonly "plugin/share/checkout": typeof CodexSchema.V2PluginShareCheckoutResponse.Type; readonly "plugin/share/delete": typeof CodexSchema.V2PluginShareDeleteResponse.Type; + readonly "app/read": typeof CodexSchema.V2AppsReadResponse.Type; readonly "app/list": typeof CodexSchema.V2AppsListResponse.Type; + readonly "app/installed": typeof CodexSchema.V2AppsInstalledResponse.Type; readonly "fs/readFile": typeof CodexSchema.V2FsReadFileResponse.Type; readonly "fs/writeFile": typeof CodexSchema.V2FsWriteFileResponse.Type; readonly "fs/createDirectory": typeof CodexSchema.V2FsCreateDirectoryResponse.Type; @@ -418,6 +427,8 @@ export interface ServerNotificationParamsByMethod { 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/environment/connected": typeof CodexSchema.V2EnvironmentConnectionNotification.Type; + readonly "thread/environment/disconnected": typeof CodexSchema.V2EnvironmentConnectionNotification.Type; readonly "thread/settings/updated": typeof CodexSchema.V2ThreadSettingsUpdatedNotification.Type; readonly "thread/tokenUsage/updated": typeof CodexSchema.V2ThreadTokenUsageUpdatedNotification.Type; readonly "turn/started": typeof CodexSchema.V2TurnStartedNotification.Type; @@ -431,6 +442,7 @@ export interface ServerNotificationParamsByMethod { readonly "item/autoApprovalReview/completed": typeof CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification.Type; readonly "item/completed": typeof CodexSchema.V2ItemCompletedNotification.Type; readonly "rawResponseItem/completed": typeof CodexSchema.V2RawResponseItemCompletedNotification.Type; + readonly "rawResponse/completed": typeof CodexSchema.V2RawResponseCompletedNotification.Type; readonly "item/agentMessage/delta": typeof CodexSchema.V2AgentMessageDeltaNotification.Type; readonly "item/plan/delta": typeof CodexSchema.V2PlanDeltaNotification.Type; readonly "command/exec/outputDelta": typeof CodexSchema.V2CommandExecOutputDeltaNotification.Type; @@ -515,7 +527,9 @@ export const CLIENT_REQUEST_PARAMS = { "plugin/share/list": CodexSchema.V2PluginShareListParams, "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams, "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams, + "app/read": CodexSchema.V2AppsReadParams, "app/list": CodexSchema.V2AppsListParams, + "app/installed": CodexSchema.V2AppsInstalledParams, "fs/readFile": CodexSchema.V2FsReadFileParams, "fs/writeFile": CodexSchema.V2FsWriteFileParams, "fs/createDirectory": CodexSchema.V2FsCreateDirectoryParams, @@ -608,7 +622,9 @@ export const CLIENT_REQUEST_RESPONSES = { "plugin/share/list": CodexSchema.V2PluginShareListResponse, "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse, "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse, + "app/read": CodexSchema.V2AppsReadResponse, "app/list": CodexSchema.V2AppsListResponse, + "app/installed": CodexSchema.V2AppsInstalledResponse, "fs/readFile": CodexSchema.V2FsReadFileResponse, "fs/writeFile": CodexSchema.V2FsWriteFileResponse, "fs/createDirectory": CodexSchema.V2FsCreateDirectoryResponse, @@ -707,6 +723,8 @@ export const SERVER_NOTIFICATION_PARAMS = { "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification, "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification, "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification, + "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification, + "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification, "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification, "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification, "turn/started": CodexSchema.V2TurnStartedNotification, @@ -721,6 +739,7 @@ export const SERVER_NOTIFICATION_PARAMS = { CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification, "item/completed": CodexSchema.V2ItemCompletedNotification, "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification, + "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification, "item/agentMessage/delta": CodexSchema.V2AgentMessageDeltaNotification, "item/plan/delta": CodexSchema.V2PlanDeltaNotification, "command/exec/outputDelta": CodexSchema.V2CommandExecOutputDeltaNotification, 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 a3a4157b..b47fc704 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: 87db9bc18ba5bc82c1cb4e4381b44f693ee35623 +// Upstream protocol ref: 25af12f7e61572b0bc18ddb1008be543b91519b0 import * as CodexSchema from "./schema.gen.ts"; @@ -14,8 +14,12 @@ export const v2 = { AccountUpdatedNotification: CodexSchema.V2AccountUpdatedNotification, AgentMessageDeltaNotification: CodexSchema.V2AgentMessageDeltaNotification, AppListUpdatedNotification: CodexSchema.V2AppListUpdatedNotification, + AppsInstalledParams: CodexSchema.V2AppsInstalledParams, + AppsInstalledResponse: CodexSchema.V2AppsInstalledResponse, AppsListParams: CodexSchema.V2AppsListParams, AppsListResponse: CodexSchema.V2AppsListResponse, + AppsReadParams: CodexSchema.V2AppsReadParams, + AppsReadResponse: CodexSchema.V2AppsReadResponse, CancelLoginAccountParams: CodexSchema.V2CancelLoginAccountParams, CancelLoginAccountResponse: CodexSchema.V2CancelLoginAccountResponse, CommandExecOutputDeltaNotification: CodexSchema.V2CommandExecOutputDeltaNotification, @@ -40,6 +44,7 @@ export const v2 = { CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse, ContextCompactedNotification: CodexSchema.V2ContextCompactedNotification, DeprecationNoticeNotification: CodexSchema.V2DeprecationNoticeNotification, + EnvironmentConnectionNotification: CodexSchema.V2EnvironmentConnectionNotification, ErrorNotification: CodexSchema.V2ErrorNotification, ExperimentalFeatureEnablementSetParams: CodexSchema.V2ExperimentalFeatureEnablementSetParams, ExperimentalFeatureEnablementSetResponse: CodexSchema.V2ExperimentalFeatureEnablementSetResponse, @@ -149,6 +154,7 @@ export const v2 = { PluginUninstallResponse: CodexSchema.V2PluginUninstallResponse, ProcessExitedNotification: CodexSchema.V2ProcessExitedNotification, ProcessOutputDeltaNotification: CodexSchema.V2ProcessOutputDeltaNotification, + RawResponseCompletedNotification: CodexSchema.V2RawResponseCompletedNotification, RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification, ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification, ReasoningSummaryTextDeltaNotification: CodexSchema.V2ReasoningSummaryTextDeltaNotification, 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 664225cf..d42f4054 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: 87db9bc18ba5bc82c1cb4e4381b44f693ee35623 +// Upstream protocol ref: 25af12f7e61572b0bc18ddb1008be543b91519b0 import * as Schema from "effect/Schema"; @@ -82,6 +82,27 @@ export const ClientRequest__ApprovalsReviewer = Schema.Literals([ "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__AppsInstalledParams = { + readonly forceRefresh?: boolean; + readonly threadId?: string | null; +}; +export const ClientRequest__AppsInstalledParams = Schema.Struct({ + forceRefresh: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.", + }), + ), + threadId: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: "Optional loaded thread id used to evaluate effective app configuration.", + }), + Schema.Null, + ]), + ), +}).annotate({ description: "Read the committed installed connector runtime snapshot." }); + export type ClientRequest__AppsListParams = { readonly cursor?: string | null; readonly forceRefetch?: boolean; @@ -124,6 +145,23 @@ export const ClientRequest__AppsListParams = Schema.Struct({ ), }).annotate({ description: "EXPERIMENTAL - list available apps/connectors." }); +export type ClientRequest__AppsReadParams = { + readonly appIds: ReadonlyArray; + readonly includeTools?: boolean; +}; +export const ClientRequest__AppsReadParams = Schema.Struct({ + appIds: Schema.Array(Schema.String).annotate({ + description: + "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.", + }), + includeTools: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, include display-only public tool summaries in the returned metadata.", + }), + ), +}).annotate({ description: "EXPERIMENTAL - read metadata for specific apps/connectors." }); + export type ClientRequest__AskForApproval = | "untrusted" | "on-request" @@ -284,6 +322,13 @@ export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.St }), }); +export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant"; +export const ClientRequest__ConversationTextRole = Schema.Literals([ + "user", + "developer", + "assistant", +]); + export type ClientRequest__DynamicToolNamespaceTool = { readonly deferLoading?: boolean; readonly description: string; @@ -353,6 +398,8 @@ export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({ export type ClientRequest__ExternalAgentConfigDetectParams = { readonly cwds?: ReadonlyArray | null; readonly includeHome?: boolean; + readonly migrationSource?: string | null; + readonly source?: string | null; }; export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -368,6 +415,24 @@ export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({ description: "If true, include detection under the user's home directory.", }), ), + migrationSource: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Optional migration-source selector. Missing or unrecognized values use the default source.", + }), + Schema.Null, + ]), + ), + source: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.", + }), + Schema.Null, + ]), + ), }); export type ClientRequest__ExternalAgentConfigMigrationItemType = @@ -379,6 +444,7 @@ export type ClientRequest__ExternalAgentConfigMigrationItemType = | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([ "AGENTS_MD", @@ -389,6 +455,7 @@ export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Litera "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); @@ -862,10 +929,11 @@ export const ClientRequest__PluginSharePrincipalType = Schema.Literals([ export type ClientRequest__PluginShareTargetRole = "reader" | "editor"; export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]); -export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE"; +export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED"; export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([ "UNLISTED", "PRIVATE", + "LISTED", ]); export type ClientRequest__PluginSkillReadParams = { @@ -1356,40 +1424,6 @@ export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schem "deny", ]); -export type CommandExecutionRequestApprovalParams__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 CommandExecutionRequestApprovalParams__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([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 CommandExecutionRequestApprovalParams__LegacyAppPathString = string; export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String; @@ -1419,7 +1453,8 @@ export const CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = export type DynamicToolCallResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -1434,6 +1469,12 @@ export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema. title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -1656,40 +1697,6 @@ export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Lit "deny", ]); -export type PermissionsRequestApprovalParams__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 PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([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 PermissionsRequestApprovalParams__LegacyAppPathString = string; export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String; @@ -1707,40 +1714,6 @@ export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.L "deny", ]); -export type PermissionsRequestApprovalResponse__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 PermissionsRequestApprovalResponse__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([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 PermissionsRequestApprovalResponse__LegacyAppPathString = string; export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String; @@ -2002,7 +1975,8 @@ export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({ export type ServerNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -2017,6 +1991,12 @@ export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -2028,6 +2008,15 @@ export const ServerNotification__DynamicToolCallStatus = Schema.Literals([ "failed", ]); +export type ServerNotification__EnvironmentConnectionNotification = { + readonly environmentId: string; + readonly threadId: string; +}; +export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({ + environmentId: Schema.String, + threadId: Schema.String, +}); + export type ServerNotification__ExternalAgentConfigMigrationItemType = | "AGENTS_MD" | "CONFIG" @@ -2037,6 +2026,7 @@ export type ServerNotification__ExternalAgentConfigMigrationItemType = | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([ "AGENTS_MD", @@ -2047,6 +2037,7 @@ export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.L "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); @@ -2069,40 +2060,6 @@ export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Stru export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny"; export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]); -export type ServerNotification__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 ServerNotification__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([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 ServerNotification__FuzzyFileSearchMatchType = "file" | "directory"; export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals(["file", "directory"]); @@ -2175,6 +2132,7 @@ export type ServerNotification__HookEventName = | "preCompact" | "postCompact" | "sessionStart" + | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" @@ -2186,6 +2144,7 @@ export const ServerNotification__HookEventName = Schema.Literals([ "preCompact", "postCompact", "sessionStart", + "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", @@ -2280,7 +2239,6 @@ export type ServerNotification__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const ServerNotification__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -2288,7 +2246,6 @@ export const ServerNotification__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type ServerNotification__McpToolCallError = { readonly message: string }; @@ -2559,8 +2516,8 @@ export const ServerNotification__RateLimitWindow = Schema.Struct({ ), }); -export type ServerNotification__RealtimeConversationVersion = "v1" | "v2"; -export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2"]); +export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3"; +export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]); export type ServerNotification__ReasoningEffort = string; export const ServerNotification__ReasoningEffort = Schema.String.annotate({ @@ -2876,6 +2833,7 @@ export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({ }); export type ServerNotification__TokenUsageBreakdown = { + readonly cacheWriteInputTokens?: number; readonly cachedInputTokens: number; readonly inputTokens: number; readonly outputTokens: number; @@ -2883,6 +2841,9 @@ export type ServerNotification__TokenUsageBreakdown = { readonly totalTokens: number; }; export const ServerNotification__TokenUsageBreakdown = Schema.Struct({ + cacheWriteInputTokens: Schema.optionalKey( + Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()), + ), cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), @@ -3092,40 +3053,6 @@ export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({ export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny"; export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]); -export type ServerRequest__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 ServerRequest__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([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 ServerRequest__LegacyAppPathString = string; export const ServerRequest__LegacyAppPathString = Schema.String; @@ -3456,6 +3383,33 @@ export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({ userPrompt: Schema.String, }); +export type V2AppsInstalledResponse__InstalledApp = { + readonly callable: boolean; + readonly enabled: boolean; + readonly id: string; + readonly runtimeName?: string | null; +}; +export const V2AppsInstalledResponse__InstalledApp = Schema.Struct({ + callable: Schema.Boolean.annotate({ + description: + "Whether the connector is enabled and has a non-synthetic, model-visible tool allowed by effective MCP and app/tool policy in the committed runtime snapshot.", + }), + enabled: Schema.Boolean.annotate({ + description: + "Effective enabled state after applying global, workspace, local, and managed configuration at read time.", + }), + id: Schema.String, + runtimeName: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Best-effort name carried by the runtime tool catalog. Canonical app metadata remains owned by `app/read`.", + }), + Schema.Null, + ]), + ), +}).annotate({ description: "Installed connector runtime state." }); + export type V2AppsListResponse__AppBranding = { readonly category?: string | null; readonly developer?: string | null; @@ -3487,6 +3441,17 @@ export const V2AppsListResponse__AppScreenshot = Schema.Struct({ userPrompt: Schema.String, }); +export type V2AppsReadResponse__AppToolSummary = { + readonly description: string; + readonly name: string; + readonly title?: string | null; +}; +export const V2AppsReadResponse__AppToolSummary = Schema.Struct({ + description: Schema.String, + name: Schema.String, + title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), +}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." }); + export type V2CancelLoginAccountResponse__CancelLoginAccountStatus = "canceled" | "notFound"; export const V2CancelLoginAccountResponse__CancelLoginAccountStatus = Schema.Literals([ "canceled", @@ -3718,6 +3683,7 @@ export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema. export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler = | { + readonly additionalContextLimit?: number | null; readonly async: boolean; readonly command: string; readonly commandWindows?: string | null; @@ -3730,6 +3696,18 @@ export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler = export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union( [ Schema.Struct({ + additionalContextLimit: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ + description: + "Approximate token threshold for spilling this hook's `additionalContext` to disk. `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is evaluated against the original context; a spilled preview also includes recovery metadata.", + format: "uint", + }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + Schema.Null, + ]), + ), async: Schema.Boolean, command: Schema.String, commandWindows: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -3906,6 +3884,7 @@ export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationIte | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType = Schema.Literals([ @@ -3917,6 +3896,7 @@ export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationIt "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); @@ -3969,6 +3949,7 @@ export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfi | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([ @@ -3980,6 +3961,7 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); @@ -3992,6 +3974,7 @@ export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfi | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType = Schema.Literals([ @@ -4003,9 +3986,15 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); +export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource = + "remoteMcpServersConfig"; +export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource = + Schema.Literal("remoteMcpServersConfig"); + export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string }; export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({ name: Schema.String, @@ -4020,6 +4009,7 @@ export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemT | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType = Schema.Literals([ @@ -4031,6 +4021,7 @@ export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); @@ -4083,6 +4074,7 @@ export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfig | "SUBAGENTS" | "HOOKS" | "COMMANDS" + | "MEMORY" | "SESSIONS"; export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([ @@ -4094,6 +4086,7 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi "SUBAGENTS", "HOOKS", "COMMANDS", + "MEMORY", "SESSIONS", ]); @@ -4324,6 +4317,7 @@ export type V2HookCompletedNotification__HookEventName = | "preCompact" | "postCompact" | "sessionStart" + | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" @@ -4335,6 +4329,7 @@ export const V2HookCompletedNotification__HookEventName = Schema.Literals([ "preCompact", "postCompact", "sessionStart", + "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", @@ -4404,6 +4399,7 @@ export type V2HooksListResponse__HookEventName = | "preCompact" | "postCompact" | "sessionStart" + | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" @@ -4415,6 +4411,7 @@ export const V2HooksListResponse__HookEventName = Schema.Literals([ "preCompact", "postCompact", "sessionStart", + "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", @@ -4471,6 +4468,7 @@ export type V2HookStartedNotification__HookEventName = | "preCompact" | "postCompact" | "sessionStart" + | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" @@ -4482,6 +4480,7 @@ export const V2HookStartedNotification__HookEventName = Schema.Literals([ "preCompact", "postCompact", "sessionStart", + "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", @@ -4567,7 +4566,8 @@ export const V2ItemCompletedNotification__CommandExecutionStatus = Schema.Litera export type V2ItemCompletedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -4582,6 +4582,12 @@ export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Sch title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -4622,7 +4628,6 @@ export type V2ItemCompletedNotification__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ItemCompletedNotification__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -4630,7 +4635,6 @@ export const V2ItemCompletedNotification__McpToolCallAppContext = Schema.Struct( connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ItemCompletedNotification__McpToolCallError = { readonly message: string }; @@ -4812,41 +4816,6 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessM export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]); -export type V2ItemGuardianApprovalReviewCompletedNotification__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 V2ItemGuardianApprovalReviewCompletedNotification__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 V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus = | "inProgress" | "approved" @@ -4914,40 +4883,6 @@ export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMod export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]); -export type V2ItemGuardianApprovalReviewStartedNotification__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 V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = Schema.Union( - [ - Schema.Struct({ kind: Schema.Literal("root") }).annotate({ - title: "RootFileSystemSpecialPath", - }), - Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ - title: "MinimalFileSystemSpecialPath", - }), - Schema.Struct({ - kind: Schema.Literal("project_roots"), - subpath: Schema.optionalKey(Schema.Union([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 V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus = | "inProgress" | "approved" @@ -5036,7 +4971,8 @@ export const V2ItemStartedNotification__CommandExecutionStatus = Schema.Literals export type V2ItemStartedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -5051,6 +4987,12 @@ export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schem title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -5091,7 +5033,6 @@ export type V2ItemStartedNotification__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ItemStartedNotification__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -5099,7 +5040,6 @@ export const V2ItemStartedNotification__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ItemStartedNotification__McpToolCallError = { readonly message: string }; @@ -5429,10 +5369,12 @@ export const V2McpServerStatusUpdatedNotification__McpServerStartupState = Schem "cancelled", ]); -export type V2ModelListResponse__InputModality = "text" | "image"; -export const V2ModelListResponse__InputModality = Schema.Literals(["text", "image"]).annotate({ - description: "Canonical user-input modality tags advertised by a model.", -}); +export type V2ModelListResponse__InputModality = "text" | "image" | "audio"; +export const V2ModelListResponse__InputModality = Schema.Literals([ + "text", + "image", + "audio", +]).annotate({ description: "Canonical user-input modality tags advertised by a model." }); export type V2ModelListResponse__ModelAvailabilityNux = { readonly message: string }; export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({ message: Schema.String }); @@ -5700,6 +5642,7 @@ export type V2PluginReadResponse__HookEventName = | "preCompact" | "postCompact" | "sessionStart" + | "sessionEnd" | "userPromptSubmit" | "subagentStart" | "subagentStop" @@ -5711,6 +5654,7 @@ export const V2PluginReadResponse__HookEventName = Schema.Literals([ "preCompact", "postCompact", "sessionStart", + "sessionEnd", "userPromptSubmit", "subagentStart", "subagentStop", @@ -5759,6 +5703,24 @@ export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([ "workspace", ]); +export type V2PluginReadResponse__ScheduledTaskWeekday = + | "MO" + | "TU" + | "WE" + | "TH" + | "FR" + | "SA" + | "SU"; +export const V2PluginReadResponse__ScheduledTaskWeekday = Schema.Literals([ + "MO", + "TU", + "WE", + "TH", + "FR", + "SA", + "SU", +]); + export type V2PluginShareCheckoutResponse__AbsolutePathBuf = string; export const V2PluginShareCheckoutResponse__AbsolutePathBuf = Schema.String.annotate({ description: @@ -5860,10 +5822,12 @@ export const V2PluginShareUpdateTargetsParams__PluginShareTargetRole = Schema.Li export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = | "UNLISTED" - | "PRIVATE"; + | "PRIVATE" + | "LISTED"; export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([ "UNLISTED", "PRIVATE", + "LISTED", ]); export type V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability = @@ -5896,6 +5860,25 @@ export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Sche "workspace", ]); +export type V2RawResponseCompletedNotification__TokenUsageBreakdown = { + readonly cacheWriteInputTokens?: number; + readonly cachedInputTokens: number; + readonly inputTokens: number; + readonly outputTokens: number; + readonly reasoningOutputTokens: number; + readonly totalTokens: number; +}; +export const V2RawResponseCompletedNotification__TokenUsageBreakdown = Schema.Struct({ + cacheWriteInputTokens: Schema.optionalKey( + Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()), + ), + cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), + totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), +}); + export type V2RawResponseItemCompletedNotification__AgentMessageInputContent = | { readonly text: string; readonly type: "input_text" } | { readonly encrypted_content: string; readonly type: "encrypted_content" }; @@ -6162,7 +6145,8 @@ export const V2ReviewStartResponse__CommandExecutionStatus = Schema.Literals([ export type V2ReviewStartResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -6177,6 +6161,12 @@ export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Un title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -6214,7 +6204,6 @@ export type V2ReviewStartResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ReviewStartResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -6222,7 +6211,6 @@ export const V2ReviewStartResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ReviewStartResponse__McpToolCallError = { readonly message: string }; @@ -6582,7 +6570,8 @@ export const V2ThreadForkResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadForkResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -6597,6 +6586,12 @@ export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Uni title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -6645,7 +6640,6 @@ export type V2ThreadForkResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -6653,7 +6647,6 @@ export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadForkResponse__McpToolCallError = { readonly message: string }; @@ -6976,7 +6969,8 @@ export const V2ThreadListResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadListResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -6991,6 +6985,12 @@ export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Uni title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -7039,7 +7039,6 @@ export type V2ThreadListResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -7047,7 +7046,6 @@ export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadListResponse__McpToolCallError = { readonly message: string }; @@ -7301,7 +7299,8 @@ export const V2ThreadMetadataUpdateResponse__CommandExecutionStatus = Schema.Lit export type V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -7316,6 +7315,12 @@ export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -7367,7 +7372,6 @@ export type V2ThreadMetadataUpdateResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -7375,7 +7379,6 @@ export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Stru connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string }; @@ -7607,7 +7610,8 @@ export const V2ThreadReadResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadReadResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -7622,6 +7626,12 @@ export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Uni title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -7670,7 +7680,6 @@ export type V2ThreadReadResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -7678,7 +7687,6 @@ export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadReadResponse__McpToolCallError = { readonly message: string }; @@ -7884,10 +7892,11 @@ export const V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioCh }, ).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." }); -export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2"; +export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2" | "v3"; export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = Schema.Literals([ "v1", "v2", + "v3", ]); export type V2ThreadResumeParams__AgentMessageInputContent = @@ -8183,7 +8192,8 @@ export const V2ThreadResumeResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadResumeResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -8198,6 +8208,12 @@ export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.U title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -8246,7 +8262,6 @@ export type V2ThreadResumeResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -8254,7 +8269,6 @@ export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string }; @@ -8473,7 +8487,8 @@ export const V2ThreadRollbackResponse__CommandExecutionStatus = Schema.Literals( export type V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -8488,6 +8503,12 @@ export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -8536,7 +8557,6 @@ export type V2ThreadRollbackResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -8544,7 +8564,6 @@ export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string }; @@ -8871,7 +8890,8 @@ export const V2ThreadStartedNotification__CommandExecutionStatus = Schema.Litera export type V2ThreadStartedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -8886,6 +8906,12 @@ export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Sch title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -8937,7 +8963,6 @@ export type V2ThreadStartedNotification__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -8945,7 +8970,6 @@ export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct( connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string }; @@ -9284,7 +9308,8 @@ export const V2ThreadStartResponse__CommandExecutionStatus = Schema.Literals([ export type V2ThreadStartResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -9299,6 +9324,12 @@ export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Un title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -9347,7 +9378,6 @@ export type V2ThreadStartResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -9355,7 +9385,6 @@ export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadStartResponse__McpToolCallError = { readonly message: string }; @@ -9542,6 +9571,7 @@ export const V2ThreadStatusChangedNotification__ThreadActiveFlag = Schema.Litera ]); export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = { + readonly cacheWriteInputTokens?: number; readonly cachedInputTokens: number; readonly inputTokens: number; readonly outputTokens: number; @@ -9549,6 +9579,9 @@ export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = { readonly totalTokens: number; }; export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema.Struct({ + cacheWriteInputTokens: Schema.optionalKey( + Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()), + ), cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), @@ -9597,7 +9630,8 @@ export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -9612,6 +9646,12 @@ export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schem title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -9663,7 +9703,6 @@ export type V2ThreadUnarchiveResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -9671,7 +9710,6 @@ export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string }; @@ -9907,7 +9945,8 @@ export const V2TurnCompletedNotification__CommandExecutionStatus = Schema.Litera export type V2TurnCompletedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -9922,6 +9961,12 @@ export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Sch title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -9962,7 +10007,6 @@ export type V2TurnCompletedNotification__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2TurnCompletedNotification__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -9970,7 +10014,6 @@ export const V2TurnCompletedNotification__McpToolCallAppContext = Schema.Struct( connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2TurnCompletedNotification__McpToolCallError = { readonly message: string }; @@ -10192,7 +10235,8 @@ export const V2TurnStartedNotification__CommandExecutionStatus = Schema.Literals export type V2TurnStartedNotification__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -10207,6 +10251,12 @@ export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schem title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -10247,7 +10297,6 @@ export type V2TurnStartedNotification__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2TurnStartedNotification__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -10255,7 +10304,6 @@ export const V2TurnStartedNotification__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2TurnStartedNotification__McpToolCallError = { readonly message: string }; @@ -10574,7 +10622,8 @@ export const V2TurnStartResponse__CommandExecutionStatus = Schema.Literals([ export type V2TurnStartResponse__DynamicToolCallOutputContentItem = | { readonly text: string; readonly type: "inputText" } - | { readonly imageUrl: string; readonly type: "inputImage" }; + | { readonly imageUrl: string; readonly type: "inputImage" } + | { readonly audioUrl: string; readonly type: "inputAudio" }; export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Union( [ Schema.Struct({ @@ -10589,6 +10638,12 @@ export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Unio title: "InputImageDynamicToolCallOutputContentItemType", }), }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }), + Schema.Struct({ + audioUrl: Schema.String, + type: Schema.Literal("inputAudio").annotate({ + title: "InputAudioDynamicToolCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }), ], { mode: "oneOf" }, ); @@ -10626,7 +10681,6 @@ export type V2TurnStartResponse__McpToolCallAppContext = { readonly connectorId: string; readonly linkId?: string | null; readonly resourceUri?: string | null; - readonly templateId?: string | null; }; export const V2TurnStartResponse__McpToolCallAppContext = Schema.Struct({ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -10634,7 +10688,6 @@ export const V2TurnStartResponse__McpToolCallAppContext = Schema.Struct({ connectorId: Schema.String, linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - templateId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2TurnStartResponse__McpToolCallError = { readonly message: string }; @@ -10996,6 +11049,7 @@ export type ClientRequest__ContentItem = readonly image_url: string; readonly type: "input_image"; } + | { readonly audio_url: string; readonly type: "input_audio" } | { readonly text: string; readonly type: "output_text" }; export const ClientRequest__ContentItem = Schema.Union( [ @@ -11008,6 +11062,10 @@ export const ClientRequest__ContentItem = Schema.Union( image_url: Schema.String, type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), }).annotate({ title: "InputImageContentItem" }), + Schema.Struct({ + audio_url: Schema.String, + type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }), + }).annotate({ title: "InputAudioContentItem" }), Schema.Struct({ text: Schema.String, type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), @@ -11023,6 +11081,7 @@ export type ClientRequest__FunctionCallOutputContentItem = readonly image_url: string; readonly type: "input_image"; } + | { readonly audio_url: string; readonly type: "input_audio" } | { readonly encrypted_content: string; readonly type: "encrypted_content" }; export const ClientRequest__FunctionCallOutputContentItem = Schema.Union( [ @@ -11039,6 +11098,12 @@ export const ClientRequest__FunctionCallOutputContentItem = Schema.Union( title: "InputImageFunctionCallOutputContentItemType", }), }).annotate({ title: "InputImageFunctionCallOutputContentItem" }), + Schema.Struct({ + audio_url: Schema.String, + type: Schema.Literal("input_audio").annotate({ + title: "InputAudioFunctionCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }), Schema.Struct({ encrypted_content: Schema.String, type: Schema.Literal("encrypted_content").annotate({ @@ -11077,7 +11142,8 @@ export type ClientRequest__LoginAccountParams = readonly chatgptAccountId: string; readonly chatgptPlanType?: string | null; readonly type: "chatgptAuthTokens"; - }; + } + | { readonly apiKey: string; readonly region: string; readonly type: "amazonBedrock" }; export const ClientRequest__LoginAccountParams = Schema.Union( [ Schema.Struct({ @@ -11120,6 +11186,16 @@ export const ClientRequest__LoginAccountParams = Schema.Union( description: "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.", }), + Schema.Struct({ + apiKey: Schema.String, + region: Schema.String, + type: Schema.Literal("amazonBedrock").annotate({ + title: "AmazonBedrockLoginAccountParamsType", + }), + }).annotate({ + title: "AmazonBedrockLoginAccountParams", + description: "[UNSTABLE] Managed Amazon Bedrock login is experimental.", + }), ], { mode: "oneOf" }, ); @@ -11306,6 +11382,7 @@ export type ClientRequest__MigrationDetails = { readonly commands?: ReadonlyArray; readonly hooks?: ReadonlyArray; readonly mcpServers?: ReadonlyArray; + readonly memory?: ReadonlyArray; readonly plugins?: ReadonlyArray; readonly sessions?: ReadonlyArray; readonly skills?: ReadonlyArray; @@ -11319,6 +11396,7 @@ export const ClientRequest__MigrationDetails = Schema.Struct({ mcpServers: Schema.optionalKey( Schema.Array(ClientRequest__McpServerMigration).annotate({ default: [] }), ), + memory: Schema.optionalKey(Schema.Array(Schema.String)), plugins: Schema.optionalKey( Schema.Array(ClientRequest__PluginsMigration).annotate({ default: [] }), ), @@ -11347,6 +11425,8 @@ export type ClientRequest__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const ClientRequest__UserInput = Schema.Union( @@ -11371,6 +11451,14 @@ export const ClientRequest__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -11667,30 +11755,47 @@ export const CommandExecutionRequestApprovalParams__CommandAction = Schema.Union { mode: "oneOf" }, ); -export type CommandExecutionRequestApprovalParams__FileSystemPath = +export type CommandExecutionRequestApprovalParams__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } | { - readonly path: CommandExecutionRequestApprovalParams__LegacyAppPathString; - readonly type: "path"; + readonly kind: "project_roots"; + readonly subpath?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null; } - | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } | { - readonly type: "special"; - readonly value: CommandExecutionRequestApprovalParams__FileSystemSpecialPath; + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null; }; -export const CommandExecutionRequestApprovalParams__FileSystemPath = Schema.Union( +export const CommandExecutionRequestApprovalParams__FileSystemSpecialPath = Schema.Union( [ + Schema.Struct({ kind: Schema.Literal("root") }).annotate({ + title: "RootFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ + title: "MinimalFileSystemSpecialPath", + }), Schema.Struct({ - path: CommandExecutionRequestApprovalParams__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), + kind: Schema.Literal("project_roots"), + subpath: Schema.optionalKey( + Schema.Union([CommandExecutionRequestApprovalParams__LegacyAppPathString, Schema.Null]), + ), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: CommandExecutionRequestApprovalParams__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey( + Schema.Union([CommandExecutionRequestApprovalParams__LegacyAppPathString, Schema.Null]), + ), + }), ], { mode: "oneOf" }, ); @@ -11968,55 +12073,92 @@ export const McpServerElicitationRequestParams__McpElicitationUntitledSingleSele type: McpServerElicitationRequestParams__McpElicitationStringType, }); -export type PermissionsRequestApprovalParams__FileSystemPath = - | { readonly path: PermissionsRequestApprovalParams__LegacyAppPathString; readonly type: "path" } - | { readonly pattern: string; readonly type: "glob_pattern" } +export type PermissionsRequestApprovalParams__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } | { - readonly type: "special"; - readonly value: PermissionsRequestApprovalParams__FileSystemSpecialPath; + readonly kind: "project_roots"; + readonly subpath?: PermissionsRequestApprovalParams__LegacyAppPathString | null; + } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: PermissionsRequestApprovalParams__LegacyAppPathString | null; }; -export const PermissionsRequestApprovalParams__FileSystemPath = Schema.Union( +export const PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Union( [ + Schema.Struct({ kind: Schema.Literal("root") }).annotate({ + title: "RootFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ + title: "MinimalFileSystemSpecialPath", + }), Schema.Struct({ - path: PermissionsRequestApprovalParams__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), + kind: Schema.Literal("project_roots"), + subpath: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalParams__LegacyAppPathString, Schema.Null]), + ), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: PermissionsRequestApprovalParams__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalParams__LegacyAppPathString, Schema.Null]), + ), + }), ], { mode: "oneOf" }, ); -export type PermissionsRequestApprovalResponse__FileSystemPath = +export type PermissionsRequestApprovalResponse__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } | { - readonly path: PermissionsRequestApprovalResponse__LegacyAppPathString; - readonly type: "path"; + readonly kind: "project_roots"; + readonly subpath?: PermissionsRequestApprovalResponse__LegacyAppPathString | null; } - | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } | { - readonly type: "special"; - readonly value: PermissionsRequestApprovalResponse__FileSystemSpecialPath; + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: PermissionsRequestApprovalResponse__LegacyAppPathString | null; }; -export const PermissionsRequestApprovalResponse__FileSystemPath = Schema.Union( +export const PermissionsRequestApprovalResponse__FileSystemSpecialPath = Schema.Union( [ + Schema.Struct({ kind: Schema.Literal("root") }).annotate({ + title: "RootFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ + title: "MinimalFileSystemSpecialPath", + }), Schema.Struct({ - path: PermissionsRequestApprovalResponse__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), + kind: Schema.Literal("project_roots"), + subpath: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalResponse__LegacyAppPathString, Schema.Null]), + ), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: PermissionsRequestApprovalResponse__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalResponse__LegacyAppPathString, Schema.Null]), + ), + }), ], { mode: "oneOf" }, ); @@ -12166,6 +12308,7 @@ export type ServerNotification__ExternalAgentConfigImportItemTypeFailure = { readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType; readonly message: string; readonly source?: string | null; + readonly subErrorType?: string | null; }; export const ServerNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({ cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), @@ -12174,6 +12317,7 @@ export const ServerNotification__ExternalAgentConfigImportItemTypeFailure = Sche itemType: ServerNotification__ExternalAgentConfigMigrationItemType, message: Schema.String, source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type ServerNotification__ExternalAgentConfigImportItemTypeSuccess = { @@ -12244,24 +12388,47 @@ export const ServerNotification__HookOutputEntry = Schema.Struct({ text: Schema.String, }); -export type ServerNotification__FileSystemPath = - | { readonly path: ServerNotification__LegacyAppPathString; readonly type: "path" } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { readonly type: "special"; readonly value: ServerNotification__FileSystemSpecialPath }; -export const ServerNotification__FileSystemPath = Schema.Union( +export type ServerNotification__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { + readonly kind: "project_roots"; + readonly subpath?: ServerNotification__LegacyAppPathString | null; + } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: ServerNotification__LegacyAppPathString | null; + }; +export const ServerNotification__FileSystemSpecialPath = Schema.Union( [ + Schema.Struct({ kind: Schema.Literal("root") }).annotate({ + title: "RootFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ + title: "MinimalFileSystemSpecialPath", + }), Schema.Struct({ - path: ServerNotification__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), + kind: Schema.Literal("project_roots"), + subpath: Schema.optionalKey( + Schema.Union([ServerNotification__LegacyAppPathString, Schema.Null]), + ), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: ServerNotification__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey( + Schema.Union([ServerNotification__LegacyAppPathString, Schema.Null]), + ), + }), ], { mode: "oneOf" }, ); @@ -12503,6 +12670,7 @@ export type ServerNotification__RateLimitSnapshot = { readonly primary?: ServerNotification__RateLimitWindow | null; readonly rateLimitReachedType?: ServerNotification__RateLimitReachedType | null; readonly secondary?: ServerNotification__RateLimitWindow | null; + readonly spendControlReached?: boolean | null; }; export const ServerNotification__RateLimitSnapshot = Schema.Struct({ credits: Schema.optionalKey(Schema.Union([ServerNotification__CreditsSnapshot, Schema.Null])), @@ -12517,6 +12685,15 @@ export const ServerNotification__RateLimitSnapshot = Schema.Struct({ Schema.Union([ServerNotification__RateLimitReachedType, Schema.Null]), ), secondary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])), + spendControlReached: Schema.optionalKey( + Schema.Union([ + Schema.Boolean.annotate({ + description: + "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", + }), + Schema.Null, + ]), + ), }); export type ServerNotification__UserInput = @@ -12535,6 +12712,8 @@ export type ServerNotification__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const ServerNotification__UserInput = Schema.Union( @@ -12559,6 +12738,14 @@ export const ServerNotification__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -12764,24 +12951,40 @@ export const ServerRequest__ChatgptAuthTokensRefreshParams = Schema.Struct({ reason: ServerRequest__ChatgptAuthTokensRefreshReason, }); -export type ServerRequest__FileSystemPath = - | { readonly path: ServerRequest__LegacyAppPathString; readonly type: "path" } - | { readonly pattern: string; readonly type: "glob_pattern" } - | { readonly type: "special"; readonly value: ServerRequest__FileSystemSpecialPath }; -export const ServerRequest__FileSystemPath = Schema.Union( +export type ServerRequest__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } + | { readonly kind: "project_roots"; readonly subpath?: ServerRequest__LegacyAppPathString | null } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } + | { + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: ServerRequest__LegacyAppPathString | null; + }; +export const ServerRequest__FileSystemSpecialPath = Schema.Union( [ + Schema.Struct({ kind: Schema.Literal("root") }).annotate({ + title: "RootFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ + title: "MinimalFileSystemSpecialPath", + }), Schema.Struct({ - path: ServerRequest__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), + kind: Schema.Literal("project_roots"), + subpath: Schema.optionalKey(Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null])), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: ServerRequest__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey(Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null])), + }), ], { mode: "oneOf" }, ); @@ -13061,6 +13264,7 @@ export type V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = { readonly primary?: V2AccountRateLimitsUpdatedNotification__RateLimitWindow | null; readonly rateLimitReachedType?: V2AccountRateLimitsUpdatedNotification__RateLimitReachedType | null; readonly secondary?: V2AccountRateLimitsUpdatedNotification__RateLimitWindow | null; + readonly spendControlReached?: boolean | null; }; export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema.Struct({ credits: Schema.optionalKey( @@ -13083,6 +13287,15 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema. secondary: Schema.optionalKey( Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitWindow, Schema.Null]), ), + spendControlReached: Schema.optionalKey( + Schema.Union([ + Schema.Boolean.annotate({ + description: + "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", + }), + Schema.Null, + ]), + ), }); export type V2AppListUpdatedNotification__AppMetadata = { @@ -13147,6 +13360,31 @@ export const V2AppsListResponse__AppMetadata = Schema.Struct({ versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2AppsReadResponse__ConnectorMetadata = { + readonly description?: string | null; + readonly distributionChannel?: string | null; + readonly iconUrl?: string | null; + readonly iconUrlDark?: string | null; + readonly id: string; + readonly installUrl?: string | null; + readonly name: string; + readonly pluginDisplayNames?: ReadonlyArray; + readonly toolSummaries?: ReadonlyArray | null; +}; +export const V2AppsReadResponse__ConnectorMetadata = Schema.Struct({ + description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + distributionChannel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + iconUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + iconUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + id: Schema.String, + installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + name: Schema.String, + pluginDisplayNames: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })), + toolSummaries: Schema.optionalKey( + Schema.Union([Schema.Array(V2AppsReadResponse__AppToolSummary), Schema.Null]), + ), +}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." }); + export type V2CommandExecParams__SandboxPolicy = | { readonly type: "dangerFullAccess" } | { readonly networkAccess?: boolean; readonly type: "readOnly" } @@ -13576,6 +13814,7 @@ export type V2ExternalAgentConfigDetectResponse__MigrationDetails = { readonly commands?: ReadonlyArray; readonly hooks?: ReadonlyArray; readonly mcpServers?: ReadonlyArray; + readonly memory?: ReadonlyArray; readonly plugins?: ReadonlyArray; readonly sessions?: ReadonlyArray; readonly skills?: ReadonlyArray; @@ -13591,6 +13830,7 @@ export const V2ExternalAgentConfigDetectResponse__MigrationDetails = Schema.Stru mcpServers: Schema.optionalKey( Schema.Array(V2ExternalAgentConfigDetectResponse__McpServerMigration).annotate({ default: [] }), ), + memory: Schema.optionalKey(Schema.Array(Schema.String)), plugins: Schema.optionalKey( Schema.Array(V2ExternalAgentConfigDetectResponse__PluginsMigration).annotate({ default: [] }), ), @@ -13613,6 +13853,7 @@ export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfi readonly itemType: V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType; readonly message: string; readonly source?: string | null; + readonly subErrorType?: string | null; }; export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({ @@ -13623,6 +13864,7 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType, message: Schema.String, source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess = @@ -13649,6 +13891,7 @@ export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfi readonly itemType: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType; readonly message: string; readonly source?: string | null; + readonly subErrorType?: string | null; }; export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({ @@ -13659,6 +13902,7 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType, message: Schema.String, source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess = @@ -13677,10 +13921,26 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate = + { + readonly name: string; + readonly sessionCount: number; + readonly source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource; + }; +export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate = + Schema.Struct({ + name: Schema.String, + sessionCount: Schema.Number.annotate({ format: "uint32" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource, + }); + export type V2ExternalAgentConfigImportParams__MigrationDetails = { readonly commands?: ReadonlyArray; readonly hooks?: ReadonlyArray; readonly mcpServers?: ReadonlyArray; + readonly memory?: ReadonlyArray; readonly plugins?: ReadonlyArray; readonly sessions?: ReadonlyArray; readonly skills?: ReadonlyArray; @@ -13696,6 +13956,7 @@ export const V2ExternalAgentConfigImportParams__MigrationDetails = Schema.Struct mcpServers: Schema.optionalKey( Schema.Array(V2ExternalAgentConfigImportParams__McpServerMigration).annotate({ default: [] }), ), + memory: Schema.optionalKey(Schema.Array(Schema.String)), plugins: Schema.optionalKey( Schema.Array(V2ExternalAgentConfigImportParams__PluginsMigration).annotate({ default: [] }), ), @@ -13718,6 +13979,7 @@ export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfig readonly itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType; readonly message: string; readonly source?: string | null; + readonly subErrorType?: string | null; }; export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({ @@ -13727,6 +13989,7 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType, message: Schema.String, source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess = @@ -13810,6 +14073,7 @@ export type V2GetAccountRateLimitsResponse__RateLimitSnapshot = { readonly primary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; readonly rateLimitReachedType?: V2GetAccountRateLimitsResponse__RateLimitReachedType | null; readonly secondary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; + readonly spendControlReached?: boolean | null; }; export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({ credits: Schema.optionalKey( @@ -13832,6 +14096,15 @@ export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({ secondary: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]), ), + spendControlReached: Schema.optionalKey( + Schema.Union([ + Schema.Boolean.annotate({ + description: + "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", + }), + Schema.Null, + ]), + ), }); export type V2GetAccountResponse__Account = @@ -13841,7 +14114,7 @@ export type V2GetAccountResponse__Account = readonly planType: V2GetAccountResponse__PlanType; readonly type: "chatgpt"; } - | { readonly credentialSource?: "codexManaged" | "awsManaged"; readonly type: "amazonBedrock" }; + | { readonly type: "amazonBedrock"; readonly usesCodexManagedCredentials?: boolean }; export const V2GetAccountResponse__Account = Schema.Union( [ Schema.Struct({ @@ -13853,10 +14126,8 @@ export const V2GetAccountResponse__Account = Schema.Union( type: Schema.Literal("chatgpt").annotate({ title: "ChatgptAccountType" }), }).annotate({ title: "ChatgptAccount" }), Schema.Struct({ - credentialSource: Schema.optionalKey( - Schema.Literals(["codexManaged", "awsManaged"]).annotate({ default: "awsManaged" }), - ), type: Schema.Literal("amazonBedrock").annotate({ title: "AmazonBedrockAccountType" }), + usesCodexManagedCredentials: Schema.optionalKey(Schema.Boolean.annotate({ default: false })), }).annotate({ title: "AmazonBedrockAccount" }), ], { mode: "oneOf" }, @@ -13903,6 +14174,7 @@ export const V2HookCompletedNotification__HookOutputEntry = Schema.Struct({ }); export type V2HooksListResponse__HookMetadata = { + readonly additionalContextLimit?: number | null; readonly command?: string | null; readonly currentHash: string; readonly displayOrder: number; @@ -13920,6 +14192,18 @@ export type V2HooksListResponse__HookMetadata = { readonly trustStatus: V2HooksListResponse__HookTrustStatus; }; export const V2HooksListResponse__HookMetadata = Schema.Struct({ + additionalContextLimit: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ + description: + "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", + format: "uint", + }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + Schema.Null, + ]), + ), command: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), currentHash: Schema.String, displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), @@ -14035,6 +14319,8 @@ export type V2ItemCompletedNotification__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ItemCompletedNotification__UserInput = Schema.Union( @@ -14063,6 +14349,14 @@ export const V2ItemCompletedNotification__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -14104,33 +14398,57 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApproval "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", }); -export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = +export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } | { - readonly path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString; - readonly type: "path"; + readonly kind: "project_roots"; + readonly subpath?: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString | null; } - | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } | { - readonly type: "special"; - readonly value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath; + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString | null; }; -export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = Schema.Union( - [ - Schema.Struct({ - path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), - Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), - ], - { mode: "oneOf" }, -); +export const V2ItemGuardianApprovalReviewCompletedNotification__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([ + V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, + Schema.Null, + ]), + ), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), + Schema.Struct({ + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, + Schema.Null, + ]), + ), + }), + ], + { mode: "oneOf" }, + ); export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview = { readonly rationale?: string | null; @@ -14159,30 +14477,53 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRe "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", }); -export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = +export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = + | { readonly kind: "root" } + | { readonly kind: "minimal" } | { - readonly path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString; - readonly type: "path"; + readonly kind: "project_roots"; + readonly subpath?: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString | null; } - | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly kind: "tmpdir" } + | { readonly kind: "slash_tmp" } | { - readonly type: "special"; - readonly value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath; + readonly kind: "unknown"; + readonly path: string; + readonly subpath?: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString | null; }; -export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = Schema.Union( +export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath = Schema.Union( [ + Schema.Struct({ kind: Schema.Literal("root") }).annotate({ + title: "RootFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({ + title: "MinimalFileSystemSpecialPath", + }), Schema.Struct({ - path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, - type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), - }).annotate({ title: "PathFileSystemPath" }), - Schema.Struct({ - pattern: Schema.String, - type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), - }).annotate({ title: "GlobPatternFileSystemPath" }), + kind: Schema.Literal("project_roots"), + subpath: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, + Schema.Null, + ]), + ), + }).annotate({ title: "KindFileSystemSpecialPath" }), + Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({ + title: "TmpdirFileSystemSpecialPath", + }), + Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({ + title: "SlashTmpFileSystemSpecialPath", + }), Schema.Struct({ - type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), - value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath, - }).annotate({ title: "SpecialFileSystemPath" }), + kind: Schema.Literal("unknown"), + path: Schema.String, + subpath: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, + Schema.Null, + ]), + ), + }), ], { mode: "oneOf" }, ); @@ -14274,6 +14615,8 @@ export type V2ItemStartedNotification__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ItemStartedNotification__UserInput = Schema.Union( @@ -14302,6 +14645,14 @@ export const V2ItemStartedNotification__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -14875,6 +15226,47 @@ export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({ role: V2PluginReadResponse__PluginSharePrincipalRole, }); +export type V2PluginReadResponse__ScheduledTaskSchedule = + | { + readonly days?: ReadonlyArray | null; + readonly intervalHours: number; + readonly type: "hourly"; + } + | { readonly time: string; readonly type: "daily" } + | { readonly time: string; readonly type: "weekdays" } + | { + readonly days: ReadonlyArray; + readonly time: string; + readonly type: "weekly"; + }; +export const V2PluginReadResponse__ScheduledTaskSchedule = Schema.Union( + [ + Schema.Struct({ + days: Schema.optionalKey( + Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskWeekday), Schema.Null]), + ), + intervalHours: Schema.Number.annotate({ format: "uint32" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(0)), + type: Schema.Literal("hourly").annotate({ title: "HourlyScheduledTaskScheduleType" }), + }).annotate({ title: "HourlyScheduledTaskSchedule" }), + Schema.Struct({ + time: Schema.String, + type: Schema.Literal("daily").annotate({ title: "DailyScheduledTaskScheduleType" }), + }).annotate({ title: "DailyScheduledTaskSchedule" }), + Schema.Struct({ + time: Schema.String, + type: Schema.Literal("weekdays").annotate({ title: "WeekdaysScheduledTaskScheduleType" }), + }).annotate({ title: "WeekdaysScheduledTaskSchedule" }), + Schema.Struct({ + days: Schema.Array(V2PluginReadResponse__ScheduledTaskWeekday), + time: Schema.String, + type: Schema.Literal("weekly").annotate({ title: "WeeklyScheduledTaskScheduleType" }), + }).annotate({ title: "WeeklyScheduledTaskSchedule" }), + ], + { mode: "oneOf" }, +); + export type V2PluginShareListResponse__PluginInterface = { readonly brandColor?: string | null; readonly capabilities: ReadonlyArray; @@ -15071,6 +15463,7 @@ export type V2RawResponseItemCompletedNotification__ContentItem = readonly image_url: string; readonly type: "input_image"; } + | { readonly audio_url: string; readonly type: "input_audio" } | { readonly text: string; readonly type: "output_text" }; export const V2RawResponseItemCompletedNotification__ContentItem = Schema.Union( [ @@ -15085,6 +15478,10 @@ export const V2RawResponseItemCompletedNotification__ContentItem = Schema.Union( image_url: Schema.String, type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), }).annotate({ title: "InputImageContentItem" }), + Schema.Struct({ + audio_url: Schema.String, + type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }), + }).annotate({ title: "InputAudioContentItem" }), Schema.Struct({ text: Schema.String, type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), @@ -15100,6 +15497,7 @@ export type V2RawResponseItemCompletedNotification__FunctionCallOutputContentIte readonly image_url: string; readonly type: "input_image"; } + | { readonly audio_url: string; readonly type: "input_audio" } | { readonly encrypted_content: string; readonly type: "encrypted_content" }; export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem = Schema.Union( [ @@ -15118,6 +15516,12 @@ export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentIt title: "InputImageFunctionCallOutputContentItemType", }), }).annotate({ title: "InputImageFunctionCallOutputContentItem" }), + Schema.Struct({ + audio_url: Schema.String, + type: Schema.Literal("input_audio").annotate({ + title: "InputAudioFunctionCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }), Schema.Struct({ encrypted_content: Schema.String, type: Schema.Literal("encrypted_content").annotate({ @@ -15328,6 +15732,8 @@ export type V2ReviewStartResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ReviewStartResponse__UserInput = Schema.Union( @@ -15352,6 +15758,14 @@ export const V2ReviewStartResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -15587,6 +16001,8 @@ export type V2ThreadForkResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadForkResponse__UserInput = Schema.Union( @@ -15611,6 +16027,14 @@ export const V2ThreadForkResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -15924,6 +16348,8 @@ export type V2ThreadListResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadListResponse__UserInput = Schema.Union( @@ -15948,6 +16374,14 @@ export const V2ThreadListResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16192,6 +16626,8 @@ export type V2ThreadMetadataUpdateResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union( @@ -16220,6 +16656,14 @@ export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16464,6 +16908,8 @@ export type V2ThreadReadResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadReadResponse__UserInput = Schema.Union( @@ -16488,6 +16934,14 @@ export const V2ThreadReadResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -16542,6 +16996,7 @@ export type V2ThreadResumeParams__ContentItem = readonly image_url: string; readonly type: "input_image"; } + | { readonly audio_url: string; readonly type: "input_audio" } | { readonly text: string; readonly type: "output_text" }; export const V2ThreadResumeParams__ContentItem = Schema.Union( [ @@ -16554,6 +17009,10 @@ export const V2ThreadResumeParams__ContentItem = Schema.Union( image_url: Schema.String, type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }), }).annotate({ title: "InputImageContentItem" }), + Schema.Struct({ + audio_url: Schema.String, + type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }), + }).annotate({ title: "InputAudioContentItem" }), Schema.Struct({ text: Schema.String, type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }), @@ -16569,6 +17028,7 @@ export type V2ThreadResumeParams__FunctionCallOutputContentItem = readonly image_url: string; readonly type: "input_image"; } + | { readonly audio_url: string; readonly type: "input_audio" } | { readonly encrypted_content: string; readonly type: "encrypted_content" }; export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( [ @@ -16585,6 +17045,12 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union( title: "InputImageFunctionCallOutputContentItemType", }), }).annotate({ title: "InputImageFunctionCallOutputContentItem" }), + Schema.Struct({ + audio_url: Schema.String, + type: Schema.Literal("input_audio").annotate({ + title: "InputAudioFunctionCallOutputContentItemType", + }), + }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }), Schema.Struct({ encrypted_content: Schema.String, type: Schema.Literal("encrypted_content").annotate({ @@ -16795,6 +17261,8 @@ export type V2ThreadResumeResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadResumeResponse__UserInput = Schema.Union( @@ -16819,6 +17287,14 @@ export const V2ThreadResumeResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17063,6 +17539,8 @@ export type V2ThreadRollbackResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadRollbackResponse__UserInput = Schema.Union( @@ -17091,6 +17569,14 @@ export const V2ThreadRollbackResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17393,6 +17879,8 @@ export type V2ThreadStartedNotification__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadStartedNotification__UserInput = Schema.Union( @@ -17421,6 +17909,14 @@ export const V2ThreadStartedNotification__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17665,6 +18161,8 @@ export type V2ThreadStartResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadStartResponse__UserInput = Schema.Union( @@ -17689,6 +18187,14 @@ export const V2ThreadStartResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -17973,6 +18479,8 @@ export type V2ThreadUnarchiveResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( @@ -18001,6 +18509,14 @@ export const V2ThreadUnarchiveResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18245,6 +18761,8 @@ export type V2TurnCompletedNotification__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnCompletedNotification__UserInput = Schema.Union( @@ -18273,6 +18791,14 @@ export const V2TurnCompletedNotification__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18493,6 +19019,8 @@ export type V2TurnStartedNotification__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnStartedNotification__UserInput = Schema.Union( @@ -18521,6 +19049,14 @@ export const V2TurnStartedNotification__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18607,6 +19143,8 @@ export type V2TurnStartParams__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnStartParams__UserInput = Schema.Union( @@ -18631,6 +19169,14 @@ export const V2TurnStartParams__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18842,6 +19388,8 @@ export type V2TurnStartResponse__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnStartResponse__UserInput = Schema.Union( @@ -18866,6 +19414,14 @@ export const V2TurnStartResponse__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18896,6 +19452,8 @@ export type V2TurnSteerParams__UserInput = readonly path: string; readonly type: "localImage"; } + | { readonly type: "audio"; readonly url: string } + | { readonly path: string; readonly type: "localAudio" } | { readonly name: string; readonly path: string; readonly type: "skill" } | { readonly name: string; readonly path: string; readonly type: "mention" }; export const V2TurnSteerParams__UserInput = Schema.Union( @@ -18920,6 +19478,14 @@ export const V2TurnSteerParams__UserInput = Schema.Union( path: Schema.String, type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }), }).annotate({ title: "LocalImageUserInput" }), + Schema.Struct({ + type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }), + url: Schema.String, + }).annotate({ title: "AudioUserInput" }), + Schema.Struct({ + path: Schema.String, + type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }), + }).annotate({ title: "LocalAudioUserInput" }), Schema.Struct({ name: Schema.String, path: Schema.String, @@ -18947,7 +19513,7 @@ export type ApplyPatchApprovalResponse__ReviewDecision = readonly network_policy_amendment: ApplyPatchApprovalResponse__NetworkPolicyAmendment; }; } - | "denied" + | { readonly denied: { readonly rejection: string } } | "timed_out" | "abort"; export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union( @@ -18977,7 +19543,8 @@ export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union( description: "User chose to persist a network policy rule (allow/deny) for future requests to the same host.", }), - Schema.Literal("denied").annotate({ + Schema.Struct({ denied: Schema.Struct({ rejection: Schema.String }) }).annotate({ + title: "DeniedReviewDecision", description: "User has denied this command and the agent should not execute it, but it should continue the session and try something else.", }), @@ -19285,14 +19852,33 @@ export const ClientRequest__TurnSteerParams = Schema.Struct({ threadId: Schema.String, }); -export type CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = { - readonly access: CommandExecutionRequestApprovalParams__FileSystemAccessMode; - readonly path: CommandExecutionRequestApprovalParams__FileSystemPath; -}; -export const CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({ - access: CommandExecutionRequestApprovalParams__FileSystemAccessMode, - path: CommandExecutionRequestApprovalParams__FileSystemPath, -}); +export type CommandExecutionRequestApprovalParams__FileSystemPath = + | { + readonly path: CommandExecutionRequestApprovalParams__LegacyAppPathString; + readonly type: "path"; + } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { + readonly type: "special"; + readonly value: CommandExecutionRequestApprovalParams__FileSystemSpecialPath; + }; +export const CommandExecutionRequestApprovalParams__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: CommandExecutionRequestApprovalParams__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: CommandExecutionRequestApprovalParams__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); export type CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision = | "accept" @@ -19357,7 +19943,7 @@ export type ExecCommandApprovalResponse__ReviewDecision = readonly network_policy_amendment: ExecCommandApprovalResponse__NetworkPolicyAmendment; }; } - | "denied" + | { readonly denied: { readonly rejection: string } } | "timed_out" | "abort"; export const ExecCommandApprovalResponse__ReviewDecision = Schema.Union( @@ -19387,7 +19973,8 @@ export const ExecCommandApprovalResponse__ReviewDecision = Schema.Union( description: "User chose to persist a network policy rule (allow/deny) for future requests to the same host.", }), - Schema.Literal("denied").annotate({ + Schema.Struct({ denied: Schema.Struct({ rejection: Schema.String }) }).annotate({ + title: "DeniedReviewDecision", description: "User has denied this command and the agent should not execute it, but it should continue the session and try something else.", }), @@ -19480,23 +20067,58 @@ export const McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSc ], ); -export type PermissionsRequestApprovalParams__FileSystemSandboxEntry = { - readonly access: PermissionsRequestApprovalParams__FileSystemAccessMode; - readonly path: PermissionsRequestApprovalParams__FileSystemPath; -}; -export const PermissionsRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({ - access: PermissionsRequestApprovalParams__FileSystemAccessMode, - path: PermissionsRequestApprovalParams__FileSystemPath, -}); +export type PermissionsRequestApprovalParams__FileSystemPath = + | { readonly path: PermissionsRequestApprovalParams__LegacyAppPathString; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { + readonly type: "special"; + readonly value: PermissionsRequestApprovalParams__FileSystemSpecialPath; + }; +export const PermissionsRequestApprovalParams__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: PermissionsRequestApprovalParams__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: PermissionsRequestApprovalParams__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); -export type PermissionsRequestApprovalResponse__FileSystemSandboxEntry = { - readonly access: PermissionsRequestApprovalResponse__FileSystemAccessMode; - readonly path: PermissionsRequestApprovalResponse__FileSystemPath; -}; -export const PermissionsRequestApprovalResponse__FileSystemSandboxEntry = Schema.Struct({ - access: PermissionsRequestApprovalResponse__FileSystemAccessMode, - path: PermissionsRequestApprovalResponse__FileSystemPath, -}); +export type PermissionsRequestApprovalResponse__FileSystemPath = + | { + readonly path: PermissionsRequestApprovalResponse__LegacyAppPathString; + readonly type: "path"; + } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { + readonly type: "special"; + readonly value: PermissionsRequestApprovalResponse__FileSystemSpecialPath; + }; +export const PermissionsRequestApprovalResponse__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: PermissionsRequestApprovalResponse__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: PermissionsRequestApprovalResponse__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); export type ServerNotification__AppInfo = { readonly appMetadata?: ServerNotification__AppMetadata | null; @@ -19629,14 +20251,27 @@ export const ServerNotification__HookRunSummary = Schema.Struct({ statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ServerNotification__FileSystemSandboxEntry = { - readonly access: ServerNotification__FileSystemAccessMode; - readonly path: ServerNotification__FileSystemPath; -}; -export const ServerNotification__FileSystemSandboxEntry = Schema.Struct({ - access: ServerNotification__FileSystemAccessMode, - path: ServerNotification__FileSystemPath, -}); +export type ServerNotification__FileSystemPath = + | { readonly path: ServerNotification__LegacyAppPathString; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: ServerNotification__FileSystemSpecialPath }; +export const ServerNotification__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: ServerNotification__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: ServerNotification__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); export type ServerNotification__TurnError = { readonly additionalDetails?: string | null; @@ -19776,6 +20411,7 @@ export type ServerNotification__ThreadItem = readonly action?: ServerNotification__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -20010,6 +20646,15 @@ export const ServerNotification__ThreadItem = Schema.Union( action: Schema.optionalKey(Schema.Union([ServerNotification__WebSearchAction, Schema.Null])), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -20023,7 +20668,10 @@ export const ServerNotification__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -20131,14 +20779,27 @@ export const ServerNotification__TurnPlanUpdatedNotification = Schema.Struct({ turnId: Schema.String, }); -export type ServerRequest__FileSystemSandboxEntry = { - readonly access: ServerRequest__FileSystemAccessMode; - readonly path: ServerRequest__FileSystemPath; -}; -export const ServerRequest__FileSystemSandboxEntry = Schema.Struct({ - access: ServerRequest__FileSystemAccessMode, - path: ServerRequest__FileSystemPath, -}); +export type ServerRequest__FileSystemPath = + | { readonly path: ServerRequest__LegacyAppPathString; readonly type: "path" } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { readonly type: "special"; readonly value: ServerRequest__FileSystemSpecialPath }; +export const ServerRequest__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: ServerRequest__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: ServerRequest__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); export type ServerRequest__McpElicitationTitledMultiSelectEnumSchema = { readonly default?: ReadonlyArray | null; @@ -20833,6 +21494,7 @@ export type V2ItemCompletedNotification__ThreadItem = readonly action?: V2ItemCompletedNotification__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -21074,6 +21736,15 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -21087,7 +21758,10 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -21122,25 +21796,61 @@ export const V2ItemCompletedNotification__ThreadItem = Schema.Union( { mode: "oneOf" }, ); -export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = { - readonly access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode; - readonly path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath; -}; -export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = - Schema.Struct({ - access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode, - path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath, - }); +export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = + | { + readonly path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString; + readonly type: "path"; + } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { + readonly type: "special"; + readonly value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath; + }; +export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); -export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = { - readonly access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode; - readonly path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath; -}; -export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = - Schema.Struct({ - access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode, - path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath, - }); +export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = + | { + readonly path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString; + readonly type: "path"; + } + | { readonly pattern: string; readonly type: "glob_pattern" } + | { + readonly type: "special"; + readonly value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath; + }; +export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = Schema.Union( + [ + Schema.Struct({ + path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString, + type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }), + }).annotate({ title: "PathFileSystemPath" }), + Schema.Struct({ + pattern: Schema.String, + type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }), + }).annotate({ title: "GlobPatternFileSystemPath" }), + Schema.Struct({ + type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }), + value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath, + }).annotate({ title: "SpecialFileSystemPath" }), + ], + { mode: "oneOf" }, +); export type V2ItemStartedNotification__ThreadItem = | { @@ -21235,6 +21945,7 @@ export type V2ItemStartedNotification__ThreadItem = readonly action?: V2ItemStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -21476,6 +22187,15 @@ export const V2ItemStartedNotification__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -21489,7 +22209,10 @@ export const V2ItemStartedNotification__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -21688,6 +22411,19 @@ export const V2PluginReadResponse__PluginShareContext = Schema.Struct({ shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); +export type V2PluginReadResponse__ScheduledTaskSummary = { + readonly key: string; + readonly name: string; + readonly prompt: string; + readonly schedule: V2PluginReadResponse__ScheduledTaskSchedule; +}; +export const V2PluginReadResponse__ScheduledTaskSummary = Schema.Struct({ + key: Schema.String, + name: Schema.String, + prompt: Schema.String, + schedule: V2PluginReadResponse__ScheduledTaskSchedule, +}); + export type V2PluginShareListResponse__PluginShareContext = { readonly creatorAccountUserId?: string | null; readonly creatorName?: string | null; @@ -21832,6 +22568,7 @@ export type V2ReviewStartResponse__ThreadItem = readonly action?: V2ReviewStartResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -22070,6 +22807,15 @@ export const V2ReviewStartResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -22083,7 +22829,10 @@ export const V2ReviewStartResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -22255,6 +23004,7 @@ export type V2ThreadForkResponse__ThreadItem = readonly action?: V2ThreadForkResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -22493,6 +23243,15 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -22506,7 +23265,10 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -22647,6 +23409,7 @@ export type V2ThreadListResponse__ThreadItem = readonly action?: V2ThreadListResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -22885,6 +23648,15 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -22898,7 +23670,10 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -23041,6 +23816,7 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem = readonly action?: V2ThreadMetadataUpdateResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -23282,6 +24058,15 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -23295,7 +24080,10 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -23436,6 +24224,7 @@ export type V2ThreadReadResponse__ThreadItem = readonly action?: V2ThreadReadResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -23674,6 +24463,15 @@ export const V2ThreadReadResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -23687,7 +24485,10 @@ export const V2ThreadReadResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -23836,6 +24637,7 @@ export type V2ThreadResumeResponse__ThreadItem = readonly action?: V2ThreadResumeResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -24074,6 +24876,15 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -24087,7 +24898,10 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -24228,6 +25042,7 @@ export type V2ThreadRollbackResponse__ThreadItem = readonly action?: V2ThreadRollbackResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -24469,6 +25284,15 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -24482,7 +25306,10 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -24634,6 +25461,7 @@ export type V2ThreadStartedNotification__ThreadItem = readonly action?: V2ThreadStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -24875,6 +25703,15 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -24888,7 +25725,10 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -25029,6 +25869,7 @@ export type V2ThreadStartResponse__ThreadItem = readonly action?: V2ThreadStartResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -25267,6 +26108,15 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -25280,7 +26130,10 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -25421,6 +26274,7 @@ export type V2ThreadUnarchiveResponse__ThreadItem = readonly action?: V2ThreadUnarchiveResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -25662,6 +26516,15 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -25675,7 +26538,10 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -25818,6 +26684,7 @@ export type V2TurnCompletedNotification__ThreadItem = readonly action?: V2TurnCompletedNotification__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -26059,6 +26926,15 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -26072,7 +26948,10 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -26213,6 +27092,7 @@ export type V2TurnStartedNotification__ThreadItem = readonly action?: V2TurnStartedNotification__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -26454,6 +27334,15 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union( ), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -26467,7 +27356,10 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -26608,6 +27500,7 @@ export type V2TurnStartResponse__ThreadItem = readonly action?: V2TurnStartResponse__WebSearchAction | null; readonly id: string; readonly query: string; + readonly results?: ReadonlyArray | null; readonly type: "webSearch"; } | { @@ -26842,6 +27735,15 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( action: Schema.optionalKey(Schema.Union([V2TurnStartResponse__WebSearchAction, Schema.Null])), id: Schema.String, query: Schema.String, + results: Schema.optionalKey( + Schema.Union([ + Schema.Array(Schema.Unknown).annotate({ + description: + "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + }), + Schema.Null, + ]), + ), type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }), }).annotate({ title: "WebSearchThreadItem" }), Schema.Struct({ @@ -26855,7 +27757,10 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( .check(Schema.isGreaterThanOrEqualTo(0)), id: Schema.String, type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }), - }).annotate({ title: "SleepThreadItem" }), + }).annotate({ + title: "SleepThreadItem", + description: "Display item emitted by the interruptible `clock.sleep` tool.", + }), Schema.Struct({ id: Schema.String, result: Schema.String, @@ -26892,60 +27797,38 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union( export type ClientRequest__ExternalAgentConfigImportParams = { readonly migrationItems: ReadonlyArray; + readonly migrationSource?: string | null; readonly source?: string | null; }; export const ClientRequest__ExternalAgentConfigImportParams = Schema.Struct({ migrationItems: Schema.Array(ClientRequest__ExternalAgentConfigMigrationItem), + migrationSource: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.", + }), + Schema.Null, + ]), + ), source: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ - description: "Source product that produced the migration items. Missing means unspecified.", + description: "Optional identifier for the product that initiated the import.", }), Schema.Null, ]), ), }); -export type CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = { + readonly access: CommandExecutionRequestApprovalParams__FileSystemAccessMode; + readonly path: CommandExecutionRequestApprovalParams__FileSystemPath; }; -export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct( - { - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - }, -); +export const CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({ + access: CommandExecutionRequestApprovalParams__FileSystemAccessMode, + path: CommandExecutionRequestApprovalParams__FileSystemPath, +}); export type McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema = | McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema @@ -26955,82 +27838,22 @@ export const McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSch McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema, ]); -export type PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type PermissionsRequestApprovalParams__FileSystemSandboxEntry = { + readonly access: PermissionsRequestApprovalParams__FileSystemAccessMode; + readonly path: PermissionsRequestApprovalParams__FileSystemPath; }; -export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalParams__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), +export const PermissionsRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({ + access: PermissionsRequestApprovalParams__FileSystemAccessMode, + path: PermissionsRequestApprovalParams__FileSystemPath, }); -export type PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type PermissionsRequestApprovalResponse__FileSystemSandboxEntry = { + readonly access: PermissionsRequestApprovalResponse__FileSystemAccessMode; + readonly path: PermissionsRequestApprovalResponse__FileSystemPath; }; -export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalResponse__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), +export const PermissionsRequestApprovalResponse__FileSystemSandboxEntry = Schema.Struct({ + access: PermissionsRequestApprovalResponse__FileSystemAccessMode, + path: PermissionsRequestApprovalResponse__FileSystemPath, }); export type ServerNotification__AppListUpdatedNotification = { @@ -27080,40 +27903,13 @@ export const ServerNotification__HookStartedNotification = Schema.Struct({ turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), }); -export type ServerNotification__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type ServerNotification__FileSystemSandboxEntry = { + readonly access: ServerNotification__FileSystemAccessMode; + readonly path: ServerNotification__FileSystemPath; }; -export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([Schema.Array(ServerNotification__FileSystemSandboxEntry), Schema.Null]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerNotification__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerNotification__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), +export const ServerNotification__FileSystemSandboxEntry = Schema.Struct({ + access: ServerNotification__FileSystemAccessMode, + path: ServerNotification__FileSystemPath, }); export type ServerNotification__ErrorNotification = { @@ -27250,40 +28046,13 @@ export const ServerNotification__Turn = Schema.Struct({ status: ServerNotification__TurnStatus, }); -export type ServerRequest__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type ServerRequest__FileSystemSandboxEntry = { + readonly access: ServerRequest__FileSystemAccessMode; + readonly path: ServerRequest__FileSystemPath; }; -export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([Schema.Array(ServerRequest__FileSystemSandboxEntry), Schema.Null]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerRequest__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(ServerRequest__LegacyAppPathString).annotate({ - description: "This will be removed in favor of `entries`.", - }), - Schema.Null, - ]), - ), +export const ServerRequest__FileSystemSandboxEntry = Schema.Struct({ + access: ServerRequest__FileSystemAccessMode, + path: ServerRequest__FileSystemPath, }); export type ServerRequest__McpElicitationMultiSelectEnumSchema = @@ -27451,84 +28220,24 @@ export const V2ConfigWriteResponse__OverriddenMetadata = Schema.Struct({ overridingLayer: V2ConfigWriteResponse__ConfigLayerMetadata, }); -export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = { + readonly access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode; + readonly path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath; }; -export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = +export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array( - V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - ).annotate({ description: "This will be removed in favor of `entries`." }), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array( - V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, - ).annotate({ description: "This will be removed in favor of `entries`." }), - Schema.Null, - ]), - ), + access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode, + path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath, }); -export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = { - readonly entries?: ReadonlyArray | null; - readonly globScanMaxDepth?: number | null; - readonly read?: ReadonlyArray | null; - readonly write?: ReadonlyArray | null; +export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = { + readonly access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode; + readonly path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath; }; -export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = +export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = Schema.Struct({ - entries: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry), - Schema.Null, - ]), - ), - globScanMaxDepth: Schema.optionalKey( - Schema.Union([ - Schema.Number.annotate({ format: "uint" }) - .check(Schema.isInt()) - .check(Schema.isGreaterThanOrEqualTo(1)), - Schema.Null, - ]), - ), - read: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate( - { description: "This will be removed in favor of `entries`." }, - ), - Schema.Null, - ]), - ), - write: Schema.optionalKey( - Schema.Union([ - Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate( - { description: "This will be removed in favor of `entries`." }, - ), - Schema.Null, - ]), - ), + access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode, + path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath, }); export type V2PluginInstalledResponse__PluginSummary = { @@ -27542,6 +28251,7 @@ export type V2PluginInstalledResponse__PluginSummary = { readonly interface?: V2PluginInstalledResponse__PluginInterface | null; readonly keywords?: ReadonlyArray; readonly localVersion?: string | null; + readonly mustShowInstallationInterstitial?: boolean | null; readonly name: string; readonly remotePluginId?: string | null; readonly shareContext?: V2PluginInstalledResponse__PluginShareContext | null; @@ -27575,6 +28285,7 @@ export const V2PluginInstalledResponse__PluginSummary = Schema.Struct({ Schema.Null, ]), ), + mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), name: Schema.String, remotePluginId: Schema.optionalKey( Schema.Union([ @@ -27609,6 +28320,7 @@ export type V2PluginListResponse__PluginSummary = { readonly interface?: V2PluginListResponse__PluginInterface | null; readonly keywords?: ReadonlyArray; readonly localVersion?: string | null; + readonly mustShowInstallationInterstitial?: boolean | null; readonly name: string; readonly remotePluginId?: string | null; readonly shareContext?: V2PluginListResponse__PluginShareContext | null; @@ -27640,6 +28352,7 @@ export const V2PluginListResponse__PluginSummary = Schema.Struct({ Schema.Null, ]), ), + mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), name: Schema.String, remotePluginId: Schema.optionalKey( Schema.Union([ @@ -27674,6 +28387,7 @@ export type V2PluginReadResponse__PluginSummary = { readonly interface?: V2PluginReadResponse__PluginInterface | null; readonly keywords?: ReadonlyArray; readonly localVersion?: string | null; + readonly mustShowInstallationInterstitial?: boolean | null; readonly name: string; readonly remotePluginId?: string | null; readonly shareContext?: V2PluginReadResponse__PluginShareContext | null; @@ -27705,6 +28419,7 @@ export const V2PluginReadResponse__PluginSummary = Schema.Struct({ Schema.Null, ]), ), + mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), name: Schema.String, remotePluginId: Schema.optionalKey( Schema.Union([ @@ -27739,6 +28454,7 @@ export type V2PluginShareListResponse__PluginSummary = { readonly interface?: V2PluginShareListResponse__PluginInterface | null; readonly keywords?: ReadonlyArray; readonly localVersion?: string | null; + readonly mustShowInstallationInterstitial?: boolean | null; readonly name: string; readonly remotePluginId?: string | null; readonly shareContext?: V2PluginShareListResponse__PluginShareContext | null; @@ -27772,6 +28488,7 @@ export const V2PluginShareListResponse__PluginSummary = Schema.Struct({ Schema.Null, ]), ), + mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])), name: Schema.String, remotePluginId: Schema.optionalKey( Schema.Union([ @@ -28946,6 +29663,47 @@ export const V2TurnStartResponse__Turn = Schema.Struct({ status: V2TurnStartResponse__TurnStatus, }); +export type CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; +}; +export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct( + { + entries: Schema.optionalKey( + Schema.Union([ + Schema.Array(CommandExecutionRequestApprovalParams__FileSystemSandboxEntry), + Schema.Null, + ]), + ), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), + ), + }, +); + export type McpServerElicitationRequestParams__McpElicitationEnumSchema = | McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema | McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema @@ -28956,45 +29714,117 @@ export const McpServerElicitationRequestParams__McpElicitationEnumSchema = Schem McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema, ]); -export type PermissionsRequestApprovalParams__RequestPermissionProfile = { - readonly fileSystem?: PermissionsRequestApprovalParams__AdditionalFileSystemPermissions | null; - readonly network?: PermissionsRequestApprovalParams__AdditionalNetworkPermissions | null; +export type PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; }; -export const PermissionsRequestApprovalParams__RequestPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null]), +export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct({ + entries: Schema.optionalKey( + Schema.Union([ + Schema.Array(PermissionsRequestApprovalParams__FileSystemSandboxEntry), + Schema.Null, + ]), ), - network: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); -export type PermissionsRequestApprovalResponse__GrantedPermissionProfile = { - readonly fileSystem?: PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions | null; - readonly network?: PermissionsRequestApprovalResponse__AdditionalNetworkPermissions | null; +export type PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; }; -export const PermissionsRequestApprovalResponse__GrantedPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( +export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = Schema.Struct({ + entries: Schema.optionalKey( Schema.Union([ - PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions, + Schema.Array(PermissionsRequestApprovalResponse__FileSystemSandboxEntry), Schema.Null, ]), ), - network: Schema.optionalKey( - Schema.Union([PermissionsRequestApprovalResponse__AdditionalNetworkPermissions, Schema.Null]), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); -export type ServerNotification__RequestPermissionProfile = { - readonly fileSystem?: ServerNotification__AdditionalFileSystemPermissions | null; - readonly network?: ServerNotification__AdditionalNetworkPermissions | null; +export type ServerNotification__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; }; -export const ServerNotification__RequestPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ServerNotification__AdditionalFileSystemPermissions, Schema.Null]), +export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct({ + entries: Schema.optionalKey( + Schema.Union([Schema.Array(ServerNotification__FileSystemSandboxEntry), Schema.Null]), ), - network: Schema.optionalKey( - Schema.Union([ServerNotification__AdditionalNetworkPermissions, Schema.Null]), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(ServerNotification__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(ServerNotification__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); @@ -29194,16 +30024,39 @@ export const ServerNotification__TurnStartedNotification = Schema.Struct({ turn: ServerNotification__Turn, }); -export type ServerRequest__RequestPermissionProfile = { - readonly fileSystem?: ServerRequest__AdditionalFileSystemPermissions | null; - readonly network?: ServerRequest__AdditionalNetworkPermissions | null; +export type ServerRequest__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; }; -export const ServerRequest__RequestPermissionProfile = Schema.Struct({ - fileSystem: Schema.optionalKey( - Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]), +export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({ + entries: Schema.optionalKey( + Schema.Union([Schema.Array(ServerRequest__FileSystemSandboxEntry), Schema.Null]), ), - network: Schema.optionalKey( - Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]), + globScanMaxDepth: Schema.optionalKey( + Schema.Union([ + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(ServerRequest__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(ServerRequest__LegacyAppPathString).annotate({ + description: "This will be removed in favor of `entries`.", + }), + Schema.Null, + ]), ), }); @@ -29217,41 +30070,81 @@ export const ServerRequest__McpElicitationEnumSchema = Schema.Union([ ServerRequest__McpElicitationLegacyTitledEnumSchema, ]); -export type V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = { - readonly fileSystem?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions | null; - readonly network?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions | null; +export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; }; -export const V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = +export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = Schema.Struct({ - fileSystem: Schema.optionalKey( + entries: Schema.optionalKey( Schema.Union([ - V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions, + Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry), Schema.Null, ]), ), - network: Schema.optionalKey( + globScanMaxDepth: Schema.optionalKey( Schema.Union([ - V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions, + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array( + V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, + ).annotate({ description: "This will be removed in favor of `entries`." }), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array( + V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString, + ).annotate({ description: "This will be removed in favor of `entries`." }), Schema.Null, ]), ), }); -export type V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = { - readonly fileSystem?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions | null; - readonly network?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions | null; +export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = { + readonly entries?: ReadonlyArray | null; + readonly globScanMaxDepth?: number | null; + readonly read?: ReadonlyArray | null; + readonly write?: ReadonlyArray | null; }; -export const V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = +export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = Schema.Struct({ - fileSystem: Schema.optionalKey( + entries: Schema.optionalKey( Schema.Union([ - V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions, + Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry), Schema.Null, ]), ), - network: Schema.optionalKey( + globScanMaxDepth: Schema.optionalKey( Schema.Union([ - V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions, + Schema.Number.annotate({ format: "uint" }) + .check(Schema.isInt()) + .check(Schema.isGreaterThanOrEqualTo(1)), + Schema.Null, + ]), + ), + read: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate( + { description: "This will be removed in favor of `entries`." }, + ), + Schema.Null, + ]), + ), + write: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate( + { description: "This will be removed in favor of `entries`." }, + ), Schema.Null, ]), ), @@ -29305,6 +30198,7 @@ export type V2PluginReadResponse__PluginDetail = { readonly marketplaceName: string; readonly marketplacePath?: V2PluginReadResponse__AbsolutePathBuf | null; readonly mcpServers: ReadonlyArray; + readonly scheduledTasks?: ReadonlyArray | null; readonly shareUrl?: string | null; readonly skills: ReadonlyArray; readonly summary: V2PluginReadResponse__PluginSummary; @@ -29319,6 +30213,9 @@ export const V2PluginReadResponse__PluginDetail = Schema.Struct({ Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]), ), mcpServers: Schema.Array(Schema.String), + scheduledTasks: Schema.optionalKey( + Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskSummary), Schema.Null]), + ), shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), skills: Schema.Array(V2PluginReadResponse__SkillSummary), summary: V2PluginReadResponse__PluginSummary, @@ -30699,6 +31596,141 @@ export const McpServerElicitationRequestParams__McpElicitationPrimitiveSchema = McpServerElicitationRequestParams__McpElicitationBooleanSchema, ]); +export type PermissionsRequestApprovalParams__RequestPermissionProfile = { + readonly fileSystem?: PermissionsRequestApprovalParams__AdditionalFileSystemPermissions | null; + readonly network?: PermissionsRequestApprovalParams__AdditionalNetworkPermissions | null; +}; +export const PermissionsRequestApprovalParams__RequestPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null]), + ), + network: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]), + ), +}); + +export type PermissionsRequestApprovalResponse__GrantedPermissionProfile = { + readonly fileSystem?: PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions | null; + readonly network?: PermissionsRequestApprovalResponse__AdditionalNetworkPermissions | null; +}; +export const PermissionsRequestApprovalResponse__GrantedPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ + PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions, + Schema.Null, + ]), + ), + network: Schema.optionalKey( + Schema.Union([PermissionsRequestApprovalResponse__AdditionalNetworkPermissions, Schema.Null]), + ), +}); + +export type ServerNotification__RequestPermissionProfile = { + readonly fileSystem?: ServerNotification__AdditionalFileSystemPermissions | null; + readonly network?: ServerNotification__AdditionalNetworkPermissions | null; +}; +export const ServerNotification__RequestPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ServerNotification__AdditionalFileSystemPermissions, Schema.Null]), + ), + network: Schema.optionalKey( + Schema.Union([ServerNotification__AdditionalNetworkPermissions, Schema.Null]), + ), +}); + +export type ServerNotification__ThreadStartedNotification = { + readonly thread: ServerNotification__Thread; +}; +export const ServerNotification__ThreadStartedNotification = Schema.Struct({ + thread: ServerNotification__Thread, +}); + +export type ServerRequest__RequestPermissionProfile = { + readonly fileSystem?: ServerRequest__AdditionalFileSystemPermissions | null; + readonly network?: ServerRequest__AdditionalNetworkPermissions | null; +}; +export const ServerRequest__RequestPermissionProfile = Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]), + ), + network: Schema.optionalKey( + Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]), + ), +}); + +export type ServerRequest__McpElicitationPrimitiveSchema = + | ServerRequest__McpElicitationEnumSchema + | ServerRequest__McpElicitationStringSchema + | ServerRequest__McpElicitationNumberSchema + | ServerRequest__McpElicitationBooleanSchema; +export const ServerRequest__McpElicitationPrimitiveSchema = Schema.Union([ + ServerRequest__McpElicitationEnumSchema, + ServerRequest__McpElicitationStringSchema, + ServerRequest__McpElicitationNumberSchema, + ServerRequest__McpElicitationBooleanSchema, +]); + +export type V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = { + readonly fileSystem?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions | null; + readonly network?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions | null; +}; +export const V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = + Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions, + Schema.Null, + ]), + ), + network: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions, + Schema.Null, + ]), + ), + }); + +export type V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = { + readonly fileSystem?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions | null; + readonly network?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions | null; +}; +export const V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = + Schema.Struct({ + fileSystem: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions, + Schema.Null, + ]), + ), + network: Schema.optionalKey( + Schema.Union([ + V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions, + Schema.Null, + ]), + ), + }); + +export type McpServerElicitationRequestParams__McpElicitationSchema = { + readonly $schema?: string | null; + readonly properties: { + readonly [x: string]: McpServerElicitationRequestParams__McpElicitationPrimitiveSchema; + }; + readonly required?: ReadonlyArray | null; + readonly type: McpServerElicitationRequestParams__McpElicitationObjectType; +}; +export const McpServerElicitationRequestParams__McpElicitationSchema = Schema.Struct({ + $schema: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + properties: Schema.Record( + Schema.String, + McpServerElicitationRequestParams__McpElicitationPrimitiveSchema, + ), + required: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), + type: McpServerElicitationRequestParams__McpElicitationObjectType, +}).annotate({ + description: + "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.", +}); + export type ServerNotification__GuardianApprovalReviewAction = | { readonly command: string; @@ -30794,13 +31826,6 @@ export const ServerNotification__GuardianApprovalReviewAction = Schema.Union( { mode: "oneOf" }, ); -export type ServerNotification__ThreadStartedNotification = { - readonly thread: ServerNotification__Thread; -}; -export const ServerNotification__ThreadStartedNotification = Schema.Struct({ - thread: ServerNotification__Thread, -}); - export type ServerRequest__PermissionsRequestApprovalParams = { readonly cwd: ServerRequest__AbsolutePathBuf; readonly environmentId?: string | null; @@ -30825,17 +31850,21 @@ export const ServerRequest__PermissionsRequestApprovalParams = Schema.Struct({ turnId: Schema.String, }); -export type ServerRequest__McpElicitationPrimitiveSchema = - | ServerRequest__McpElicitationEnumSchema - | ServerRequest__McpElicitationStringSchema - | ServerRequest__McpElicitationNumberSchema - | ServerRequest__McpElicitationBooleanSchema; -export const ServerRequest__McpElicitationPrimitiveSchema = Schema.Union([ - ServerRequest__McpElicitationEnumSchema, - ServerRequest__McpElicitationStringSchema, - ServerRequest__McpElicitationNumberSchema, - ServerRequest__McpElicitationBooleanSchema, -]); +export type ServerRequest__McpElicitationSchema = { + readonly $schema?: string | null; + readonly properties: { readonly [x: string]: ServerRequest__McpElicitationPrimitiveSchema }; + readonly required?: ReadonlyArray | null; + readonly type: ServerRequest__McpElicitationObjectType; +}; +export const ServerRequest__McpElicitationSchema = Schema.Struct({ + $schema: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), + properties: Schema.Record(Schema.String, ServerRequest__McpElicitationPrimitiveSchema), + required: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), + type: ServerRequest__McpElicitationObjectType, +}).annotate({ + description: + "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.", +}); export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction = | { @@ -31033,27 +32062,6 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRe { mode: "oneOf" }, ); -export type McpServerElicitationRequestParams__McpElicitationSchema = { - readonly $schema?: string | null; - readonly properties: { - readonly [x: string]: McpServerElicitationRequestParams__McpElicitationPrimitiveSchema; - }; - readonly required?: ReadonlyArray | null; - readonly type: McpServerElicitationRequestParams__McpElicitationObjectType; -}; -export const McpServerElicitationRequestParams__McpElicitationSchema = Schema.Struct({ - $schema: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - properties: Schema.Record( - Schema.String, - McpServerElicitationRequestParams__McpElicitationPrimitiveSchema, - ), - required: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), - type: McpServerElicitationRequestParams__McpElicitationObjectType, -}).annotate({ - description: - "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.", -}); - export type ServerNotification__ItemGuardianApprovalReviewCompletedNotification = { readonly action: ServerNotification__GuardianApprovalReviewAction; readonly completedAtMs: number; @@ -31127,22 +32135,6 @@ export const ServerNotification__ItemGuardianApprovalReviewStartedNotification = "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", }); -export type ServerRequest__McpElicitationSchema = { - readonly $schema?: string | null; - readonly properties: { readonly [x: string]: ServerRequest__McpElicitationPrimitiveSchema }; - readonly required?: ReadonlyArray | null; - readonly type: ServerRequest__McpElicitationObjectType; -}; -export const ServerRequest__McpElicitationSchema = Schema.Struct({ - $schema: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), - properties: Schema.Record(Schema.String, ServerRequest__McpElicitationPrimitiveSchema), - required: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])), - type: ServerRequest__McpElicitationObjectType, -}).annotate({ - description: - "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.", -}); - export type ServerRequest__McpServerElicitationRequestParams = | { readonly _meta?: unknown; @@ -31499,11 +32491,21 @@ export type ClientRequest = readonly method: "plugin/share/delete"; readonly params: ClientRequest__PluginShareDeleteParams; } + | { + readonly id: ClientRequest__RequestId; + readonly method: "app/read"; + readonly params: ClientRequest__AppsReadParams; + } | { readonly id: ClientRequest__RequestId; readonly method: "app/list"; readonly params: ClientRequest__AppsListParams; } + | { + readonly id: ClientRequest__RequestId; + readonly method: "app/installed"; + readonly params: ClientRequest__AppsInstalledParams; + } | { readonly id: ClientRequest__RequestId; readonly method: "fs/readFile"; @@ -31978,11 +32980,21 @@ export const ClientRequest = Schema.Union( }), params: ClientRequest__PluginShareDeleteParams, }).annotate({ title: "Plugin/share/deleteRequest" }), + Schema.Struct({ + id: ClientRequest__RequestId, + method: Schema.Literal("app/read").annotate({ title: "App/readRequestMethod" }), + params: ClientRequest__AppsReadParams, + }).annotate({ title: "App/readRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("app/list").annotate({ title: "App/listRequestMethod" }), params: ClientRequest__AppsListParams, }).annotate({ title: "App/listRequest" }), + Schema.Struct({ + id: ClientRequest__RequestId, + method: Schema.Literal("app/installed").annotate({ title: "App/installedRequestMethod" }), + params: ClientRequest__AppsInstalledParams, + }).annotate({ title: "App/installedRequest" }), Schema.Struct({ id: ClientRequest__RequestId, method: Schema.Literal("fs/readFile").annotate({ title: "Fs/readFileRequestMethod" }), @@ -32354,6 +33366,13 @@ export const ClientRequest__CapabilityRootLocation = Schema.Union( { mode: "oneOf" }, ).annotate({ description: "Location used to resolve a selected capability root." }); +export type ClientRequest__CodexResponseHandoffMode = "thinking" | "commentary" | "bemTags"; +export const ClientRequest__CodexResponseHandoffMode = Schema.Literals([ + "thinking", + "commentary", + "bemTags", +]); + export type ClientRequest__CollaborationMode = { readonly mode: ClientRequest__ModeKind; readonly settings: ClientRequest__Settings; @@ -32363,13 +33382,6 @@ export const ClientRequest__CollaborationMode = Schema.Struct({ settings: ClientRequest__Settings, }).annotate({ description: "Collaboration mode for a Codex session." }); -export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant"; -export const ClientRequest__ConversationTextRole = Schema.Literals([ - "user", - "developer", - "assistant", -]); - export type ClientRequest__DynamicToolSpec = | { readonly deferLoading?: boolean; @@ -32437,8 +33449,8 @@ export const ClientRequest__ProcessTerminalSize = Schema.Struct({ .check(Schema.isGreaterThanOrEqualTo(0)), }).annotate({ description: "PTY size in character cells for `process/spawn` PTY sessions." }); -export type ClientRequest__RealtimeConversationVersion = "v1" | "v2"; -export const ClientRequest__RealtimeConversationVersion = Schema.Literals(["v1", "v2"]); +export type ClientRequest__RealtimeConversationVersion = "v1" | "v2" | "v3"; +export const ClientRequest__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]); export type ClientRequest__RealtimeOutputModality = "text" | "audio"; export const ClientRequest__RealtimeOutputModality = Schema.Literals(["text", "audio"]); @@ -32859,6 +33871,17 @@ export const ClientRequest__ThreadRealtimeAudioChunk = Schema.Struct({ ), }).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." }); +export type ClientRequest__ThreadRealtimeInitialItem = { + readonly role: ClientRequest__ConversationTextRole; + readonly text: string; +}; +export const ClientRequest__ThreadRealtimeInitialItem = Schema.Struct({ + role: ClientRequest__ConversationTextRole, + text: Schema.String, +}).annotate({ + description: "EXPERIMENTAL - role-bearing text item included when a realtime V3 session starts.", +}); + export type ClientRequest__ThreadRealtimeStartTransport = | { readonly type: "websocket" } | { readonly sdp: string; readonly type: "webrtc" }; @@ -32909,10 +33932,19 @@ export const ClientRequest__ThreadResumeInitialTurnsPageParams = Schema.Struct({ export type ClientRequest__TurnEnvironmentParams = { readonly cwd: ClientRequest__LegacyAppPathString; readonly environmentId: string; + readonly runtimeWorkspaceRoots?: ReadonlyArray | null; }; export const ClientRequest__TurnEnvironmentParams = Schema.Struct({ cwd: ClientRequest__LegacyAppPathString, environmentId: Schema.String, + runtimeWorkspaceRoots: Schema.optionalKey( + Schema.Union([ + Schema.Array(ClientRequest__LegacyAppPathString).annotate({ + description: "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", + }), + Schema.Null, + ]), + ), }); export type CommandExecutionRequestApprovalParams = { @@ -33499,697 +34531,1469 @@ export const RequestId = Schema.Union([ ]).annotate({ title: "RequestId" }); export type ServerNotification = - | { readonly method: "error"; readonly params: ServerNotification__ErrorNotification } + | { + readonly method: "error"; + readonly params: ServerNotification__ErrorNotification; + readonly emittedAtMs?: number; + } | { readonly method: "thread/started"; readonly params: ServerNotification__ThreadStartedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/status/changed"; readonly params: ServerNotification__ThreadStatusChangedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/archived"; readonly params: ServerNotification__ThreadArchivedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/deleted"; readonly params: ServerNotification__ThreadDeletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/unarchived"; readonly params: ServerNotification__ThreadUnarchivedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/closed"; readonly params: ServerNotification__ThreadClosedNotification; + readonly emittedAtMs?: number; } | { readonly method: "skills/changed"; readonly params: ServerNotification__SkillsChangedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/name/updated"; readonly params: ServerNotification__ThreadNameUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/goal/updated"; readonly params: ServerNotification__ThreadGoalUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/goal/cleared"; readonly params: ServerNotification__ThreadGoalClearedNotification; + readonly emittedAtMs?: number; + } + | { + readonly method: "thread/environment/connected"; + readonly params: ServerNotification__EnvironmentConnectionNotification; + readonly emittedAtMs?: number; + } + | { + readonly method: "thread/environment/disconnected"; + readonly params: ServerNotification__EnvironmentConnectionNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/settings/updated"; readonly params: ServerNotification__ThreadSettingsUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/tokenUsage/updated"; readonly params: ServerNotification__ThreadTokenUsageUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "turn/started"; readonly params: ServerNotification__TurnStartedNotification; + readonly emittedAtMs?: number; } | { readonly method: "hook/started"; readonly params: ServerNotification__HookStartedNotification; + readonly emittedAtMs?: number; } | { readonly method: "turn/completed"; readonly params: ServerNotification__TurnCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "hook/completed"; readonly params: ServerNotification__HookCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "turn/diff/updated"; readonly params: ServerNotification__TurnDiffUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "turn/plan/updated"; readonly params: ServerNotification__TurnPlanUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/started"; readonly params: ServerNotification__ItemStartedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/autoApprovalReview/started"; readonly params: ServerNotification__ItemGuardianApprovalReviewStartedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/autoApprovalReview/completed"; readonly params: ServerNotification__ItemGuardianApprovalReviewCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/completed"; readonly params: ServerNotification__ItemCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/agentMessage/delta"; readonly params: ServerNotification__AgentMessageDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/plan/delta"; readonly params: ServerNotification__PlanDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "command/exec/outputDelta"; readonly params: ServerNotification__CommandExecOutputDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "process/outputDelta"; readonly params: ServerNotification__ProcessOutputDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "process/exited"; readonly params: ServerNotification__ProcessExitedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/commandExecution/outputDelta"; readonly params: ServerNotification__CommandExecutionOutputDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/commandExecution/terminalInteraction"; readonly params: ServerNotification__TerminalInteractionNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/fileChange/outputDelta"; readonly params: ServerNotification__FileChangeOutputDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/fileChange/patchUpdated"; readonly params: ServerNotification__FileChangePatchUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "serverRequest/resolved"; readonly params: ServerNotification__ServerRequestResolvedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/mcpToolCall/progress"; readonly params: ServerNotification__McpToolCallProgressNotification; + readonly emittedAtMs?: number; } | { readonly method: "mcpServer/oauthLogin/completed"; readonly params: ServerNotification__McpServerOauthLoginCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "mcpServer/startupStatus/updated"; readonly params: ServerNotification__McpServerStatusUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "account/updated"; readonly params: ServerNotification__AccountUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "account/rateLimits/updated"; readonly params: ServerNotification__AccountRateLimitsUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "app/list/updated"; readonly params: ServerNotification__AppListUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "remoteControl/status/changed"; readonly params: ServerNotification__RemoteControlStatusChangedNotification; + readonly emittedAtMs?: number; } | { readonly method: "externalAgentConfig/import/progress"; readonly params: ServerNotification__ExternalAgentConfigImportProgressNotification; + readonly emittedAtMs?: number; } | { readonly method: "externalAgentConfig/import/completed"; readonly params: ServerNotification__ExternalAgentConfigImportCompletedNotification; + readonly emittedAtMs?: number; + } + | { + readonly method: "fs/changed"; + readonly params: ServerNotification__FsChangedNotification; + readonly emittedAtMs?: number; } - | { readonly method: "fs/changed"; readonly params: ServerNotification__FsChangedNotification } | { readonly method: "item/reasoning/summaryTextDelta"; readonly params: ServerNotification__ReasoningSummaryTextDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/reasoning/summaryPartAdded"; readonly params: ServerNotification__ReasoningSummaryPartAddedNotification; + readonly emittedAtMs?: number; } | { readonly method: "item/reasoning/textDelta"; readonly params: ServerNotification__ReasoningTextDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/compacted"; readonly params: ServerNotification__ContextCompactedNotification; + readonly emittedAtMs?: number; } | { readonly method: "model/rerouted"; readonly params: ServerNotification__ModelReroutedNotification; + readonly emittedAtMs?: number; } | { readonly method: "model/verification"; readonly params: ServerNotification__ModelVerificationNotification; + readonly emittedAtMs?: number; } | { readonly method: "turn/moderationMetadata"; readonly params: ServerNotification__TurnModerationMetadataNotification; + readonly emittedAtMs?: number; } | { readonly method: "model/safetyBuffering/updated"; readonly params: ServerNotification__ModelSafetyBufferingUpdatedNotification; + readonly emittedAtMs?: number; + } + | { + readonly method: "warning"; + readonly params: ServerNotification__WarningNotification; + readonly emittedAtMs?: number; } - | { readonly method: "warning"; readonly params: ServerNotification__WarningNotification } | { readonly method: "guardianWarning"; readonly params: ServerNotification__GuardianWarningNotification; + readonly emittedAtMs?: number; } | { readonly method: "deprecationNotice"; readonly params: ServerNotification__DeprecationNoticeNotification; + readonly emittedAtMs?: number; } | { readonly method: "configWarning"; readonly params: ServerNotification__ConfigWarningNotification; + readonly emittedAtMs?: number; } | { readonly method: "fuzzyFileSearch/sessionUpdated"; readonly params: ServerNotification__FuzzyFileSearchSessionUpdatedNotification; + readonly emittedAtMs?: number; } | { readonly method: "fuzzyFileSearch/sessionCompleted"; readonly params: ServerNotification__FuzzyFileSearchSessionCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/started"; readonly params: ServerNotification__ThreadRealtimeStartedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/itemAdded"; readonly params: ServerNotification__ThreadRealtimeItemAddedNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/transcript/delta"; readonly params: ServerNotification__ThreadRealtimeTranscriptDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/transcript/done"; readonly params: ServerNotification__ThreadRealtimeTranscriptDoneNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/outputAudio/delta"; readonly params: ServerNotification__ThreadRealtimeOutputAudioDeltaNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/sdp"; readonly params: ServerNotification__ThreadRealtimeSdpNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/error"; readonly params: ServerNotification__ThreadRealtimeErrorNotification; + readonly emittedAtMs?: number; } | { readonly method: "thread/realtime/closed"; readonly params: ServerNotification__ThreadRealtimeClosedNotification; + readonly emittedAtMs?: number; } | { readonly method: "windows/worldWritableWarning"; readonly params: ServerNotification__WindowsWorldWritableWarningNotification; + readonly emittedAtMs?: number; } | { readonly method: "windowsSandbox/setupCompleted"; readonly params: ServerNotification__WindowsSandboxSetupCompletedNotification; + readonly emittedAtMs?: number; } | { readonly method: "account/login/completed"; readonly params: ServerNotification__AccountLoginCompletedNotification; + readonly emittedAtMs?: number; }; export const ServerNotification = Schema.Union( [ Schema.Struct({ method: Schema.Literal("error").annotate({ title: "ErrorNotificationMethod" }), params: ServerNotification__ErrorNotification, - }).annotate({ title: "ErrorNotification", description: "NEW NOTIFICATIONS" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/started").annotate({ title: "Thread/startedNotificationMethod", }), params: ServerNotification__ThreadStartedNotification, - }).annotate({ title: "Thread/startedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/status/changed").annotate({ title: "Thread/status/changedNotificationMethod", }), params: ServerNotification__ThreadStatusChangedNotification, - }).annotate({ title: "Thread/status/changedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/archived").annotate({ title: "Thread/archivedNotificationMethod", }), params: ServerNotification__ThreadArchivedNotification, - }).annotate({ title: "Thread/archivedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/deleted").annotate({ title: "Thread/deletedNotificationMethod", }), params: ServerNotification__ThreadDeletedNotification, - }).annotate({ title: "Thread/deletedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/unarchived").annotate({ title: "Thread/unarchivedNotificationMethod", }), params: ServerNotification__ThreadUnarchivedNotification, - }).annotate({ title: "Thread/unarchivedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/closed").annotate({ title: "Thread/closedNotificationMethod", }), params: ServerNotification__ThreadClosedNotification, - }).annotate({ title: "Thread/closedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("skills/changed").annotate({ title: "Skills/changedNotificationMethod", }), params: ServerNotification__SkillsChangedNotification, - }).annotate({ title: "Skills/changedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/name/updated").annotate({ title: "Thread/name/updatedNotificationMethod", }), params: ServerNotification__ThreadNameUpdatedNotification, - }).annotate({ title: "Thread/name/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/goal/updated").annotate({ title: "Thread/goal/updatedNotificationMethod", }), params: ServerNotification__ThreadGoalUpdatedNotification, - }).annotate({ title: "Thread/goal/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/goal/cleared").annotate({ title: "Thread/goal/clearedNotificationMethod", }), params: ServerNotification__ThreadGoalClearedNotification, - }).annotate({ title: "Thread/goal/clearedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), + Schema.Struct({ + method: Schema.Literal("thread/environment/connected").annotate({ + title: "Thread/environment/connectedNotificationMethod", + }), + params: ServerNotification__EnvironmentConnectionNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), + Schema.Struct({ + method: Schema.Literal("thread/environment/disconnected").annotate({ + title: "Thread/environment/disconnectedNotificationMethod", + }), + params: ServerNotification__EnvironmentConnectionNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/settings/updated").annotate({ title: "Thread/settings/updatedNotificationMethod", }), params: ServerNotification__ThreadSettingsUpdatedNotification, - }).annotate({ title: "Thread/settings/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/tokenUsage/updated").annotate({ title: "Thread/tokenUsage/updatedNotificationMethod", }), params: ServerNotification__ThreadTokenUsageUpdatedNotification, - }).annotate({ title: "Thread/tokenUsage/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("turn/started").annotate({ title: "Turn/startedNotificationMethod" }), params: ServerNotification__TurnStartedNotification, - }).annotate({ title: "Turn/startedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("hook/started").annotate({ title: "Hook/startedNotificationMethod" }), params: ServerNotification__HookStartedNotification, - }).annotate({ title: "Hook/startedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("turn/completed").annotate({ title: "Turn/completedNotificationMethod", }), params: ServerNotification__TurnCompletedNotification, - }).annotate({ title: "Turn/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("hook/completed").annotate({ title: "Hook/completedNotificationMethod", }), params: ServerNotification__HookCompletedNotification, - }).annotate({ title: "Hook/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("turn/diff/updated").annotate({ title: "Turn/diff/updatedNotificationMethod", }), params: ServerNotification__TurnDiffUpdatedNotification, - }).annotate({ title: "Turn/diff/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("turn/plan/updated").annotate({ title: "Turn/plan/updatedNotificationMethod", }), params: ServerNotification__TurnPlanUpdatedNotification, - }).annotate({ title: "Turn/plan/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/started").annotate({ title: "Item/startedNotificationMethod" }), params: ServerNotification__ItemStartedNotification, - }).annotate({ title: "Item/startedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/autoApprovalReview/started").annotate({ title: "Item/autoApprovalReview/startedNotificationMethod", }), params: ServerNotification__ItemGuardianApprovalReviewStartedNotification, - }).annotate({ title: "Item/autoApprovalReview/startedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/autoApprovalReview/completed").annotate({ title: "Item/autoApprovalReview/completedNotificationMethod", }), params: ServerNotification__ItemGuardianApprovalReviewCompletedNotification, - }).annotate({ title: "Item/autoApprovalReview/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/completed").annotate({ title: "Item/completedNotificationMethod", }), params: ServerNotification__ItemCompletedNotification, - }).annotate({ title: "Item/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/agentMessage/delta").annotate({ title: "Item/agentMessage/deltaNotificationMethod", }), params: ServerNotification__AgentMessageDeltaNotification, - }).annotate({ title: "Item/agentMessage/deltaNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/plan/delta").annotate({ title: "Item/plan/deltaNotificationMethod", }), params: ServerNotification__PlanDeltaNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Item/plan/deltaNotification", - description: "EXPERIMENTAL - proposed plan streaming deltas for plan items.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("command/exec/outputDelta").annotate({ title: "Command/exec/outputDeltaNotificationMethod", }), params: ServerNotification__CommandExecOutputDeltaNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Command/exec/outputDeltaNotification", - description: - "Stream base64-encoded stdout/stderr chunks for a running `command/exec` session.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("process/outputDelta").annotate({ title: "Process/outputDeltaNotificationMethod", }), params: ServerNotification__ProcessOutputDeltaNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Process/outputDeltaNotification", - description: - "Stream base64-encoded stdout/stderr chunks for a running `process/spawn` session.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("process/exited").annotate({ title: "Process/exitedNotificationMethod", }), params: ServerNotification__ProcessExitedNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Process/exitedNotification", - description: "Final exit notification for a `process/spawn` session.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("item/commandExecution/outputDelta").annotate({ title: "Item/commandExecution/outputDeltaNotificationMethod", }), params: ServerNotification__CommandExecutionOutputDeltaNotification, - }).annotate({ title: "Item/commandExecution/outputDeltaNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/commandExecution/terminalInteraction").annotate({ title: "Item/commandExecution/terminalInteractionNotificationMethod", }), params: ServerNotification__TerminalInteractionNotification, - }).annotate({ title: "Item/commandExecution/terminalInteractionNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/fileChange/outputDelta").annotate({ title: "Item/fileChange/outputDeltaNotificationMethod", }), params: ServerNotification__FileChangeOutputDeltaNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Item/fileChange/outputDeltaNotification", - description: "Deprecated legacy apply_patch output stream notification.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("item/fileChange/patchUpdated").annotate({ title: "Item/fileChange/patchUpdatedNotificationMethod", }), params: ServerNotification__FileChangePatchUpdatedNotification, - }).annotate({ title: "Item/fileChange/patchUpdatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("serverRequest/resolved").annotate({ title: "ServerRequest/resolvedNotificationMethod", }), params: ServerNotification__ServerRequestResolvedNotification, - }).annotate({ title: "ServerRequest/resolvedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/mcpToolCall/progress").annotate({ title: "Item/mcpToolCall/progressNotificationMethod", }), params: ServerNotification__McpToolCallProgressNotification, - }).annotate({ title: "Item/mcpToolCall/progressNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("mcpServer/oauthLogin/completed").annotate({ title: "McpServer/oauthLogin/completedNotificationMethod", }), params: ServerNotification__McpServerOauthLoginCompletedNotification, - }).annotate({ title: "McpServer/oauthLogin/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("mcpServer/startupStatus/updated").annotate({ title: "McpServer/startupStatus/updatedNotificationMethod", }), params: ServerNotification__McpServerStatusUpdatedNotification, - }).annotate({ title: "McpServer/startupStatus/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("account/updated").annotate({ title: "Account/updatedNotificationMethod", }), params: ServerNotification__AccountUpdatedNotification, - }).annotate({ title: "Account/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("account/rateLimits/updated").annotate({ title: "Account/rateLimits/updatedNotificationMethod", }), params: ServerNotification__AccountRateLimitsUpdatedNotification, - }).annotate({ title: "Account/rateLimits/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("app/list/updated").annotate({ title: "App/list/updatedNotificationMethod", }), params: ServerNotification__AppListUpdatedNotification, - }).annotate({ title: "App/list/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("remoteControl/status/changed").annotate({ title: "RemoteControl/status/changedNotificationMethod", }), params: ServerNotification__RemoteControlStatusChangedNotification, - }).annotate({ title: "RemoteControl/status/changedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("externalAgentConfig/import/progress").annotate({ title: "ExternalAgentConfig/import/progressNotificationMethod", }), params: ServerNotification__ExternalAgentConfigImportProgressNotification, - }).annotate({ title: "ExternalAgentConfig/import/progressNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("externalAgentConfig/import/completed").annotate({ title: "ExternalAgentConfig/import/completedNotificationMethod", }), params: ServerNotification__ExternalAgentConfigImportCompletedNotification, - }).annotate({ title: "ExternalAgentConfig/import/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("fs/changed").annotate({ title: "Fs/changedNotificationMethod" }), params: ServerNotification__FsChangedNotification, - }).annotate({ title: "Fs/changedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/reasoning/summaryTextDelta").annotate({ title: "Item/reasoning/summaryTextDeltaNotificationMethod", }), params: ServerNotification__ReasoningSummaryTextDeltaNotification, - }).annotate({ title: "Item/reasoning/summaryTextDeltaNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/reasoning/summaryPartAdded").annotate({ title: "Item/reasoning/summaryPartAddedNotificationMethod", }), params: ServerNotification__ReasoningSummaryPartAddedNotification, - }).annotate({ title: "Item/reasoning/summaryPartAddedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("item/reasoning/textDelta").annotate({ title: "Item/reasoning/textDeltaNotificationMethod", }), params: ServerNotification__ReasoningTextDeltaNotification, - }).annotate({ title: "Item/reasoning/textDeltaNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/compacted").annotate({ title: "Thread/compactedNotificationMethod", }), params: ServerNotification__ContextCompactedNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Thread/compactedNotification", - description: "Deprecated: Use `ContextCompaction` item type instead.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("model/rerouted").annotate({ title: "Model/reroutedNotificationMethod", }), params: ServerNotification__ModelReroutedNotification, - }).annotate({ title: "Model/reroutedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("model/verification").annotate({ title: "Model/verificationNotificationMethod", }), params: ServerNotification__ModelVerificationNotification, - }).annotate({ title: "Model/verificationNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("turn/moderationMetadata").annotate({ title: "Turn/moderationMetadataNotificationMethod", }), params: ServerNotification__TurnModerationMetadataNotification, - }).annotate({ title: "Turn/moderationMetadataNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("model/safetyBuffering/updated").annotate({ title: "Model/safetyBuffering/updatedNotificationMethod", }), params: ServerNotification__ModelSafetyBufferingUpdatedNotification, - }).annotate({ title: "Model/safetyBuffering/updatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("warning").annotate({ title: "WarningNotificationMethod" }), params: ServerNotification__WarningNotification, - }).annotate({ title: "WarningNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("guardianWarning").annotate({ title: "GuardianWarningNotificationMethod", }), params: ServerNotification__GuardianWarningNotification, - }).annotate({ title: "GuardianWarningNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("deprecationNotice").annotate({ title: "DeprecationNoticeNotificationMethod", }), params: ServerNotification__DeprecationNoticeNotification, - }).annotate({ title: "DeprecationNoticeNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("configWarning").annotate({ title: "ConfigWarningNotificationMethod", }), params: ServerNotification__ConfigWarningNotification, - }).annotate({ title: "ConfigWarningNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("fuzzyFileSearch/sessionUpdated").annotate({ title: "FuzzyFileSearch/sessionUpdatedNotificationMethod", }), params: ServerNotification__FuzzyFileSearchSessionUpdatedNotification, - }).annotate({ title: "FuzzyFileSearch/sessionUpdatedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("fuzzyFileSearch/sessionCompleted").annotate({ title: "FuzzyFileSearch/sessionCompletedNotificationMethod", }), params: ServerNotification__FuzzyFileSearchSessionCompletedNotification, - }).annotate({ title: "FuzzyFileSearch/sessionCompletedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/started").annotate({ title: "Thread/realtime/startedNotificationMethod", }), params: ServerNotification__ThreadRealtimeStartedNotification, - }).annotate({ title: "Thread/realtime/startedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/itemAdded").annotate({ title: "Thread/realtime/itemAddedNotificationMethod", }), params: ServerNotification__ThreadRealtimeItemAddedNotification, - }).annotate({ title: "Thread/realtime/itemAddedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/transcript/delta").annotate({ title: "Thread/realtime/transcript/deltaNotificationMethod", }), params: ServerNotification__ThreadRealtimeTranscriptDeltaNotification, - }).annotate({ title: "Thread/realtime/transcript/deltaNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/transcript/done").annotate({ title: "Thread/realtime/transcript/doneNotificationMethod", }), params: ServerNotification__ThreadRealtimeTranscriptDoneNotification, - }).annotate({ title: "Thread/realtime/transcript/doneNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/outputAudio/delta").annotate({ title: "Thread/realtime/outputAudio/deltaNotificationMethod", }), params: ServerNotification__ThreadRealtimeOutputAudioDeltaNotification, - }).annotate({ title: "Thread/realtime/outputAudio/deltaNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/sdp").annotate({ title: "Thread/realtime/sdpNotificationMethod", }), params: ServerNotification__ThreadRealtimeSdpNotification, - }).annotate({ title: "Thread/realtime/sdpNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/error").annotate({ title: "Thread/realtime/errorNotificationMethod", }), params: ServerNotification__ThreadRealtimeErrorNotification, - }).annotate({ title: "Thread/realtime/errorNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("thread/realtime/closed").annotate({ title: "Thread/realtime/closedNotificationMethod", }), params: ServerNotification__ThreadRealtimeClosedNotification, - }).annotate({ title: "Thread/realtime/closedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("windows/worldWritableWarning").annotate({ title: "Windows/worldWritableWarningNotificationMethod", }), params: ServerNotification__WindowsWorldWritableWarningNotification, + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), }).annotate({ - title: "Windows/worldWritableWarningNotification", - description: - "Notifies the user of world-writable directories on Windows, which cannot be protected by the sandbox.", + title: "ServerNotification", + description: "Notification sent from the server to the client.", }), Schema.Struct({ method: Schema.Literal("windowsSandbox/setupCompleted").annotate({ title: "WindowsSandbox/setupCompletedNotificationMethod", }), params: ServerNotification__WindowsSandboxSetupCompletedNotification, - }).annotate({ title: "WindowsSandbox/setupCompletedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), Schema.Struct({ method: Schema.Literal("account/login/completed").annotate({ title: "Account/login/completedNotificationMethod", }), params: ServerNotification__AccountLoginCompletedNotification, - }).annotate({ title: "Account/login/completedNotification" }), + emittedAtMs: Schema.optionalKey( + Schema.Number.annotate({ + description: + "Unix timestamp (in milliseconds) when app-server emitted this notification.", + format: "int64", + }).check(Schema.isInt()), + ), + }).annotate({ + title: "ServerNotification", + description: "Notification sent from the server to the client.", + }), ], { mode: "oneOf" }, -).annotate({ - title: "ServerNotification", - description: "Notification sent from the server to the client.", -}); +); export type ServerNotification__ByteRange = { readonly end: number; readonly start: number }; export const ServerNotification__ByteRange = Schema.Struct({ @@ -34673,6 +36477,40 @@ export const V2AppListUpdatedNotification = Schema.Struct({ description: "EXPERIMENTAL - notification emitted when the app list changes.", }); +export type V2AppsInstalledParams = { + readonly forceRefresh?: boolean; + readonly threadId?: string | null; +}; +export const V2AppsInstalledParams = Schema.Struct({ + forceRefresh: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.", + }), + ), + threadId: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: "Optional loaded thread id used to evaluate effective app configuration.", + }), + Schema.Null, + ]), + ), +}).annotate({ + title: "AppsInstalledParams", + description: "Read the committed installed connector runtime snapshot.", +}); + +export type V2AppsInstalledResponse = { + readonly apps: ReadonlyArray; +}; +export const V2AppsInstalledResponse = Schema.Struct({ + apps: Schema.Array(V2AppsInstalledResponse__InstalledApp), +}).annotate({ + title: "AppsInstalledResponse", + description: "The installed connectors in one committed runtime snapshot.", +}); + export type V2AppsListParams = { readonly cursor?: string | null; readonly forceRefetch?: boolean; @@ -34735,6 +36573,35 @@ export const V2AppsListResponse = Schema.Struct({ ), }).annotate({ title: "AppsListResponse", description: "EXPERIMENTAL - app list response." }); +export type V2AppsReadParams = { + readonly appIds: ReadonlyArray; + readonly includeTools?: boolean; +}; +export const V2AppsReadParams = Schema.Struct({ + appIds: Schema.Array(Schema.String).annotate({ + description: + "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.", + }), + includeTools: Schema.optionalKey( + Schema.Boolean.annotate({ + description: + "When true, include display-only public tool summaries in the returned metadata.", + }), + ), +}).annotate({ + title: "AppsReadParams", + description: "EXPERIMENTAL - read metadata for specific apps/connectors.", +}); + +export type V2AppsReadResponse = { + readonly apps: ReadonlyArray; + readonly missingAppIds: ReadonlyArray; +}; +export const V2AppsReadResponse = Schema.Struct({ + apps: Schema.Array(V2AppsReadResponse__ConnectorMetadata), + missingAppIds: Schema.Array(Schema.String), +}).annotate({ title: "AppsReadResponse", description: "EXPERIMENTAL - app/read response." }); + export type V2CancelLoginAccountParams = { readonly loginId: string }; export const V2CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String }).annotate({ title: "CancelLoginAccountParams", @@ -35158,6 +37025,7 @@ export type V2ConfigRequirementsReadResponse__ManagedHooksRequirements = { readonly PostToolUse: ReadonlyArray; readonly PreCompact: ReadonlyArray; readonly PreToolUse: ReadonlyArray; + readonly SessionEnd?: ReadonlyArray; readonly SessionStart: ReadonlyArray; readonly Stop: ReadonlyArray; readonly SubagentStart: ReadonlyArray; @@ -35172,6 +37040,11 @@ export const V2ConfigRequirementsReadResponse__ManagedHooksRequirements = Schema PostToolUse: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), PreCompact: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), PreToolUse: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), + SessionEnd: Schema.optionalKey( + Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup).annotate({ + default: [], + }), + ), SessionStart: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), Stop: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), SubagentStart: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup), @@ -35399,6 +37272,15 @@ export const V2DeprecationNoticeNotification = Schema.Struct({ summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }), }).annotate({ title: "DeprecationNoticeNotification" }); +export type V2EnvironmentConnectionNotification = { + readonly environmentId: string; + readonly threadId: string; +}; +export const V2EnvironmentConnectionNotification = Schema.Struct({ + environmentId: Schema.String, + threadId: Schema.String, +}).annotate({ title: "EnvironmentConnectionNotification" }); + export type V2ErrorNotification = { readonly error: V2ErrorNotification__TurnError; readonly threadId: string; @@ -35501,6 +37383,8 @@ export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schem export type V2ExternalAgentConfigDetectParams = { readonly cwds?: ReadonlyArray | null; readonly includeHome?: boolean; + readonly migrationSource?: string | null; + readonly source?: string | null; }; export const V2ExternalAgentConfigDetectParams = Schema.Struct({ cwds: Schema.optionalKey( @@ -35516,6 +37400,24 @@ export const V2ExternalAgentConfigDetectParams = Schema.Struct({ description: "If true, include detection under the user's home directory.", }), ), + migrationSource: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Optional migration-source selector. Missing or unrecognized values use the default source.", + }), + Schema.Null, + ]), + ), + source: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.", + }), + Schema.Null, + ]), + ), }).annotate({ title: "ExternalAgentConfigDetectParams" }); export type V2ExternalAgentConfigDetectResponse = { @@ -35537,9 +37439,13 @@ export const V2ExternalAgentConfigImportCompletedNotification = Schema.Struct({ }).annotate({ title: "ExternalAgentConfigImportCompletedNotification" }); export type V2ExternalAgentConfigImportHistoriesReadResponse = { + readonly connectors: ReadonlyArray; readonly data: ReadonlyArray; }; export const V2ExternalAgentConfigImportHistoriesReadResponse = Schema.Struct({ + connectors: Schema.Array( + V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate, + ), data: Schema.Array( V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory, ), @@ -35547,14 +37453,24 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse = Schema.Struct({ export type V2ExternalAgentConfigImportParams = { readonly migrationItems: ReadonlyArray; + readonly migrationSource?: string | null; readonly source?: string | null; }; export const V2ExternalAgentConfigImportParams = Schema.Struct({ migrationItems: Schema.Array(V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem), + migrationSource: Schema.optionalKey( + Schema.Union([ + Schema.String.annotate({ + description: + "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.", + }), + Schema.Null, + ]), + ), source: Schema.optionalKey( Schema.Union([ Schema.String.annotate({ - description: "Source product that produced the migration items. Missing means unspecified.", + description: "Optional identifier for the product that initiated the import.", }), Schema.Null, ]), @@ -35948,6 +37864,7 @@ export type V2GetAccountRateLimitsResponse = { readonly primary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; readonly rateLimitReachedType?: V2GetAccountRateLimitsResponse__RateLimitReachedType | null; readonly secondary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null; + readonly spendControlReached?: boolean | null; }; readonly rateLimitsByLimitId?: { readonly [x: string]: V2GetAccountRateLimitsResponse__RateLimitSnapshot; @@ -35978,6 +37895,15 @@ export const V2GetAccountRateLimitsResponse = Schema.Struct({ secondary: Schema.optionalKey( Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]), ), + spendControlReached: Schema.optionalKey( + Schema.Union([ + Schema.Boolean.annotate({ + description: + "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", + }), + Schema.Null, + ]), + ), }).annotate({ description: "Backward-compatible single-bucket view; mirrors the historical payload.", }), @@ -36000,12 +37926,6 @@ export const V2GetAccountResponse = Schema.Struct({ requiresOpenaiAuth: Schema.Boolean, }).annotate({ title: "GetAccountResponse" }); -export type V2GetAccountResponse__AmazonBedrockCredentialSource = "codexManaged" | "awsManaged"; -export const V2GetAccountResponse__AmazonBedrockCredentialSource = Schema.Literals([ - "codexManaged", - "awsManaged", -]); - export type V2GetAccountTokenUsageResponse = { readonly dailyUsageBuckets?: ReadonlyArray | null; readonly summary: V2GetAccountTokenUsageResponse__AccountTokenUsageSummary; @@ -36399,7 +38319,8 @@ export type V2LoginAccountParams = readonly chatgptAccountId: string; readonly chatgptPlanType?: string | null; readonly type: "chatgptAuthTokens"; - }; + } + | { readonly apiKey: string; readonly region: string; readonly type: "amazonBedrock" }; export const V2LoginAccountParams = Schema.Union( [ Schema.Struct({ @@ -36444,6 +38365,16 @@ export const V2LoginAccountParams = Schema.Union( description: "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.", }), + Schema.Struct({ + apiKey: Schema.String, + region: Schema.String, + type: Schema.Literal("amazonBedrock").annotate({ + title: "AmazonBedrockv2::LoginAccountParamsType", + }), + }).annotate({ + title: "AmazonBedrockv2::LoginAccountParams", + description: "[UNSTABLE] Managed Amazon Bedrock login is experimental.", + }), ], { mode: "oneOf" }, ).annotate({ title: "LoginAccountParams" }); @@ -36457,7 +38388,8 @@ export type V2LoginAccountResponse = readonly userCode: string; readonly verificationUrl: string; } - | { readonly type: "chatgptAuthTokens" }; + | { readonly type: "chatgptAuthTokens" } + | { readonly type: "amazonBedrock" }; export const V2LoginAccountResponse = Schema.Union( [ Schema.Struct({ @@ -36488,6 +38420,11 @@ export const V2LoginAccountResponse = Schema.Union( title: "ChatgptAuthTokensv2::LoginAccountResponseType", }), }).annotate({ title: "ChatgptAuthTokensv2::LoginAccountResponse" }), + Schema.Struct({ + type: Schema.Literal("amazonBedrock").annotate({ + title: "AmazonBedrockv2::LoginAccountResponseType", + }), + }).annotate({ title: "AmazonBedrockv2::LoginAccountResponse" }), ], { mode: "oneOf" }, ).annotate({ title: "LoginAccountResponse" }); @@ -37170,6 +39107,25 @@ export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Lite "stderr", ]).annotate({ description: "Stream label for `process/outputDelta` notifications." }); +export type V2RawResponseCompletedNotification = { + readonly responseId: string; + readonly threadId: string; + readonly turnId: string; + readonly usage?: V2RawResponseCompletedNotification__TokenUsageBreakdown | null; +}; +export const V2RawResponseCompletedNotification = Schema.Struct({ + responseId: Schema.String, + threadId: Schema.String, + turnId: Schema.String, + usage: Schema.optionalKey( + Schema.Union([V2RawResponseCompletedNotification__TokenUsageBreakdown, Schema.Null]), + ), +}).annotate({ + title: "RawResponseCompletedNotification", + description: + "Internal-only notification containing the exact usage from one upstream Responses API completion.", +}); + export type V2RawResponseItemCompletedNotification = { readonly item: V2RawResponseItemCompletedNotification__ResponseItem; readonly threadId: string; @@ -40017,10 +41973,19 @@ export const V2ThreadStartParams__ThreadHistoryMode = Schema.Literals(["legacy", export type V2ThreadStartParams__TurnEnvironmentParams = { readonly cwd: V2ThreadStartParams__LegacyAppPathString; readonly environmentId: string; + readonly runtimeWorkspaceRoots?: ReadonlyArray | null; }; export const V2ThreadStartParams__TurnEnvironmentParams = Schema.Struct({ cwd: V2ThreadStartParams__LegacyAppPathString, environmentId: Schema.String, + runtimeWorkspaceRoots: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2ThreadStartParams__LegacyAppPathString).annotate({ + description: "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", + }), + Schema.Null, + ]), + ), }); export type V2ThreadStartResponse = { @@ -40767,10 +42732,19 @@ export const V2TurnStartParams__NetworkAccess = Schema.Literals(["restricted", " export type V2TurnStartParams__TurnEnvironmentParams = { readonly cwd: V2TurnStartParams__LegacyAppPathString; readonly environmentId: string; + readonly runtimeWorkspaceRoots?: ReadonlyArray | null; }; export const V2TurnStartParams__TurnEnvironmentParams = Schema.Struct({ cwd: V2TurnStartParams__LegacyAppPathString, environmentId: Schema.String, + runtimeWorkspaceRoots: Schema.optionalKey( + Schema.Union([ + Schema.Array(V2TurnStartParams__LegacyAppPathString).annotate({ + description: "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", + }), + Schema.Null, + ]), + ), }); export type V2TurnStartResponse = { readonly turn: V2TurnStartResponse__Turn }; diff --git a/packaging/desktop-runtime/package.json b/packaging/desktop-runtime/package.json index 2c3436ce..bc96aa1d 100644 --- a/packaging/desktop-runtime/package.json +++ b/packaging/desktop-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@cafecode/desktop-runtime", - "version": "0.1.0", + "version": "0.1.1", "private": true, "scripts": { "postinstall": "node ../../scripts/ensure-desktop-runtime.ts"