diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3e9c255..9d8d88e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -83,7 +83,7 @@ jobs: file: ./Dockerfile platforms: linux/${{ matrix.arch }} build-args: | - CODEX_CLI_VERSION=${{ steps.meta.outputs.codex_version || '0.152.1' }} + CODEX_CLI_VERSION=${{ steps.meta.outputs.codex_version || '0.153.2' }} tags: | ${{ env.REGISTRY }}/${{ steps.meta.outputs.image_name }}:${{ matrix.arch }}-${{ steps.meta.outputs.version_tag }} push: true @@ -104,7 +104,7 @@ jobs: file: ./Dockerfile platforms: linux/${{ matrix.arch }} build-args: | - CODEX_CLI_VERSION=${{ steps.meta.outputs.codex_version || '0.152.1' }} + CODEX_CLI_VERSION=${{ steps.meta.outputs.codex_version || '0.153.2' }} tags: | ${{ env.REGISTRY }}/${{ steps.meta.outputs.image_name }}:${{ matrix.arch }}-${{ steps.meta.outputs.version_tag }} push: true diff --git a/Dockerfile b/Dockerfile index 1a27fed..b7ee658 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,7 +91,7 @@ RUN node --version \ && mise --version # Install global npm tools (codex + MCP utilities) -ARG CODEX_CLI_VERSION=0.152.1 +ARG CODEX_CLI_VERSION=0.153.2 ENV CODEX_CLI_VERSION=${CODEX_CLI_VERSION} RUN npm install -g \ @openai/codex@${CODEX_CLI_VERSION} \ @@ -119,7 +119,7 @@ RUN npx --yes node-gyp rebuild --directory=node_modules/node-pty || true \ # ── Stage 6: Runtime ───────────────────────────────────────────────── FROM runtime-base AS runtime -ARG CODEX_CLI_VERSION=0.152.1 +ARG CODEX_CLI_VERSION=0.153.2 ENV CODEX_CLI_VERSION=${CODEX_CLI_VERSION} WORKDIR /app diff --git a/README.en.md b/README.en.md index 9b19d40..c9b343a 100644 --- a/README.en.md +++ b/README.en.md @@ -249,8 +249,8 @@ The same image can serve both a domain root and a proxy subpath (for example, `h ```bash docker build \ - --build-arg CODEX_CLI_VERSION=0.152.1 \ - -t codex-webui:0.152.1 . + --build-arg CODEX_CLI_VERSION=0.153.2 \ + -t codex-webui:0.153.2 . ``` Nginx must retain `/codex/` in browser-facing URLs and strip it when proxying to the backend. The trailing slashes on both `location` and `proxy_pass` are required: diff --git a/README.md b/README.md index 58583ef..85e6bc8 100644 --- a/README.md +++ b/README.md @@ -249,8 +249,8 @@ Docker Compose 中使用时,`proxy_pass` 改为 `http://codex-webui:8172`, ```bash docker build \ - --build-arg CODEX_CLI_VERSION=0.152.1 \ - -t codex-webui:0.152.1 . + --build-arg CODEX_CLI_VERSION=0.153.2 \ + -t codex-webui:0.153.2 . ``` Nginx 必须保留浏览器侧的 `/codex/` 前缀,并在转发到后端时将它移除。`location` 和 `proxy_pass` 末尾的 `/` 均不可省略: diff --git a/docker-compose.yml b/docker-compose.yml index 3feeef2..7eb8aaa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: # build: # context: . # args: - # CODEX_CLI_VERSION: "0.152.1" + # CODEX_CLI_VERSION: "0.153.2" ports: - "${PORT:-8172}:8172" environment: diff --git a/docs/conversation-branches.md b/docs/conversation-branches.md index b048a68..e9c3718 100644 --- a/docs/conversation-branches.md +++ b/docs/conversation-branches.md @@ -11,7 +11,7 @@ Each version is a real app-server thread. Switching versions is therefore ordina - New `POST /api/threads` requests include experimental `historyMode: "paginated"`. If app-server does not confirm paginated mode, the backend best-effort deletes the new thread and fails the request. - Branch creation uses only `thread/fork` with experimental `beforeTurnId`. The in-place `thread/revert` path is intentionally unused: it rewrites history while keeping the thread id, which would give the client two sources of truth that are indistinguishable by id. - `beforeTurnId` is preferred over `lastTurnId` because it also accepts interrupted turns. `lastTurnId` rejects them, and interrupted turns are roughly 1 in 13 in practice — all of which would otherwise be uneditable. -- Both ordinary and message-level forks pass `excludeTurns: true`. The pinned 0.152.1 fork response is metadata-only; the backend discovers the child's complete persisted turn-ID prefix through `thread/turns/list` with `itemsView: "notLoaded"` before writing provenance. Message-level forks compare that prefix with the requested boundary exactly. +- Both ordinary and message-level forks pass `excludeTurns: true`. The pinned 0.153.2 fork response is metadata-only; the backend discovers the child's complete persisted turn-ID prefix through `thread/turns/list` with `itemsView: "notLoaded"` before writing provenance. Message-level forks compare that prefix with the requested boundary exactly. - Message branching discovers the source's complete ordered turn IDs through the same metadata-only pages. It fails immediately if the descending walk observes `inProgress`, requires the edited turn to exist in that complete order, and reads only that turn's user message through a strict `thread/items/list` path. The strict path propagates paging refusals and fails on foreign turn attribution, cursor loops, or its page bound; the UI-facing empty-result normalization is not used for provenance. - The source metadata read occurs once, immediately before `thread/fork`. It validates the source id, paginated mode, and product rule that the thread is not active. This narrows the existing read/fork race without claiming atomicity: a later turn cannot enter the committed prefix because `beforeTurnId` copies strictly before the edited turn, and the child prefix is still compared for exact ordered equality before provenance is written. - Fork responses must remain paginated and identify the expected parent. A mismatched source, history mode, prefix, duplicate turn ID, or non-advancing cursor fails closed. Once a distinct child id exists but before provenance commits, failure triggers a compensating `thread/delete` of that child. @@ -150,7 +150,7 @@ Rendered with `@xyflow/react` over a `d3-hierarchy` tidy-tree layout. Layout is ## Empty Paginated Threads Use Method-Specific Refusals -The pinned 0.152.1 app-server reports one pre-message state differently on the +The pinned 0.153.2 app-server reports one pre-message state differently on the two paging methods still used by this client: | Method | Refusal before the first user message | Normalized result | diff --git a/docs/docker.md b/docs/docker.md index 67ffff7..a0d1ccd 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -114,16 +114,16 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ | ARG | 默认值 | 说明 | |-----|--------|------| -| `CODEX_CLI_VERSION` | `0.152.1` | **运行时**镜像内全局安装的 codex npm 包版本 | +| `CODEX_CLI_VERSION` | `0.153.2` | **运行时**镜像内全局安装的 codex npm 包版本 | 构建阶段生成协议类型用的是 `@openai/codex` devDependency(由 `pnpm-lock.yaml` 锁定),**不受本 ARG 控制**。改 `CODEX_CLI_VERSION` 时须同步更新 `package.json` 里的 devDependency,否则会出现「类型按 A 版本生成、运行时跑 B 版本」的错配。版本的唯一真相源是 `package.json`,Dockerfile / docker-compose / CI fallback 均跟随它。 本地构建: ```bash -docker compose build --build-arg CODEX_CLI_VERSION=0.152.1 +docker compose build --build-arg CODEX_CLI_VERSION=0.153.2 ``` -CI 由 `codex-*` 格式的 tag 触发,tag 名会被解析成本 ARG:`codex-0.152.1` → `0.152.1`。同一 codex 版本重发镜像用 `codex-0.152.1-2` 这类后缀。tag 名不合该格式会导致解析失败、构建报错。 +CI 由 `codex-*` 格式的 tag 触发,tag 名会被解析成本 ARG:`codex-0.153.2` → `0.153.2`。同一 codex 版本重发镜像用 `codex-0.153.2-2` 这类后缀。tag 名不合该格式会导致解析失败、构建报错。 ## 反向代理与子目录部署 diff --git a/docs/frontend-state.md b/docs/frontend-state.md index 78154af..9bf3967 100644 --- a/docs/frontend-state.md +++ b/docs/frontend-state.md @@ -100,7 +100,7 @@ Multi-thread 架构:`threadsById` 存储所有 thread 的独立运行时状态 - **重开不丢分页**:若返回页的 turn 全部已在本地时间线中,则保留现有时间线与 `historyCursor`,不做替换 —— 否则离开再回来会把已加载的更早历史悄悄丢掉。若返回页含未知 turn,说明会话在别处推进过,以服务端为准整体替换。 - **迟到响应保护**:成功与失败回调都先检查运行时是否仍存在。store 的 setter 是 create-if-absent 的,删除进行中若有 in-flight 响应落地,不加保护会把已删会话的外壳重新建出来。 - **后台恢复不写指针**:刷新/重连恢复会遍历所有已加载线程,若允许它们写活跃分支指针,每棵树会指向恢复顺序中的最后一个成员,正是该指针要解决的问题。这两条路径显式传 `recordActive: false`。 -- **fork 也只导航**:钉住的 0.152.1 fork 响应刻意请求 metadata-only。侧边栏不再从响应里的 `thread.turns` 或并行 auxiliary reads 自行 hydration;后端提交 provenance 后才返回,随后路由的 canonical opener 统一分页历史并读取继承后的 token usage / turn diff / turn error。 +- **fork 也只导航**:钉住的 0.153.2 fork 响应刻意请求 metadata-only。侧边栏不再从响应里的 `thread.turns` 或并行 auxiliary reads 自行 hydration;后端提交 provenance 后才返回,随后路由的 canonical opener 统一分页历史并读取继承后的 token usage / turn diff / turn error。 - **降级只读同样分页**:正常 resume 失败后,路由并行读取 metadata 与最近 20 个 summary turns,两者都成功且路由仍指向目标 thread 时才应用;更早历史沿用同一个 `historyCursor` 与显式“加载更早的消息”入口。已有 live runtime 会被显式切换为 `readOnly`,避免只读快照仍保留可写模式。 Approval 与 user-input request 会为自己的 `turnId` 保留空 turn entry,即使最近一页历史没有该 turn。`writeStdin` 回调的 item 可属于更早的 turn,因此卡片按回调 turn 渲染为 unattached request,而不是倒挂回原 command 或改变其 lifecycle。 diff --git a/docs/remaining-tasks.md b/docs/remaining-tasks.md index c3a9cad..1665a2c 100644 --- a/docs/remaining-tasks.md +++ b/docs/remaining-tasks.md @@ -308,6 +308,10 @@ - [ ] `thread/backgroundTerminals/clean` 等剩余 experimentalApi 能力按开关暴露。 - [ ] `modelProvider/authRecoveryStarted` / `authRecoveryCompleted`(0.152.1 新增):**前置依赖 Bedrock 支持,已决定不做**。上游只有 `amazon_bedrock` 实现 `auth_recovery_messages`,且发射被 `uses_aws_auth_recovery()`(`ConfiguredAwsProfile` / `AwsSdk`)门控,因此仅在 model provider 为 Amazon Bedrock 且走 AWS 托管凭证(profile / 环境凭证链)时触发;Codex 托管的 Bedrock API key 与 AWS access keys 不触发,ChatGPT / OpenAI API key 更不触发。该分支是单次凭证刷新而非多步重试,`message` 为写死的英文常量,且失败无对应通知(`Completed` 仅表示成功)。两个方法目前落在前端 dispatcher 的 unknown 分支;在支持 Bedrock 之前,唯一有意义的独立改动是归入 TIER3 消除噪音。 - [ ] `project/list` 的 `sortKey` / `sortDirection` 与 `Project.recencyAt`(0.152.1 新增):按最近活跃排序项目列表的前提已具备,当前仍只用手动 position 序。 +- [x] `request_user_input_async`(0.153.0 新增):`agentMessage.questions` 已进入后端 OpenAPI、前端统一 normalizer 与消息展示;建议答案作为只读提示展示,自由文本仍通过普通新消息回复,不与会阻塞 turn 的 `item/tool/requestUserInput` 混用。 +- [x] 新模型推理强度:0.153.2 的真实 `model/list` 已返回 `max` / `ultra`,后端 OpenAPI 与前端选择器已同步放宽并完成冒烟验证。 +- [ ] `plugin/reconcile` 与 `plugin/reconcile` 相关变更通知(0.153.0 新增):当前安装、卸载与列表流程不依赖 reconcile;待出现插件落盘状态漂移的真实用例后再接入,避免引入无意义轮询。 +- [ ] `AppsConfig.links`(0.153.0 新增):当前 Apps 页面只消费 app 列表与启用状态,尚未展示外部链接配置。 ### 数据、检索与审计 diff --git a/docs/upstream/README.md b/docs/upstream/README.md index fdb97d9..68e9d0d 100644 --- a/docs/upstream/README.md +++ b/docs/upstream/README.md @@ -8,7 +8,7 @@ Do not edit them. Fix anything wrong by refreshing from upstream. | File | Upstream path | Tag | |---|---|---| -| `codex-app-server-0.152.1.md` | `codex-rs/app-server/README.md` | `rust-v0.152.1` | +| `codex-app-server-0.153.2.md` | `codex-rs/app-server/README.md` | `rust-v0.153.2` | The tag matches the `@openai/codex` version pinned in the root `package.json`. Refresh after bumping that dependency — a protocol migration is exactly when a diff --git a/docs/upstream/codex-app-server-0.152.1.md b/docs/upstream/codex-app-server-0.153.2.md similarity index 96% rename from docs/upstream/codex-app-server-0.152.1.md rename to docs/upstream/codex-app-server-0.153.2.md index 5b99a2b..a0aa92b 100644 --- a/docs/upstream/codex-app-server-0.152.1.md +++ b/docs/upstream/codex-app-server-0.153.2.md @@ -221,7 +221,7 @@ Example with notification opt-out: - `thread/revert` — replace a loaded paginated thread's durable history with the prefix strictly before `beforeTurnId` while preserving its thread id. The operation interrupts an active turn if needed, leaves older rollout files immutable, reloads the thread, returns updated thread metadata with empty `turns` plus pagination cursors, and emits `thread/reverted`. It does not revert local file changes. Parent-owned Multi-Agent V2 subagents reject direct revert requests. - `turn/start` — add user input or a named standalone function-call output to a thread and begin Codex generation; responds with the initial `turn` object and streams `turn/started`, `item/*`, and `turn/completed` notifications. For standalone outputs, provide `toolOutput` with an empty `input` array. Optional `turnTrigger` classifies who or what started a new turn and is sent as `turn_trigger` in Responses request metadata; it is ignored if the request steers an active turn. `clientUserMessageId` is optional; when supplied, the corresponding `userMessage` item echoes it as `clientId`. Experimental `runtimeWorkspaceRoots` supplies the default roots for newly resolved environment selections. Explicit `environments[].runtimeWorkspaceRoots` override that fallback with environment-native absolute paths. Prefer experimental `permissions` profile selection by id for permission overrides; the legacy `sandboxPolicy` field is still accepted but cannot be combined with `permissions`. For `collaborationMode`, `settings.developer_instructions: null` means "use built-in instructions for the selected mode". Deprecated experimental `multiAgentMode` is ignored; Ultra reasoning effort selects proactive behavior. Parent-owned Multi-Agent V2 subagents reject direct turns. - `thread/inject_items` — append raw Responses API items to a loaded thread’s model-visible history without starting a turn; returns `{}` on success. Parent-owned Multi-Agent V2 subagents reject direct item injection. -- `turn/settings/update` — experimental; publish a narrow model-settings patch to the exact live task identified by `threadId` and `turnId`, regardless of task kind. Requires `step_model_switching`; returns `status: "applied"` or `status: "targetUnavailable"`, or a request error if rejected. Future-thread settings and already captured steps are unchanged. Parent-owned Multi-Agent V2 subagents reject direct settings updates. +- `turn/settings/update` — experimental; publish a reviewer or model-settings patch to the exact live task identified by `threadId` and `turnId`, regardless of task kind. Model-settings updates require `step_model_switching`; reviewer-only updates do not. Returns `status: "applied"` or `status: "targetUnavailable"`, or a request error if rejected. Future-thread settings and already captured steps are unchanged. Parent-owned Multi-Agent V2 subagents reject direct settings updates. - `turn/steer` — add user input to an already in-flight regular turn without starting a new turn; returns the active `turnId` that accepted the input. `clientUserMessageId` is optional; when supplied, the corresponding `userMessage` item echoes it as `clientId`. Review and manual compaction turns reject `turn/steer`. Parent-owned Multi-Agent V2 subagents reject direct steering. - `turn/interrupt` — request cancellation of an in-flight turn by `(thread_id, turn_id)`; success is an empty `{}` response and the turn finishes with `status: "interrupted"`. Also available for parent-owned Multi-Agent V2 subagents. - `thread/realtime/start` — start a thread-scoped realtime session (experimental); pass `outputModality: "text"` or `outputModality: "audio"` to choose model output, optionally pass `model` and `version` to override configured realtime selection for this session only, pass `includeStartupContext: false` to omit Codex's generated startup context, and optionally pass `initialItems` to seed V3 with complete role-bearing text messages at session creation. Pass `realtimeStartInstructions` and `realtimeEndInstructions` to control the developer instructions given to the backing Codex model when this session starts and ends. Version `"v1"` uses legacy Bidi `conversation.handoff.*`, `"v2"` uses the Realtime Voice API, and `"v3"` preserves V1 Codex Voice behavior while using Frameless Bidi `delegation.*`. For V3 automatic Codex text, `codexResponseHandoffMode` accepts `"thinking"` (the default; all output uses channel-less thinking appends), `"commentary"` (all output uses the commentary channel), or `"bemTags"` (the raw BEM envelope selects the API channel: BEM `analysis` and `commentary` use `commentary`, while BEM `final` and unparsable output use `speakable`). The BEM envelope remains in the appended text for the frontend model to interpret. V1 and V2 ignore this setting. For V3, pass `delegationAckFiller: false` to suppress the Realtime API's delegation acknowledgement filler or `true` to restore it; omitting the field preserves the Realtime API's default. V1 and V2 ignore `delegationAckFiller`. V3 handoffs do not prepend the legacy `"Agent Final Message"` label. Pass `clientManagedHandoffs: true` to disable automatic Codex response delivery so only the client's explicit append calls produce handoffs. Pass `codexResponsesAsItems: true` to send automatic Codex responses as realtime conversation items instead, and optionally pass `codexResponseItemPrefix` to prepend experiment instructions to those items. Returns `{}` and streams `thread/realtime/*` notifications. Omit `transport` for the websocket transport, or pass `{ "type": "webrtc", "sdp": "..." }` to create a Bidi WebRTC session from a browser-generated SDP offer; the remote answer SDP is emitted as `thread/realtime/sdp`. Conversation `version: "v2"` requests remain unsupported for WebRTC. Parent-owned Multi-Agent V2 subagents reject this request. @@ -271,6 +271,7 @@ Example with notification opt-out: - `plugin/list` — list discovered plugin marketplaces and plugin state, including effective marketplace install/auth policy metadata, nullable remote install-policy provenance in `installPolicySource` (`WORKSPACE_SETTING` or `IMPLICIT_CANONICAL_APP`), the remote marketplace `version` and locally materialized `localVersion` when available, plugin `availability` (`AVAILABLE` by default or `DISABLED_BY_ADMIN` for remote plugins blocked upstream), fail-open `marketplaceLoadErrors` entries for marketplace files that could not be parsed or loaded, and best-effort `featuredPluginIds` for the official curated marketplace. Every `PluginSummary` returned by plugin list, installed, read, and share-list methods includes nullable `disabledReason` and `eligiblePlanTypes`, preserving plugin-service availability metadata and raw plan identifiers for remote plugins while returning `null` for local plugins or older remote responses. The same summaries include `mustShowInstallationInterstitial`: remote service values preserve `true` or `false`, while local plugins and remote responses that omit the policy return `null`. Clients should fail closed when the value is `null`. Clients can explicitly request the remote `workspace-directory`, `shared-with-me`, or `created-by-me-remote` marketplace kinds. Set `forceRefetch: true` to bypass TTL-backed remote catalog caches for the requested marketplaces and wait for fresh data; cache entries are replaced only after a successful fetch. When local marketplaces are included, the request also waits for configured plugin caches to reconcile before marketplace summaries are returned. At app-server startup, existing cached catalogs remain available to `plugin/list` while they refresh in the background. `interface.category` uses the marketplace category when present; otherwise it falls back to the plugin manifest category (**under development; do not call from production clients yet**). - `plugin/search` — search the remote plugin service directly and combine matching local marketplace plugins into the first result page. Accepts a `searchTerm`, optional `global`, `workspace`, or `personal` scope, optional `cwds` for discovering repo marketplaces, and optional `cursor` and `limit`; `personal` searches user-owned plugins. Local matching uses plugin names, display names, and keywords, with case- and punctuation-insensitive relevance ordering. Global searches include applicable built-in local plugins, personal searches include other local plugins, workspace searches remain remote-only, and an omitted scope includes all local plugins. When the remote global catalog is active, it is authoritative and replaces the local curated marketplace. Local results remain available with API-key authentication and when `remote_plugin` is disabled; in the latter case, omitted-scope and explicit workspace searches can still query the remote workspace catalog, while explicit global and personal searches do not query plugin-service. The first page includes at most 100 local matches and can exceed `limit`; subsequent pages contain remote results only, and the upstream pagination token is passed through unchanged as `nextCursor`. Local and remote copies are deduplicated by shared remote identity, with the remote summary retaining local installed state. Every result always explicitly returns `plugin.enabled: false`, including enabled local plugins, deduplicated plugins, and later remote-only pages; search reports discovery metadata rather than effective activation. Use `plugin/list` or `plugin/read` to determine whether a plugin is actually enabled. When `plugin_sharing` is disabled, shared/private workspace results are omitted after the remote page is fetched (**under development; do not call from production clients yet**). - `plugin/installed` — list installed plugin rows plus any explicitly requested local install-suggestion plugin names, without fetching the broader remote catalog. Remote rows include nullable `installPolicySource` and `installedAt`, the backend installation timestamp in Unix seconds. `installedAt` is also returned by `plugin/list`, `plugin/read`, and `plugin/share/list`; it is `null` for local plugins, uninstalled plugins, plugins installed by default, and older backend responses that do not include an installation timestamp. Mention surfaces can use this narrower view when they need plugin mention payloads rather than plugin-page discovery data (**under development; do not call from production clients yet**). +- `plugin/reconcile` — sync installed remote plugin bundles to match the latest plugin-service state. Blocks until synchronization and required hook updates finish, then returns `changedPlugins` with `hasMcps`, `hasApps`, `hasHooks`, and `hasSkills` refresh hints, including removals. Callers refresh MCP and Apps runtimes; plugin skills are picked up automatically on subsequent turns. - `plugin/read` — read one plugin by `marketplacePath` plus `pluginName`, returning marketplace info, a list-style `summary`, manifest descriptions/interface metadata, and bundled skills/hooks/apps/MCP server names. Remote plugin details can include scheduled task summaries from the catalog; `scheduledTasks: null` means the metadata is unavailable, while an empty array means the catalog found no scheduled tasks. Remote plugin details expose the canonical `shareUrl` supplied by the remote catalog when available; it is `null` for local plugins or when the catalog omits it. This field is separate from `summary.shareContext`, which continues to describe user and workspace sharing state. For owned workspace plugins, `summary.shareContext.canPublishToWorkspace` reports whether the current user may add the plugin to the workspace directory; `plugin/share/save` returns the same capability after creating or updating a share, and clients should fail closed when either value is `null`. Remote skill interfaces expose `iconSmallUrl` and `iconLargeUrl` when the catalog supplies icon URLs. Returned plugin skills include their current `enabled` state after local config filtering; bundled hooks are returned as lightweight declaration summaries keyed for correlation with `hooks/list`. Use `plugin/install`'s `appsNeedingAuth` to drive post-install authentication and `app/list`'s `isAccessible` to determine current connector accessibility (**under development; do not call from production clients yet**). - `plugin/skill/read` — read remote plugin skill markdown on demand by `remoteMarketplaceName`, `remotePluginId`, and `skillName`. This lets clients preview uninstalled remote plugin skills without downloading the plugin bundle. - `skills/changed` — notification emitted when watched local skill files change. @@ -296,7 +297,7 @@ Example with notification opt-out: - `mcpServer/event/stream/stop` (experimental) — stop the caller's event subscription by `subscriptionId`. - `mcpServer/tool/call` — call a tool on a thread's configured MCP server by `threadId`, `server`, `tool`, optional `arguments`, and optional `_meta`, returning the MCP tool result. Parent-owned Multi-Agent V2 subagents reject direct tool calls. - `windowsSandbox/setupStart` — start Windows sandbox setup for the selected mode (`elevated` or `unelevated`); accepts an optional absolute `cwd` to target setup for a specific workspace, returns `{ started: true }` immediately, and later emits `windowsSandbox/setupCompleted`. -- `feedback/upload` — submit a feedback report (classification + optional reason/logs, conversation_id, and optional `extraLogFiles` attachments array); returns the tracking thread id. +- `feedback/upload` — submit a feedback report (classification + optional reason/logs, conversation_id, and optional `extraLogFiles` attachments array); returns the tracking thread id. With logs enabled, includes bounded recent failed Guardian review actions, decisions, and reviewer history from the reported thread and its descendants, linked to the reviewed turn and target item where available. Rollout selection preserves the reported thread and prioritizes children with retained failed reviews before newer children, including each selected thread's available Guardian trunk rollout. `feedback-thread-index.json` lists selected filenames and bounded omission details; it describes selection, not successful delivery. Failed-review captures are process-local, so missing evidence does not establish that no denial occurred. - `config/read` — fetch the runtime-effective config after resolving config layering and managed requirements, including opaque `desktop` values stored in `config.toml`. When configured, the `packagedDefaults` layer has the lowest precedence. - `externalAgentConfig/detect` — detect migratable external-agent artifacts with `includeHome`, optional `cwds`, and an optional `migrationSource` selector. Omitted, `null`, or unrecognized migration-source values retain the default behavior. The deprecated optional `source` field remains accepted for compatibility but does not select the migration source. Each detected item includes `cwd` (`null` for home), and multi-item migrations may additionally include structured `details` with plugin ids, skill names, memory, session metadata, or other artifact names. The response also includes connector candidates inferred from detected source sessions, with a normalized display `name`, the number of detected sessions that used the connector, and the source metadata field used for detection. - `externalAgentConfig/import` — apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home) and any `details` returned by detect. Pass the same optional `migrationSource` used for detection so the server reads from the matching source; omitted, `null`, or unrecognized values retain the default behavior. The optional `source` identifies the product that initiated the import, while the optional opaque `providerId` attributes analytics to the provider selected by that product without affecting migration-source selection. The response acknowledges the synchronous import phase with an `importId`. Expected migration failures are reported as per-item failures rather than JSON-RPC errors, so the server still returns that `importId` and emits `externalAgentConfig/import/completed` with the same ID once all synchronous and background work finishes. The completion notification contains type-level `itemTypeResults` with successes and failures, including raw failure messages for the client to report separately. @@ -317,6 +318,17 @@ Plugin activation and MCP settings use the existing merged configuration, includ system settings and trusted project overrides. `skills/list` resolves plugin skills independently for each requested working directory. +Sites migration persists an account/backend-scoped list of excluded bundled plugin IDs, not +remote installed metadata. Once remote Sites is installed and locally loadable, the shared +marketplace and runtime loaders exclude `sites@openai-bundled`. The exclusion survives restarts; +normal remote refresh remains authoritative and clears it when remote Sites is unavailable. +The bundled files and preference remain available for account changes or a missing replacement. +Direct local reads and installs of excluded bundled Sites return the existing plugin-not-found error. +Plugin Service implicitly installs eligible Sites; migration does not call install, ensure, enable, +or disable. Remote enablement stays authoritative, including when bundled preferences differ. +A successful check that remote Sites is unavailable is throttled for 60 seconds. Catalog requests +then skip blocking bundle synchronization; normal background synchronization continues unchanged. + For local `plugin/list` and `plugin/installed` results, each requested cwd supplies its effective plugin state and plugin feature flag. When a plugin appears in multiple contexts, the first source wins and installed/enabled state is merged across contexts. @@ -327,8 +339,14 @@ sources before returning; ordinary listing schedules the same work in the backgr Remote catalog settings and feature gating remain request-wide rather than being selected from the requested repos. Search continues to report `enabled: false`. -Marketplace definitions can come from system configuration, but configured Git -marketplaces currently require an existing downloaded snapshot. +Marketplace definitions can come from system configuration. Startup synchronization +and `marketplace/upgrade` download or update configured Git marketplaces using the +merged source, ref, and sparse-path settings. Snapshot metadata stays with the +downloaded files; configuration is not copied into the user layer. Pure catalog +listing does not wait for missing snapshots to download. +Activation reloads configuration with the operation's original load settings and +rolls back if the marketplace definition changed or the reload fails. User files +ignored at startup remain ignored during this check. `marketplace/remove` rejects removal when the marketplace name is defined in another enabled layer of the operation's loaded config stack. Otherwise it removes the @@ -336,6 +354,14 @@ snapshot and any base-user entry; a base-user entry is not required for cleanup. ### Example: Start or resume a thread +The shared `Thread` object includes nullable `model` and `reasoningEffort` fields, +including in `thread/read`, `thread/list`, and `thread/started`. Loaded threads report +their current configured settings; unloaded threads report the latest persisted +values. Unavailable legacy or filesystem-only values remain `null`, and an unset +reasoning effort is also `null`. These fields are not per-turn execution telemetry. +Use `thread/read` or `thread/list` to inspect them without resuming a thread, +subscribing to it, or dispatching queued work or goal continuations. + Start a fresh thread when you need a new Codex conversation. ```json @@ -1339,8 +1365,8 @@ Use `thread/backgroundTerminals/terminate` to terminate one running background t ### Example: Update a running turn's settings (experimental) -Enable `capabilities.experimentalApi` and the disabled-by-default `step_model_switching` -feature. Supply the exact turn ID from `turn/start`, `turn/started`, `thread/read` with +Enable `capabilities.experimentalApi`; model-settings updates also require the +disabled-by-default `step_model_switching` feature. Supply the exact turn ID from `turn/start`, `turn/started`, `thread/read` with `includeTurns: true`, or `thread/turns/list`: ```json @@ -1350,10 +1376,21 @@ feature. Supply the exact turn ID from `turn/start`, `turn/started`, `thread/rea { "id": 42, "result": { "status": "applied" } } ``` -Only `model`, `effort`, `summary`, and `serviceTier` may change. Unknown fields are +Only `approvalsReviewer`, `model`, `effort`, `summary`, and `serviceTier` may change. Unknown fields are rejected. Omitted fields leave settings unchanged; `serviceTier: null` clears the requested tier, while `null` for model, effort, or summary leaves it unchanged. +A reviewer-only update does not require `step_model_switching`. Set +`approvalsReviewer` to `"auto_review"` or `"user"` to change review routing for +subsequently captured steps and newly initiated background approval requests. +Omission or `null` leaves the reviewer unchanged. Managed reviewer restrictions +and model-required auto review still apply. Existing captured steps and pending +approvals keep their original reviewer; this does not approve a pending request, +change sandbox permissions, or update child sessions. App/account-specific +reviewer overrides still take precedence. Future-thread defaults remain separate. +For compatibility, MCP keeps following refreshed thread defaults until an explicit +live reviewer update overrides them for that turn. + The response waits for core: `status: "applied"` means a settings snapshot was published for subsequent captures, even if its values were unchanged. Normal defaults and tier filtering still apply; publication does not guarantee another inference will run or use @@ -1709,6 +1746,8 @@ Event notifications are the server-initiated event stream for thread lifecycles, Thread realtime publishes thread-scoped timeline item lifecycle notifications for paginated threads alongside its existing realtime notifications. Completed timeline items are durably interleaved with ordinary turn items by `thread/timeline/list`. Neither surface changes `ThreadItem`, `thread/read`, `thread/resume`, or `thread/fork`; clients ignore notification methods they do not recognize. +Core records transcript segments, session boundaries, and backing-agent artifact promotions through its injected thread store, even without an app-server event listener. Presentation selection uses the same rules for every Core host. App-server translates Core's history events into the notifications below; it does not append those items again. Recording remains limited to paginated threads. A completed notification follows acceptance by the thread store, not an additional flush or power-loss durability barrier. + Each realtime item has an `id`, a `realtimeSessionId`, and one of four types: `realtimeSessionStarted`, `transcriptSegment`, `bemItemPromoted`, or `realtimeSessionClosed`. A `bemItemPromoted` item references an existing backing-agent item by `turnId` and `itemId`; its `presentation` is `wholeItem`, `inlineMarkdown`, or `inlineVisualization` with an `index`. Recoverable configuration and initialization warnings use the existing `configWarning` notification: `{ summary, details?, path?, range? }`. App-server may emit it during initialization for config parsing and related setup diagnostics, or to the requesting connection during `thread/start` when that thread's exec-policy rules fail to parse. @@ -1785,7 +1824,7 @@ The app-server streams JSON-RPC notifications while a turn is running. Each turn - `userMessage` — `{id, clientId, content}` where `clientId` is the optional `clientUserMessageId` supplied to `turn/start` or `turn/steer`, and `content` is a list of user inputs (`text`, `image`, `localImage`, `audio`, or `localAudio`). - `functionCallOutput` — `{id, name, namespace, output}` for a standalone function-call output without a `call_id`. `namespace` is nullable, and `output` is either a string or structured content items. Clients decide whether to render these tool-authority items; ordinary paired function-call outputs are not emitted separately. -- `agentMessage` — `{id, text, phase, memoryCitation, delivery}` containing the accumulated agent reply. `delivery: "async"` identifies a user-visible message sent without ending the current turn; ordinary agent messages have `delivery: null`. +- `agentMessage` — `{id, text, phase, memoryCitation, delivery, questions}` containing the accumulated agent reply. `delivery: "async"` identifies a user-visible message sent without ending the current turn. Async user-input requests also provide `questions`, an ordered array of `{title, options}`; `options: null` means free text only. `text` remains a readable fallback. Replies arrive as ordinary user messages. Ordinary agent messages have `delivery: null` and `questions: null`. - `plan` — `{id, text}` emitted for plan-mode turns; plan text can stream via `item/plan/delta` (experimental). - `reasoning` — `{id, summary, content}` where `summary` holds streamed reasoning summaries (applicable for most OpenAI models) and `content` holds raw reasoning blocks (applicable for e.g. open source models). - `commandExecution` — `{id, pluginId?, scriptPath?, command, cwd, status, commandActions, aggregatedOutput?, exitCode?, durationMs?}` for sandboxed commands; `pluginId` is present only for commands attributed to a trusted first-party plugin, newly attributed items also include `scriptPath` as a safe `/`-separated path relative to the trusted plugin root, older history may omit `scriptPath`, and `status` is `inProgress`, `completed`, `failed`, or `declined`. Ordinary execution items and their replay expose `command` and `commandActions` as redacted display values, not executable commands. @@ -1884,6 +1923,18 @@ persisted rollout errors, so unavailable details after a restart remain a termin ## Approvals +In User approval mode (`approvalsReviewer: "user"`), async Guardian scoring and +prewarming are skipped, and ordinary `node_repl.js` execution confirmations are +accepted automatically. Separate sensitive-action checks and requests for user +input keep their existing behavior. Approve for me and Full Access are unchanged. + +Full Access (`approvalPolicy: "never"` with unrestricted selected environments) +skips Guardian, including background scoring. Confirmation-only MCP approvals, +including strict or sensitive CUA requests, are accepted. Strict responses retain +`approvals_reviewer: "auto_review"` for client compatibility, without a model review. +Restricted or unresolved environments, explicit client denials, and forms requiring +user input keep their existing behavior. Cancellation still stops the request. + Certain actions (shell commands or modifying files) may require explicit user approval depending on the user's config. When `turn/start` is used, the app-server drives an approval flow by sending a server-initiated JSON-RPC request to the client. The client must respond to tell Codex whether to proceed. UIs should present these requests inline with the active turn so users can review the proposed command or diff before choosing. - Requests include `threadId` and `turnId`—use them to scope UI state to the active conversation. @@ -2413,6 +2464,11 @@ Setting the app value to `"user"` routes its approval prompts to the user instead of Guardian; setting it to `"auto_review"` opts that app into Guardian review when allowed by configuration requirements. +Per-account approval configuration uses `apps..links.` with +`approvals_reviewer` and `default_tools_approval_mode`. Like `tools`, `links` is +an optional section: `config/read` returns `null` when it is absent, `{}` when +it is explicitly empty, and a map keyed by link ID when accounts are configured. + Use `apps._default.default_tools_approval_mode` to set the approval mode for tools without a per-app or per-tool override. Supported values are `"auto"`, `"prompt"`, `"writes"`, and `"approve"`. The `"writes"` mode prompts for tools diff --git a/package.json b/package.json index 75289f4..8383677 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@nestjs/cli": "^11.0.0", "@nestjs/schematics": "^11.0.0", "@nestjs/testing": "^11.0.1", - "@openai/codex": "0.152.1", + "@openai/codex": "0.153.2", "@swc/core": "^1.16.1", "@types/better-sqlite3": "^7.6.13", "@types/jsonwebtoken": "^9.0.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf00aae..6d3a430 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,8 +112,8 @@ importers: specifier: ^11.0.1 version: 11.1.19(@nestjs/common@11.1.19(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.19)(@nestjs/platform-express@11.1.19) '@openai/codex': - specifier: 0.152.1 - version: 0.152.1 + specifier: 0.153.2 + version: 0.153.2 '@swc/core': specifier: ^1.16.1 version: 1.16.1 @@ -1141,43 +1141,43 @@ packages: engines: {node: ^14.18.0 || >=16.10.0, npm: '>=5.10.0'} hasBin: true - '@openai/codex@0.152.1': - resolution: {integrity: sha512-dSwQzl6JgsFe8L9i8xUnwRz9Vy8gn4UvXFU9xq2IJ1eC7zsSttqQ2SGq49ZZIjEyZQ0LZjCs6Bvtxort2Iyebg==} + '@openai/codex@0.153.2': + resolution: {integrity: sha512-IRocJlE+jCZGYHwIJWBja2nDswTSZY4sNddQgU5xiR/mVWxo5WcO8pqcajXJea1XDoNK9CaVzizVhUxDhFkU6g==} engines: {node: '>=16'} hasBin: true - '@openai/codex@0.152.1-darwin-arm64': - resolution: {integrity: sha512-H8i0uZHILM0Z2Ep+MryCF5rGXmXjmXTzXf5ZK6bobKtZc2yfomi42ZrQWuYQ5P02H0oLG7B5jLaSWZQ+VFgjbA==} + '@openai/codex@0.153.2-darwin-arm64': + resolution: {integrity: sha512-8cEJWOIW5WnSn2+W1RUjc1sm2sN1H6NP+cCrOe73ImamUy2yOk3QKjZM2SfkA9jf3fqgwlBNUslhGMen2omc5g==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@openai/codex@0.152.1-darwin-x64': - resolution: {integrity: sha512-M2qW7YkRx+JeSFoZQsrjgA5yNglowuNAFOwRJoIjlgeP8bsyOqPtbSolu3w4Us7IyCH8f/yuKtlt/v/MdDqbfA==} + '@openai/codex@0.153.2-darwin-x64': + resolution: {integrity: sha512-hY68UBhIUE3xIn40SdoujokNiCBeHn9Jp9bEtcIrYeYd2IUtu1oCFwxFnkGhw6+UjHn7piiMxohAomddRA4MCg==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@openai/codex@0.152.1-linux-arm64': - resolution: {integrity: sha512-qZXqf7fxn/SCmaJW6tYrzWqwcDo0gMDJjj1Pm4OtrWXR7Oc0Y2e8ngAh/Mep9iFhVbsqntY1eGLaQaXssGvFgA==} + '@openai/codex@0.153.2-linux-arm64': + resolution: {integrity: sha512-QDkOdJzIdMGaOCViY2dqGqr8WhQv81WfmJkAghC3doFedsOfHt87RuAO4yFN7m0FSR3y5UsScSDUT4zOCcmEVA==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@openai/codex@0.152.1-linux-x64': - resolution: {integrity: sha512-ar59rr3CX5j4MLMnRcHqcE0eHZPsZlmXlz37ZS2yP3BsV5pNhO+wFXTOzXFdaYmg2cALX7a3Eqv+vB2jQlXnjQ==} + '@openai/codex@0.153.2-linux-x64': + resolution: {integrity: sha512-CPUPhFmykKRdIcgwiOfKvFKHBP62dPfaiP+pzQ2bVNAfLTW+i0Kasd7hQryoxZUmTPvw0h9HyM2NgsnQ9AJlTw==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@openai/codex@0.152.1-win32-arm64': - resolution: {integrity: sha512-YZjWCcArfSLlqG/4r2Ox5ZZhz1FAFQBZisz8U8r5JLxeLk0tXwZHleu8RjNjly++0S5zsgPtAuF0viSIj7NyRA==} + '@openai/codex@0.153.2-win32-arm64': + resolution: {integrity: sha512-+49dim0F4FoxKLBDBLzMQL4C1m9FG2kx6twg98jo2USesKfmj8XG3HSCe2tW2zOfRArSgHCDyNDHFdts3AfaBg==} engines: {node: '>=16'} cpu: [arm64] os: [win32] - '@openai/codex@0.152.1-win32-x64': - resolution: {integrity: sha512-B8h0/2Kt+rKQv2+vqBhlhWkMEdhf4dsn46FNKMEBTXj3YC5hwSioOcTX2hMgJxMEMtKIMH6Ire1eNrQPvaL9og==} + '@openai/codex@0.153.2-win32-x64': + resolution: {integrity: sha512-x1PnFo9Uy81NEIlPx3qxkP3PQgkfmJOY/2LqKCKlvxArWIL+PrEV9xKcmKeo9Yw23PPU2TDH3AyqcdeblqtNNg==} engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -4555,31 +4555,31 @@ snapshots: dependencies: consola: 3.4.2 - '@openai/codex@0.152.1': + '@openai/codex@0.153.2': optionalDependencies: - '@openai/codex-darwin-arm64': '@openai/codex@0.152.1-darwin-arm64' - '@openai/codex-darwin-x64': '@openai/codex@0.152.1-darwin-x64' - '@openai/codex-linux-arm64': '@openai/codex@0.152.1-linux-arm64' - '@openai/codex-linux-x64': '@openai/codex@0.152.1-linux-x64' - '@openai/codex-win32-arm64': '@openai/codex@0.152.1-win32-arm64' - '@openai/codex-win32-x64': '@openai/codex@0.152.1-win32-x64' + '@openai/codex-darwin-arm64': '@openai/codex@0.153.2-darwin-arm64' + '@openai/codex-darwin-x64': '@openai/codex@0.153.2-darwin-x64' + '@openai/codex-linux-arm64': '@openai/codex@0.153.2-linux-arm64' + '@openai/codex-linux-x64': '@openai/codex@0.153.2-linux-x64' + '@openai/codex-win32-arm64': '@openai/codex@0.153.2-win32-arm64' + '@openai/codex-win32-x64': '@openai/codex@0.153.2-win32-x64' - '@openai/codex@0.152.1-darwin-arm64': + '@openai/codex@0.153.2-darwin-arm64': optional: true - '@openai/codex@0.152.1-darwin-x64': + '@openai/codex@0.153.2-darwin-x64': optional: true - '@openai/codex@0.152.1-linux-arm64': + '@openai/codex@0.153.2-linux-arm64': optional: true - '@openai/codex@0.152.1-linux-x64': + '@openai/codex@0.153.2-linux-x64': optional: true - '@openai/codex@0.152.1-win32-arm64': + '@openai/codex@0.153.2-win32-arm64': optional: true - '@openai/codex@0.152.1-win32-x64': + '@openai/codex@0.153.2-win32-x64': optional: true '@oxc-project/types@0.146.0': {} diff --git a/src/codex/dto/v2/openapi-contract.spec.ts b/src/codex/dto/v2/openapi-contract.spec.ts index 59687d8..f93cfb4 100644 --- a/src/codex/dto/v2/openapi-contract.spec.ts +++ b/src/codex/dto/v2/openapi-contract.spec.ts @@ -101,6 +101,18 @@ describe('Codex v2 OpenAPI contract', () => { expect(discriminators).toEqual(THREAD_ITEM_TYPES); }); + it('exposes Codex 0.153 thread and asynchronous question metadata', () => { + expect(Object.keys(schema('ThreadDto').properties ?? {})).toEqual( + expect.arrayContaining(['model', 'reasoningEffort']), + ); + expect( + Object.keys(schema('AgentMessageThreadItemDto').properties ?? {}), + ).toEqual(expect.arrayContaining(['questions'])); + expect( + Object.keys(schema('AsyncUserInputQuestionDto').properties ?? {}), + ).toEqual(expect.arrayContaining(['title', 'options'])); + }); + it.each([ ['HookPromptThreadItemDto', ['type', 'id', 'fragments']], [ diff --git a/src/codex/dto/v2/openapi.schema.ts b/src/codex/dto/v2/openapi.schema.ts index 802d735..49e4b78 100644 --- a/src/codex/dto/v2/openapi.schema.ts +++ b/src/codex/dto/v2/openapi.schema.ts @@ -13,6 +13,8 @@ export const REASONING_EFFORT_VALUES = [ 'medium', 'high', 'xhigh', + 'max', + 'ultra', ] as const; export const SERVICE_TIER_VALUES = ['fast', 'flex'] as const; diff --git a/src/codex/dto/v2/thread-item.dto.ts b/src/codex/dto/v2/thread-item.dto.ts index b372390..8dab930 100644 --- a/src/codex/dto/v2/thread-item.dto.ts +++ b/src/codex/dto/v2/thread-item.dto.ts @@ -67,6 +67,15 @@ export class HookPromptThreadItemDto { fragments!: HookPromptFragmentDto[]; } +/** One non-blocking question embedded in an asynchronous assistant message. */ +export class AsyncUserInputQuestionDto { + @ApiProperty() + title!: string; + + @ApiProperty({ nullable: true, type: [String] }) + options!: string[] | null; +} + /** v2 ThreadItem branch for assistant messages. */ export class AgentMessageThreadItemDto { @ApiProperty({ enum: ['agentMessage'] }) @@ -86,6 +95,9 @@ export class AgentMessageThreadItemDto { oneOf: [{ $ref: getSchemaPath(MemoryCitationDto) }], }) memoryCitation!: MemoryCitationDto | null; + + @ApiProperty({ nullable: true, type: () => [AsyncUserInputQuestionDto] }) + questions!: AsyncUserInputQuestionDto[] | null; } /** v2 ThreadItem branch for standalone function-call outputs. */ diff --git a/src/codex/dto/v2/thread.dto.ts b/src/codex/dto/v2/thread.dto.ts index 6a599cf..d78d9e6 100644 --- a/src/codex/dto/v2/thread.dto.ts +++ b/src/codex/dto/v2/thread.dto.ts @@ -1,5 +1,9 @@ import { ApiProperty } from '@nestjs/swagger'; -import { NULLABLE_STRING_SCHEMA } from './openapi.schema'; +import { + NULLABLE_STRING_SCHEMA, + REASONING_EFFORT_VALUES, + nullableStringEnumSchema, +} from './openapi.schema'; import { sessionSourceSchema } from './session.dto'; import { threadStatusSchema } from './thread-status.dto'; import { TurnDto } from './turn.dto'; @@ -33,6 +37,12 @@ export class ThreadDto { @ApiProperty() modelProvider!: string; + @ApiProperty(NULLABLE_STRING_SCHEMA) + model!: string | null; + + @ApiProperty(nullableStringEnumSchema(REASONING_EFFORT_VALUES)) + reasoningEffort!: string | null; + @ApiProperty() createdAt!: number; diff --git a/src/threads/dto/threads.dto.ts b/src/threads/dto/threads.dto.ts index 727ca44..85a663b 100644 --- a/src/threads/dto/threads.dto.ts +++ b/src/threads/dto/threads.dto.ts @@ -118,11 +118,11 @@ export class StartTurnDto { model?: string; @ApiPropertyOptional({ - enum: ['none', 'minimal', 'low', 'medium', 'high', 'xhigh'], + enum: REASONING_EFFORT_VALUES, description: 'Override reasoning effort for this turn and subsequent turns.', }) - effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; + effort?: ReasoningEffort; } /** Request body for steering the current active turn. */ diff --git a/src/threads/thread-resume-registry.service.ts b/src/threads/thread-resume-registry.service.ts index 2a9339d..28627ff 100644 --- a/src/threads/thread-resume-registry.service.ts +++ b/src/threads/thread-resume-registry.service.ts @@ -160,7 +160,12 @@ export class ThreadResumeRegistryService { ]); return this.toWritableOpen({ ...cached, - thread: { ...metadata.thread, turns: [] }, + thread: { + ...metadata.thread, + model: metadata.thread.model, + reasoningEffort: metadata.thread.reasoningEffort, + turns: [], + }, cwd: metadata.thread.cwd, initialTurnsPage, turnsBackwardsCursor: initialTurnsPage.backwardsCursor, @@ -204,7 +209,12 @@ export class ThreadResumeRegistryService { mode: 'writable', ownership: 'acquired', ownershipRefusalMessage: null, - thread: { ...response.thread, turns: [] }, + thread: { + ...response.thread, + model: response.model ?? null, + reasoningEffort: response.reasoningEffort ?? null, + turns: [], + }, cwd: String(response.cwd), model: response.model ?? null, modelProvider: response.modelProvider ?? null, diff --git a/src/threads/threads-overview.service.ts b/src/threads/threads-overview.service.ts index be5dde5..ee56d36 100644 --- a/src/threads/threads-overview.service.ts +++ b/src/threads/threads-overview.service.ts @@ -279,7 +279,12 @@ export class ThreadsOverviewService { : group.displayThreadId; return { - thread: { ...displayThread, updatedAt: latestActivityAt }, + thread: { + ...displayThread, + model: null, + reasoningEffort: null, + updatedAt: latestActivityAt, + }, treeRootThreadId: group.treeRootThreadId, openThreadId, memberThreadIds: memberIds, diff --git a/web/src/components/chat/model-selector.tsx b/web/src/components/chat/model-selector.tsx index 3e144b6..8a2fb60 100644 --- a/web/src/components/chat/model-selector.tsx +++ b/web/src/components/chat/model-selector.tsx @@ -16,12 +16,13 @@ import { modelsListModelsOptions, } from '@/generated/api/@tanstack/react-query.gen'; import type { ModelDto } from '@/generated/api'; -import { useModelStore } from '@/stores/model-store'; +import { + useModelStore, + type ReasoningEffort, +} from '@/stores/model-store'; import { useTimelineStore } from '@/stores/timeline-store'; import { cn } from '@/lib/utils'; -type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; - /** Fallback effort options when a model doesn't declare its own. */ const DEFAULT_EFFORTS: Array<{ reasoningEffort: ReasoningEffort }> = [ { reasoningEffort: 'none' }, @@ -30,6 +31,8 @@ const DEFAULT_EFFORTS: Array<{ reasoningEffort: ReasoningEffort }> = [ { reasoningEffort: 'medium' }, { reasoningEffort: 'high' }, { reasoningEffort: 'xhigh' }, + { reasoningEffort: 'max' }, + { reasoningEffort: 'ultra' }, ]; /** Short display label for a model. */ diff --git a/web/src/components/chat/turn-items/agent-message-item.tsx b/web/src/components/chat/turn-items/agent-message-item.tsx index b3a6891..a15b00a 100644 --- a/web/src/components/chat/turn-items/agent-message-item.tsx +++ b/web/src/components/chat/turn-items/agent-message-item.tsx @@ -9,6 +9,27 @@ export function AgentMessageItem({ item }: Props) { return (
+ {item.questions.length > 0 && ( +
+ {item.questions.map((question, questionIndex) => ( +
+
{question.title}
+ {question.options && question.options.length > 0 && ( +
+ {question.options.map((option, optionIndex) => ( + + {option} + + ))} +
+ )} +
+ ))} +
+ )}
); } diff --git a/web/src/generated/api/index.ts b/web/src/generated/api/index.ts index 7afc1e5..a8e18c7 100644 --- a/web/src/generated/api/index.ts +++ b/web/src/generated/api/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts export { accountCancelLogin, accountLogin, accountLogout, accountReadAccount, accountReadRateLimits, appGetStatus, appsListApps, archiveListArchive, archiveReadEntry, authLogin, authLogout, chatUploadAttachment, codexConfigReadConfig, codexConfigReadRawConfig, codexConfigUpdateConfig, codexConfigUpdateRawConfig, codexFeedbackUploadFeedback, codexStatusGetStatus, codexStatusUpdateApprovalPolicy, codexStatusUpdateSandboxMode, filesAddRoot, filesCopyPath, filesCreateDirectory, filesCreateFile, filesDeletePath, filesDownloadFile, filesGetMetadata, filesGetRoots, filesMovePath, filesReadFile, filesReadTree, filesRenamePath, filesServeFile, filesUploadFiles, filesWriteFile, logsExportDiagnostics, logsListLogs, mcpServersListServers, mcpServersReloadAll, mcpServersStartOauthLogin, modelsListModels, onlyOfficeGetConfig, onlyOfficeHandleCallback, type Options, pendingApprovalsListPending, pendingApprovalsRespond, pluginsInstallPlugin, pluginsListPlugins, pluginsReadPlugin, pluginsUninstallPlugin, settingsGetSetting, settingsListSettings, settingsResetSetting, settingsUpdateSetting, settingsUpdateSettings, skillsListSkills, skillsWriteSkillConfig, threadCommandsClearGoal, threadCommandsListCollaborationModes, threadCommandsReadCollaborationMode, threadCommandsReadGoal, threadCommandsSetCollaborationMode, threadCommandsSetGoal, threadCommandsStartReview, threadsArchiveThread, threadsCompactThread, threadsCountTurns, threadsCreateMessageBranch, threadsDeletionDeleteThread, threadsDeletionPreviewDelete, threadsDeletionReadBranchAdoptionStatus, threadsForkThread, threadsInterruptTurn, threadsListBranchTrees, threadsListLoadedThreads, threadsListOverview, threadsListThreads, threadsListTurnItems, threadsListTurns, threadsReadBranchState, threadsReadBranchTree, threadsReadThread, threadsResumeThread, threadsSetThreadName, threadsStartThread, threadsStartTurn, threadsSteerTurn, threadsUnarchiveThread, tokenUsageReadThreadTokenUsage, turnDiffReadThreadTurnDiffs, turnErrorsReadThreadTurnErrors } from './sdk.gen'; -export type { AccountCancelLoginData, AccountCancelLoginError, AccountCancelLoginErrors, AccountCancelLoginResponse, AccountCancelLoginResponses, AccountDto, AccountErrorDto, AccountLoginData, AccountLoginError, AccountLoginErrors, AccountLoginResponse, AccountLoginResponses, AccountLogoutData, AccountLogoutError, AccountLogoutErrors, AccountLogoutResponse, AccountLogoutResponses, AccountProviderDto, AccountRateLimitsResponseDto, AccountReadAccountData, AccountReadAccountError, AccountReadAccountErrors, AccountReadAccountResponse, AccountReadAccountResponses, AccountReadRateLimitsData, AccountReadRateLimitsError, AccountReadRateLimitsErrors, AccountReadRateLimitsResponse, AccountReadRateLimitsResponses, AccountReadResponseDto, AddWorkspaceRootRequestDto, AgentMessageThreadItemDto, ApiErrorResponseDto, AppBrandingDto, AppGetStatusData, AppGetStatusResponse, AppGetStatusResponses, AppInfoDto, AppMetadataDto, AppReviewDto, AppScreenshotDto, AppsListAppsData, AppsListAppsError, AppsListAppsErrors, AppsListAppsResponse, AppsListAppsResponses, AppsListResponseDto, ArchiveEntryDto, ArchiveListArchiveData, ArchiveListArchiveError, ArchiveListArchiveErrors, ArchiveListArchiveResponse, ArchiveListArchiveResponses, ArchiveListResponseDto, ArchiveReadEntryData, ArchiveReadEntryError, ArchiveReadEntryErrors, ArchiveReadEntryResponses, AuthLoginData, AuthLoginError, AuthLoginErrors, AuthLoginResponse, AuthLoginResponses, AuthLogoutData, AuthLogoutResponse, AuthLogoutResponses, BatchUpdateSettingDto, BatchUpdateSettingsDto, BranchAdoptionDiagnosticDto, BranchAdoptionStatusDto, BranchGroupDto, BranchStateDto, BranchTreeDto, BranchTreeMemberDto, BranchVersionDto, ByteRangeDto, CancelLoginAccountDto, ChatUploadAttachmentData, ChatUploadAttachmentError, ChatUploadAttachmentErrors, ChatUploadAttachmentResponse, ChatUploadAttachmentResponses, ChatUploadResponseDto, ClientOptions, CodexAccountStatusDto, CodexActiveTurnNotSteerableDto, CodexActiveTurnNotSteerablePayloadDto, CodexAppServerStatusDto, CodexConfigReadConfigData, CodexConfigReadConfigError, CodexConfigReadConfigErrors, CodexConfigReadConfigResponse, CodexConfigReadConfigResponses, CodexConfigReadRawConfigData, CodexConfigReadRawConfigError, CodexConfigReadRawConfigErrors, CodexConfigReadRawConfigResponse, CodexConfigReadRawConfigResponses, CodexConfigResponseDto, CodexConfigStatusDto, CodexConfigSummaryDto, CodexConfigUpdateConfigData, CodexConfigUpdateConfigError, CodexConfigUpdateConfigErrors, CodexConfigUpdateConfigResponse, CodexConfigUpdateConfigResponses, CodexConfigUpdateRawConfigData, CodexConfigUpdateRawConfigError, CodexConfigUpdateRawConfigErrors, CodexConfigUpdateRawConfigResponse, CodexConfigUpdateRawConfigResponses, CodexFeedbackUploadFeedbackData, CodexFeedbackUploadFeedbackError, CodexFeedbackUploadFeedbackErrors, CodexFeedbackUploadFeedbackResponse, CodexFeedbackUploadFeedbackResponses, CodexHttpConnectionFailedDto, CodexHttpStatusCodePayloadDto, CodexInitializeStatusDto, CodexModelsStatusDto, CodexProviderStatusDto, CodexResponseStreamConnectionFailedDto, CodexResponseStreamDisconnectedDto, CodexResponseTooManyFailedAttemptsDto, CodexRuntimeStatusDto, CodexStatusErrorDto, CodexStatusGetStatusData, CodexStatusGetStatusError, CodexStatusGetStatusErrors, CodexStatusGetStatusResponse, CodexStatusGetStatusResponses, CodexStatusResponseDto, CodexStatusUpdateApprovalPolicyData, CodexStatusUpdateApprovalPolicyError, CodexStatusUpdateApprovalPolicyErrors, CodexStatusUpdateApprovalPolicyResponse, CodexStatusUpdateApprovalPolicyResponses, CodexStatusUpdateSandboxModeData, CodexStatusUpdateSandboxModeError, CodexStatusUpdateSandboxModeErrors, CodexStatusUpdateSandboxModeResponse, CodexStatusUpdateSandboxModeResponses, CollabAgentStateDto, CollabAgentToolCallThreadItemDto, CollaborationModePresetDto, CollaborationModesResponseDto, CommandActionListFilesDto, CommandActionReadDto, CommandActionSearchDto, CommandActionUnknownDto, CommandExecutionThreadItemDto, ConfigEditDto, ContextCompactionThreadItemDto, CopyPathRequestDto, CopyPathResponseDto, CreateDirectoryRequestDto, CreateDirectoryResponseDto, CreateFileRequestDto, CreateFileResponseDto, CreateMessageBranchDto, CreateMessageBranchResponseDto, CreateThreadDto, CreditsSnapshotDto, DynamicToolCallOutputInputAudioDto, DynamicToolCallOutputInputImageDto, DynamicToolCallOutputInputTextDto, DynamicToolCallThreadItemDto, EnteredReviewModeThreadItemDto, ExitedReviewModeThreadItemDto, FeedbackUploadRequestDto, FeedbackUploadResponseDto, FileChangeThreadItemDto, FileEntryDto, FileMetadataDto, FileReadResponseDto, FilesAddRootData, FilesAddRootError, FilesAddRootErrors, FilesAddRootResponse, FilesAddRootResponses, FilesCopyPathData, FilesCopyPathError, FilesCopyPathErrors, FilesCopyPathResponse, FilesCopyPathResponses, FilesCreateDirectoryData, FilesCreateDirectoryError, FilesCreateDirectoryErrors, FilesCreateDirectoryResponse, FilesCreateDirectoryResponses, FilesCreateFileData, FilesCreateFileError, FilesCreateFileErrors, FilesCreateFileResponse, FilesCreateFileResponses, FilesDeletePathData, FilesDeletePathError, FilesDeletePathErrors, FilesDeletePathResponse, FilesDeletePathResponses, FilesDownloadFileData, FilesDownloadFileError, FilesDownloadFileErrors, FilesGetMetadataData, FilesGetMetadataError, FilesGetMetadataErrors, FilesGetMetadataResponse, FilesGetMetadataResponses, FilesGetRootsData, FilesGetRootsError, FilesGetRootsErrors, FilesGetRootsResponse, FilesGetRootsResponses, FilesMovePathData, FilesMovePathError, FilesMovePathErrors, FilesMovePathResponse, FilesMovePathResponses, FilesReadFileData, FilesReadFileError, FilesReadFileErrors, FilesReadFileResponse, FilesReadFileResponses, FilesReadTreeData, FilesReadTreeError, FilesReadTreeErrors, FilesReadTreeResponse, FilesReadTreeResponses, FilesRenamePathData, FilesRenamePathError, FilesRenamePathErrors, FilesRenamePathResponse, FilesRenamePathResponses, FilesServeFileData, FilesServeFileError, FilesServeFileErrors, FilesUploadFilesData, FilesUploadFilesError, FilesUploadFilesErrors, FilesUploadFilesResponse, FilesUploadFilesResponses, FilesWriteFileData, FilesWriteFileError, FilesWriteFileErrors, FilesWriteFileResponse, FilesWriteFileResponses, FileUpdateChangeDto, ForkThreadDto, FunctionCallOutputEncryptedContentDto, FunctionCallOutputInputAudioDto, FunctionCallOutputInputImageDto, FunctionCallOutputInputTextDto, FunctionCallOutputThreadItemDto, GitInfoDto, GranularApprovalOptionsDto, GranularApprovalPolicyDto, HookPromptFragmentDto, HookPromptThreadItemDto, ImageGenerationThreadItemDto, ImageGenerationUsageLimitExceededFailureDto, ImageViewThreadItemDto, LogEntryDto, LoginAccountDto, LoginAccountResponseDto, LoginRequestDto, LoginResponseDto, LogsExportDiagnosticsData, LogsExportDiagnosticsError, LogsExportDiagnosticsErrors, LogsExportDiagnosticsResponse, LogsExportDiagnosticsResponses, LogsExportResponseDto, LogsListLogsData, LogsListLogsError, LogsListLogsErrors, LogsListLogsResponse, LogsListLogsResponses, LogsResponseDto, LogsSystemInfoDto, MarketplaceInterfaceDto, MarketplaceLoadErrorInfoDto, McpServerOauthLoginRequestDto, McpServerOauthLoginResponseDto, McpServersListResponseDto, McpServersListServersData, McpServersListServersError, McpServersListServersErrors, McpServersListServersResponse, McpServersListServersResponses, McpServersReloadAllData, McpServersReloadAllError, McpServersReloadAllErrors, McpServersReloadAllResponse, McpServersReloadAllResponses, McpServersStartOauthLoginData, McpServersStartOauthLoginError, McpServersStartOauthLoginErrors, McpServersStartOauthLoginResponse, McpServersStartOauthLoginResponses, McpToolCallErrorDto, McpToolCallResultDto, McpToolCallThreadItemDto, MemoryCitationDto, MemoryCitationEntryDto, MisalignmentDetailsDto, ModelAvailabilityNuxDto, ModelDto, ModelListResponseDto, ModelsListModelsData, ModelsListModelsError, ModelsListModelsErrors, ModelsListModelsResponse, ModelsListModelsResponses, ModelUpgradeInfoDto, MovePathRequestDto, MovePathResponseDto, OkResponseDto, OnlyOfficeCallbackDto, OnlyOfficeConfigResponseDto, OnlyOfficeGetConfigData, OnlyOfficeGetConfigError, OnlyOfficeGetConfigErrors, OnlyOfficeGetConfigResponse, OnlyOfficeGetConfigResponses, OnlyOfficeHandleCallbackData, OnlyOfficeHandleCallbackResponse, OnlyOfficeHandleCallbackResponses, PatchChangeKindAddDto, PatchChangeKindDeleteDto, PatchChangeKindUpdateDto, PendingApprovalsListPendingData, PendingApprovalsListPendingResponse, PendingApprovalsListPendingResponses, PendingApprovalsRespondData, PendingApprovalsRespondResponse, PendingApprovalsRespondResponses, PendingServerRequestDto, PendingServerRequestsResponseDto, PersistedTurnErrorDto, PlanThreadItemDto, PluginAppSummaryDto, PluginDetailDto, PluginInstallRequestDto, PluginInstallResponseDto, PluginInterfaceDto, PluginListResponseDto, PluginMarketplaceEntryDto, PluginReadResponseDto, PluginsInstallPluginData, PluginsInstallPluginError, PluginsInstallPluginErrors, PluginsInstallPluginResponse, PluginsInstallPluginResponses, PluginSkillSummaryDto, PluginsListPluginsData, PluginsListPluginsError, PluginsListPluginsErrors, PluginsListPluginsResponse, PluginsListPluginsResponses, PluginsReadPluginData, PluginsReadPluginError, PluginsReadPluginErrors, PluginsReadPluginResponse, PluginsReadPluginResponses, PluginSummaryDto, PluginsUninstallPluginData, PluginsUninstallPluginError, PluginsUninstallPluginErrors, PluginsUninstallPluginResponse, PluginsUninstallPluginResponses, PluginUninstallRequestDto, PluginUninstallResponseDto, RateLimitSnapshotDto, RateLimitWindowDto, RawConfigResponseDto, RawConfigWriteResponseDto, ReadOnlyAccessFullAccessDto, ReadOnlyAccessRestrictedDto, ReasoningEffortOptionDto, ReasoningThreadItemDto, RenamePathRequestDto, RenamePathResponseDto, RespondPendingServerRequestDto, ReviewBaseBranchTargetDto, ReviewCommitTargetDto, ReviewCustomTargetDto, ReviewStartResponseDto, ReviewUncommittedChangesTargetDto, SandboxDangerFullAccessDto, SandboxExternalSandboxDto, SandboxReadOnlyDto, SandboxWorkspaceWriteDto, SessionSourceCustomDto, SessionSourceSubAgentDto, SetThreadCollaborationModeDto, SetThreadGoalDto, SettingConstraintsDto, SettingDto, SettingsGetSettingData, SettingsGetSettingError, SettingsGetSettingErrors, SettingsGetSettingResponse, SettingsGetSettingResponses, SettingsListResponseDto, SettingsListSettingsData, SettingsListSettingsError, SettingsListSettingsErrors, SettingsListSettingsResponse, SettingsListSettingsResponses, SettingsResetSettingData, SettingsResetSettingError, SettingsResetSettingErrors, SettingsResetSettingResponse, SettingsResetSettingResponses, SettingsUpdateSettingData, SettingsUpdateSettingError, SettingsUpdateSettingErrors, SettingsUpdateSettingResponse, SettingsUpdateSettingResponses, SettingsUpdateSettingsData, SettingsUpdateSettingsError, SettingsUpdateSettingsErrors, SettingsUpdateSettingsResponse, SettingsUpdateSettingsResponses, SkillsConfigWriteRequestDto, SkillsConfigWriteResponseDto, SkillsListResponseDto, SkillsListSkillsData, SkillsListSkillsError, SkillsListSkillsErrors, SkillsListSkillsResponse, SkillsListSkillsResponses, SkillsWriteSkillConfigData, SkillsWriteSkillConfigError, SkillsWriteSkillConfigErrors, SkillsWriteSkillConfigResponse, SkillsWriteSkillConfigResponses, SleepThreadItemDto, StartReviewDto, StartTurnDto, StatusResponseDto, SteerTurnDto, SubAgentActivityThreadItemDto, SubAgentOtherSourceDto, SubAgentThreadSpawnPayloadDto, SubAgentThreadSpawnSourceDto, TextElementDto, ThreadCollaborationModeStateDto, ThreadCommandsClearGoalData, ThreadCommandsClearGoalError, ThreadCommandsClearGoalErrors, ThreadCommandsClearGoalResponse, ThreadCommandsClearGoalResponses, ThreadCommandsListCollaborationModesData, ThreadCommandsListCollaborationModesError, ThreadCommandsListCollaborationModesErrors, ThreadCommandsListCollaborationModesResponse, ThreadCommandsListCollaborationModesResponses, ThreadCommandsReadCollaborationModeData, ThreadCommandsReadCollaborationModeError, ThreadCommandsReadCollaborationModeErrors, ThreadCommandsReadCollaborationModeResponse, ThreadCommandsReadCollaborationModeResponses, ThreadCommandsReadGoalData, ThreadCommandsReadGoalError, ThreadCommandsReadGoalErrors, ThreadCommandsReadGoalResponse, ThreadCommandsReadGoalResponses, ThreadCommandsSetCollaborationModeData, ThreadCommandsSetCollaborationModeError, ThreadCommandsSetCollaborationModeErrors, ThreadCommandsSetCollaborationModeResponse, ThreadCommandsSetCollaborationModeResponses, ThreadCommandsSetGoalData, ThreadCommandsSetGoalError, ThreadCommandsSetGoalErrors, ThreadCommandsSetGoalResponse, ThreadCommandsSetGoalResponses, ThreadCommandsStartReviewData, ThreadCommandsStartReviewError, ThreadCommandsStartReviewErrors, ThreadCommandsStartReviewResponse, ThreadCommandsStartReviewResponses, ThreadDeleteBlockerDto, ThreadDeleteFailureDto, ThreadDeletePlanThreadDto, ThreadDeletePreviewDto, ThreadDeleteRequestDto, ThreadDeleteResultDto, ThreadDto, ThreadForkResponseDto, ThreadGoalClearResponseDto, ThreadGoalDto, ThreadGoalResponseDto, ThreadGoalSetResponseDto, ThreadListResponseDto, ThreadLoadedListResponseDto, ThreadOpenResponseDto, ThreadOverviewResponseDto, ThreadOverviewRowDto, ThreadReadResponseDto, ThreadResumeResponseDto, ThreadsArchiveThreadData, ThreadsArchiveThreadError, ThreadsArchiveThreadErrors, ThreadsArchiveThreadResponse, ThreadsArchiveThreadResponses, ThreadsCompactThreadData, ThreadsCompactThreadError, ThreadsCompactThreadErrors, ThreadsCompactThreadResponse, ThreadsCompactThreadResponses, ThreadsCountTurnsData, ThreadsCountTurnsError, ThreadsCountTurnsErrors, ThreadsCountTurnsResponse, ThreadsCountTurnsResponses, ThreadsCreateMessageBranchData, ThreadsCreateMessageBranchError, ThreadsCreateMessageBranchErrors, ThreadsCreateMessageBranchResponse, ThreadsCreateMessageBranchResponses, ThreadsDeletionDeleteThreadData, ThreadsDeletionDeleteThreadError, ThreadsDeletionDeleteThreadErrors, ThreadsDeletionDeleteThreadResponse, ThreadsDeletionDeleteThreadResponses, ThreadsDeletionPreviewDeleteData, ThreadsDeletionPreviewDeleteError, ThreadsDeletionPreviewDeleteErrors, ThreadsDeletionPreviewDeleteResponse, ThreadsDeletionPreviewDeleteResponses, ThreadsDeletionReadBranchAdoptionStatusData, ThreadsDeletionReadBranchAdoptionStatusError, ThreadsDeletionReadBranchAdoptionStatusErrors, ThreadsDeletionReadBranchAdoptionStatusResponse, ThreadsDeletionReadBranchAdoptionStatusResponses, ThreadSetNameRequestDto, ThreadsForkThreadData, ThreadsForkThreadError, ThreadsForkThreadErrors, ThreadsForkThreadResponse, ThreadsForkThreadResponses, ThreadsInterruptTurnData, ThreadsInterruptTurnError, ThreadsInterruptTurnErrors, ThreadsInterruptTurnResponse, ThreadsInterruptTurnResponses, ThreadsListBranchTreesData, ThreadsListBranchTreesError, ThreadsListBranchTreesErrors, ThreadsListBranchTreesResponse, ThreadsListBranchTreesResponses, ThreadsListLoadedThreadsData, ThreadsListLoadedThreadsError, ThreadsListLoadedThreadsErrors, ThreadsListLoadedThreadsResponse, ThreadsListLoadedThreadsResponses, ThreadsListOverviewData, ThreadsListOverviewError, ThreadsListOverviewErrors, ThreadsListOverviewResponse, ThreadsListOverviewResponses, ThreadsListThreadsData, ThreadsListThreadsError, ThreadsListThreadsErrors, ThreadsListThreadsResponse, ThreadsListThreadsResponses, ThreadsListTurnItemsData, ThreadsListTurnItemsError, ThreadsListTurnItemsErrors, ThreadsListTurnItemsResponse, ThreadsListTurnItemsResponses, ThreadsListTurnsData, ThreadsListTurnsError, ThreadsListTurnsErrors, ThreadsListTurnsResponse, ThreadsListTurnsResponses, ThreadsReadBranchStateData, ThreadsReadBranchStateError, ThreadsReadBranchStateErrors, ThreadsReadBranchStateResponse, ThreadsReadBranchStateResponses, ThreadsReadBranchTreeData, ThreadsReadBranchTreeError, ThreadsReadBranchTreeErrors, ThreadsReadBranchTreeResponse, ThreadsReadBranchTreeResponses, ThreadsReadThreadData, ThreadsReadThreadError, ThreadsReadThreadErrors, ThreadsReadThreadResponse, ThreadsReadThreadResponses, ThreadsResumeThreadData, ThreadsResumeThreadError, ThreadsResumeThreadErrors, ThreadsResumeThreadResponse, ThreadsResumeThreadResponses, ThreadsSetThreadNameData, ThreadsSetThreadNameError, ThreadsSetThreadNameErrors, ThreadsSetThreadNameResponse, ThreadsSetThreadNameResponses, ThreadsStartThreadData, ThreadsStartThreadError, ThreadsStartThreadErrors, ThreadsStartThreadResponse, ThreadsStartThreadResponses, ThreadsStartTurnData, ThreadsStartTurnError, ThreadsStartTurnErrors, ThreadsStartTurnResponse, ThreadsStartTurnResponses, ThreadsSteerTurnData, ThreadsSteerTurnError, ThreadsSteerTurnErrors, ThreadsSteerTurnResponse, ThreadsSteerTurnResponses, ThreadStartResponseDto, ThreadStatusActiveDto, ThreadStatusIdleDto, ThreadStatusNotLoadedDto, ThreadStatusSystemErrorDto, ThreadsUnarchiveThreadData, ThreadsUnarchiveThreadError, ThreadsUnarchiveThreadErrors, ThreadsUnarchiveThreadResponse, ThreadsUnarchiveThreadResponses, ThreadTokenUsageDto, ThreadTokenUsageResponseDto, ThreadTurnCountDto, ThreadTurnCountsRequestDto, ThreadTurnCountsResponseDto, ThreadTurnDiffsResponseDto, ThreadTurnErrorsResponseDto, ThreadTurnItemsResponseDto, ThreadTurnsPageDto, ThreadUnarchiveResponseDto, TokenUsageBreakdownDto, TokenUsageReadThreadTokenUsageData, TokenUsageReadThreadTokenUsageError, TokenUsageReadThreadTokenUsageErrors, TokenUsageReadThreadTokenUsageResponse, TokenUsageReadThreadTokenUsageResponses, TurnDiffEntryDto, TurnDiffReadThreadTurnDiffsData, TurnDiffReadThreadTurnDiffsError, TurnDiffReadThreadTurnDiffsErrors, TurnDiffReadThreadTurnDiffsResponse, TurnDiffReadThreadTurnDiffsResponses, TurnDto, TurnErrorDto, TurnErrorsReadThreadTurnErrorsData, TurnErrorsReadThreadTurnErrorsError, TurnErrorsReadThreadTurnErrorsErrors, TurnErrorsReadThreadTurnErrorsResponse, TurnErrorsReadThreadTurnErrorsResponses, TurnStartResponseDto, TurnSteerResponseDto, TurnTokenUsageDto, UpdateApprovalPolicyDto, UpdateCodexConfigDto, UpdateRawConfigDto, UpdateSandboxModeDto, UpdateSettingDto, UploadedFileDto, UploadFilesResponseDto, UserInputImageDto, UserInputLocalImageDto, UserInputMentionDto, UserInputSkillDto, UserInputTextDto, UserMessageThreadItemDto, WebSearchActionFindInPageDto, WebSearchActionOpenPageDto, WebSearchActionOtherDto, WebSearchActionSearchDto, WebSearchThreadItemDto, WorkspaceRootsResponseDto, WriteFileRequestDto, WriteFileResponseDto } from './types.gen'; +export type { AccountCancelLoginData, AccountCancelLoginError, AccountCancelLoginErrors, AccountCancelLoginResponse, AccountCancelLoginResponses, AccountDto, AccountErrorDto, AccountLoginData, AccountLoginError, AccountLoginErrors, AccountLoginResponse, AccountLoginResponses, AccountLogoutData, AccountLogoutError, AccountLogoutErrors, AccountLogoutResponse, AccountLogoutResponses, AccountProviderDto, AccountRateLimitsResponseDto, AccountReadAccountData, AccountReadAccountError, AccountReadAccountErrors, AccountReadAccountResponse, AccountReadAccountResponses, AccountReadRateLimitsData, AccountReadRateLimitsError, AccountReadRateLimitsErrors, AccountReadRateLimitsResponse, AccountReadRateLimitsResponses, AccountReadResponseDto, AddWorkspaceRootRequestDto, AgentMessageThreadItemDto, ApiErrorResponseDto, AppBrandingDto, AppGetStatusData, AppGetStatusResponse, AppGetStatusResponses, AppInfoDto, AppMetadataDto, AppReviewDto, AppScreenshotDto, AppsListAppsData, AppsListAppsError, AppsListAppsErrors, AppsListAppsResponse, AppsListAppsResponses, AppsListResponseDto, ArchiveEntryDto, ArchiveListArchiveData, ArchiveListArchiveError, ArchiveListArchiveErrors, ArchiveListArchiveResponse, ArchiveListArchiveResponses, ArchiveListResponseDto, ArchiveReadEntryData, ArchiveReadEntryError, ArchiveReadEntryErrors, ArchiveReadEntryResponses, AsyncUserInputQuestionDto, AuthLoginData, AuthLoginError, AuthLoginErrors, AuthLoginResponse, AuthLoginResponses, AuthLogoutData, AuthLogoutResponse, AuthLogoutResponses, BatchUpdateSettingDto, BatchUpdateSettingsDto, BranchAdoptionDiagnosticDto, BranchAdoptionStatusDto, BranchGroupDto, BranchStateDto, BranchTreeDto, BranchTreeMemberDto, BranchVersionDto, ByteRangeDto, CancelLoginAccountDto, ChatUploadAttachmentData, ChatUploadAttachmentError, ChatUploadAttachmentErrors, ChatUploadAttachmentResponse, ChatUploadAttachmentResponses, ChatUploadResponseDto, ClientOptions, CodexAccountStatusDto, CodexActiveTurnNotSteerableDto, CodexActiveTurnNotSteerablePayloadDto, CodexAppServerStatusDto, CodexConfigReadConfigData, CodexConfigReadConfigError, CodexConfigReadConfigErrors, CodexConfigReadConfigResponse, CodexConfigReadConfigResponses, CodexConfigReadRawConfigData, CodexConfigReadRawConfigError, CodexConfigReadRawConfigErrors, CodexConfigReadRawConfigResponse, CodexConfigReadRawConfigResponses, CodexConfigResponseDto, CodexConfigStatusDto, CodexConfigSummaryDto, CodexConfigUpdateConfigData, CodexConfigUpdateConfigError, CodexConfigUpdateConfigErrors, CodexConfigUpdateConfigResponse, CodexConfigUpdateConfigResponses, CodexConfigUpdateRawConfigData, CodexConfigUpdateRawConfigError, CodexConfigUpdateRawConfigErrors, CodexConfigUpdateRawConfigResponse, CodexConfigUpdateRawConfigResponses, CodexFeedbackUploadFeedbackData, CodexFeedbackUploadFeedbackError, CodexFeedbackUploadFeedbackErrors, CodexFeedbackUploadFeedbackResponse, CodexFeedbackUploadFeedbackResponses, CodexHttpConnectionFailedDto, CodexHttpStatusCodePayloadDto, CodexInitializeStatusDto, CodexModelsStatusDto, CodexProviderStatusDto, CodexResponseStreamConnectionFailedDto, CodexResponseStreamDisconnectedDto, CodexResponseTooManyFailedAttemptsDto, CodexRuntimeStatusDto, CodexStatusErrorDto, CodexStatusGetStatusData, CodexStatusGetStatusError, CodexStatusGetStatusErrors, CodexStatusGetStatusResponse, CodexStatusGetStatusResponses, CodexStatusResponseDto, CodexStatusUpdateApprovalPolicyData, CodexStatusUpdateApprovalPolicyError, CodexStatusUpdateApprovalPolicyErrors, CodexStatusUpdateApprovalPolicyResponse, CodexStatusUpdateApprovalPolicyResponses, CodexStatusUpdateSandboxModeData, CodexStatusUpdateSandboxModeError, CodexStatusUpdateSandboxModeErrors, CodexStatusUpdateSandboxModeResponse, CodexStatusUpdateSandboxModeResponses, CollabAgentStateDto, CollabAgentToolCallThreadItemDto, CollaborationModePresetDto, CollaborationModesResponseDto, CommandActionListFilesDto, CommandActionReadDto, CommandActionSearchDto, CommandActionUnknownDto, CommandExecutionThreadItemDto, ConfigEditDto, ContextCompactionThreadItemDto, CopyPathRequestDto, CopyPathResponseDto, CreateDirectoryRequestDto, CreateDirectoryResponseDto, CreateFileRequestDto, CreateFileResponseDto, CreateMessageBranchDto, CreateMessageBranchResponseDto, CreateThreadDto, CreditsSnapshotDto, DynamicToolCallOutputInputAudioDto, DynamicToolCallOutputInputImageDto, DynamicToolCallOutputInputTextDto, DynamicToolCallThreadItemDto, EnteredReviewModeThreadItemDto, ExitedReviewModeThreadItemDto, FeedbackUploadRequestDto, FeedbackUploadResponseDto, FileChangeThreadItemDto, FileEntryDto, FileMetadataDto, FileReadResponseDto, FilesAddRootData, FilesAddRootError, FilesAddRootErrors, FilesAddRootResponse, FilesAddRootResponses, FilesCopyPathData, FilesCopyPathError, FilesCopyPathErrors, FilesCopyPathResponse, FilesCopyPathResponses, FilesCreateDirectoryData, FilesCreateDirectoryError, FilesCreateDirectoryErrors, FilesCreateDirectoryResponse, FilesCreateDirectoryResponses, FilesCreateFileData, FilesCreateFileError, FilesCreateFileErrors, FilesCreateFileResponse, FilesCreateFileResponses, FilesDeletePathData, FilesDeletePathError, FilesDeletePathErrors, FilesDeletePathResponse, FilesDeletePathResponses, FilesDownloadFileData, FilesDownloadFileError, FilesDownloadFileErrors, FilesGetMetadataData, FilesGetMetadataError, FilesGetMetadataErrors, FilesGetMetadataResponse, FilesGetMetadataResponses, FilesGetRootsData, FilesGetRootsError, FilesGetRootsErrors, FilesGetRootsResponse, FilesGetRootsResponses, FilesMovePathData, FilesMovePathError, FilesMovePathErrors, FilesMovePathResponse, FilesMovePathResponses, FilesReadFileData, FilesReadFileError, FilesReadFileErrors, FilesReadFileResponse, FilesReadFileResponses, FilesReadTreeData, FilesReadTreeError, FilesReadTreeErrors, FilesReadTreeResponse, FilesReadTreeResponses, FilesRenamePathData, FilesRenamePathError, FilesRenamePathErrors, FilesRenamePathResponse, FilesRenamePathResponses, FilesServeFileData, FilesServeFileError, FilesServeFileErrors, FilesUploadFilesData, FilesUploadFilesError, FilesUploadFilesErrors, FilesUploadFilesResponse, FilesUploadFilesResponses, FilesWriteFileData, FilesWriteFileError, FilesWriteFileErrors, FilesWriteFileResponse, FilesWriteFileResponses, FileUpdateChangeDto, ForkThreadDto, FunctionCallOutputEncryptedContentDto, FunctionCallOutputInputAudioDto, FunctionCallOutputInputImageDto, FunctionCallOutputInputTextDto, FunctionCallOutputThreadItemDto, GitInfoDto, GranularApprovalOptionsDto, GranularApprovalPolicyDto, HookPromptFragmentDto, HookPromptThreadItemDto, ImageGenerationThreadItemDto, ImageGenerationUsageLimitExceededFailureDto, ImageViewThreadItemDto, LogEntryDto, LoginAccountDto, LoginAccountResponseDto, LoginRequestDto, LoginResponseDto, LogsExportDiagnosticsData, LogsExportDiagnosticsError, LogsExportDiagnosticsErrors, LogsExportDiagnosticsResponse, LogsExportDiagnosticsResponses, LogsExportResponseDto, LogsListLogsData, LogsListLogsError, LogsListLogsErrors, LogsListLogsResponse, LogsListLogsResponses, LogsResponseDto, LogsSystemInfoDto, MarketplaceInterfaceDto, MarketplaceLoadErrorInfoDto, McpServerOauthLoginRequestDto, McpServerOauthLoginResponseDto, McpServersListResponseDto, McpServersListServersData, McpServersListServersError, McpServersListServersErrors, McpServersListServersResponse, McpServersListServersResponses, McpServersReloadAllData, McpServersReloadAllError, McpServersReloadAllErrors, McpServersReloadAllResponse, McpServersReloadAllResponses, McpServersStartOauthLoginData, McpServersStartOauthLoginError, McpServersStartOauthLoginErrors, McpServersStartOauthLoginResponse, McpServersStartOauthLoginResponses, McpToolCallErrorDto, McpToolCallResultDto, McpToolCallThreadItemDto, MemoryCitationDto, MemoryCitationEntryDto, MisalignmentDetailsDto, ModelAvailabilityNuxDto, ModelDto, ModelListResponseDto, ModelsListModelsData, ModelsListModelsError, ModelsListModelsErrors, ModelsListModelsResponse, ModelsListModelsResponses, ModelUpgradeInfoDto, MovePathRequestDto, MovePathResponseDto, OkResponseDto, OnlyOfficeCallbackDto, OnlyOfficeConfigResponseDto, OnlyOfficeGetConfigData, OnlyOfficeGetConfigError, OnlyOfficeGetConfigErrors, OnlyOfficeGetConfigResponse, OnlyOfficeGetConfigResponses, OnlyOfficeHandleCallbackData, OnlyOfficeHandleCallbackResponse, OnlyOfficeHandleCallbackResponses, PatchChangeKindAddDto, PatchChangeKindDeleteDto, PatchChangeKindUpdateDto, PendingApprovalsListPendingData, PendingApprovalsListPendingResponse, PendingApprovalsListPendingResponses, PendingApprovalsRespondData, PendingApprovalsRespondResponse, PendingApprovalsRespondResponses, PendingServerRequestDto, PendingServerRequestsResponseDto, PersistedTurnErrorDto, PlanThreadItemDto, PluginAppSummaryDto, PluginDetailDto, PluginInstallRequestDto, PluginInstallResponseDto, PluginInterfaceDto, PluginListResponseDto, PluginMarketplaceEntryDto, PluginReadResponseDto, PluginsInstallPluginData, PluginsInstallPluginError, PluginsInstallPluginErrors, PluginsInstallPluginResponse, PluginsInstallPluginResponses, PluginSkillSummaryDto, PluginsListPluginsData, PluginsListPluginsError, PluginsListPluginsErrors, PluginsListPluginsResponse, PluginsListPluginsResponses, PluginsReadPluginData, PluginsReadPluginError, PluginsReadPluginErrors, PluginsReadPluginResponse, PluginsReadPluginResponses, PluginSummaryDto, PluginsUninstallPluginData, PluginsUninstallPluginError, PluginsUninstallPluginErrors, PluginsUninstallPluginResponse, PluginsUninstallPluginResponses, PluginUninstallRequestDto, PluginUninstallResponseDto, RateLimitSnapshotDto, RateLimitWindowDto, RawConfigResponseDto, RawConfigWriteResponseDto, ReadOnlyAccessFullAccessDto, ReadOnlyAccessRestrictedDto, ReasoningEffortOptionDto, ReasoningThreadItemDto, RenamePathRequestDto, RenamePathResponseDto, RespondPendingServerRequestDto, ReviewBaseBranchTargetDto, ReviewCommitTargetDto, ReviewCustomTargetDto, ReviewStartResponseDto, ReviewUncommittedChangesTargetDto, SandboxDangerFullAccessDto, SandboxExternalSandboxDto, SandboxReadOnlyDto, SandboxWorkspaceWriteDto, SessionSourceCustomDto, SessionSourceSubAgentDto, SetThreadCollaborationModeDto, SetThreadGoalDto, SettingConstraintsDto, SettingDto, SettingsGetSettingData, SettingsGetSettingError, SettingsGetSettingErrors, SettingsGetSettingResponse, SettingsGetSettingResponses, SettingsListResponseDto, SettingsListSettingsData, SettingsListSettingsError, SettingsListSettingsErrors, SettingsListSettingsResponse, SettingsListSettingsResponses, SettingsResetSettingData, SettingsResetSettingError, SettingsResetSettingErrors, SettingsResetSettingResponse, SettingsResetSettingResponses, SettingsUpdateSettingData, SettingsUpdateSettingError, SettingsUpdateSettingErrors, SettingsUpdateSettingResponse, SettingsUpdateSettingResponses, SettingsUpdateSettingsData, SettingsUpdateSettingsError, SettingsUpdateSettingsErrors, SettingsUpdateSettingsResponse, SettingsUpdateSettingsResponses, SkillsConfigWriteRequestDto, SkillsConfigWriteResponseDto, SkillsListResponseDto, SkillsListSkillsData, SkillsListSkillsError, SkillsListSkillsErrors, SkillsListSkillsResponse, SkillsListSkillsResponses, SkillsWriteSkillConfigData, SkillsWriteSkillConfigError, SkillsWriteSkillConfigErrors, SkillsWriteSkillConfigResponse, SkillsWriteSkillConfigResponses, SleepThreadItemDto, StartReviewDto, StartTurnDto, StatusResponseDto, SteerTurnDto, SubAgentActivityThreadItemDto, SubAgentOtherSourceDto, SubAgentThreadSpawnPayloadDto, SubAgentThreadSpawnSourceDto, TextElementDto, ThreadCollaborationModeStateDto, ThreadCommandsClearGoalData, ThreadCommandsClearGoalError, ThreadCommandsClearGoalErrors, ThreadCommandsClearGoalResponse, ThreadCommandsClearGoalResponses, ThreadCommandsListCollaborationModesData, ThreadCommandsListCollaborationModesError, ThreadCommandsListCollaborationModesErrors, ThreadCommandsListCollaborationModesResponse, ThreadCommandsListCollaborationModesResponses, ThreadCommandsReadCollaborationModeData, ThreadCommandsReadCollaborationModeError, ThreadCommandsReadCollaborationModeErrors, ThreadCommandsReadCollaborationModeResponse, ThreadCommandsReadCollaborationModeResponses, ThreadCommandsReadGoalData, ThreadCommandsReadGoalError, ThreadCommandsReadGoalErrors, ThreadCommandsReadGoalResponse, ThreadCommandsReadGoalResponses, ThreadCommandsSetCollaborationModeData, ThreadCommandsSetCollaborationModeError, ThreadCommandsSetCollaborationModeErrors, ThreadCommandsSetCollaborationModeResponse, ThreadCommandsSetCollaborationModeResponses, ThreadCommandsSetGoalData, ThreadCommandsSetGoalError, ThreadCommandsSetGoalErrors, ThreadCommandsSetGoalResponse, ThreadCommandsSetGoalResponses, ThreadCommandsStartReviewData, ThreadCommandsStartReviewError, ThreadCommandsStartReviewErrors, ThreadCommandsStartReviewResponse, ThreadCommandsStartReviewResponses, ThreadDeleteBlockerDto, ThreadDeleteFailureDto, ThreadDeletePlanThreadDto, ThreadDeletePreviewDto, ThreadDeleteRequestDto, ThreadDeleteResultDto, ThreadDto, ThreadForkResponseDto, ThreadGoalClearResponseDto, ThreadGoalDto, ThreadGoalResponseDto, ThreadGoalSetResponseDto, ThreadListResponseDto, ThreadLoadedListResponseDto, ThreadOpenResponseDto, ThreadOverviewResponseDto, ThreadOverviewRowDto, ThreadReadResponseDto, ThreadResumeResponseDto, ThreadsArchiveThreadData, ThreadsArchiveThreadError, ThreadsArchiveThreadErrors, ThreadsArchiveThreadResponse, ThreadsArchiveThreadResponses, ThreadsCompactThreadData, ThreadsCompactThreadError, ThreadsCompactThreadErrors, ThreadsCompactThreadResponse, ThreadsCompactThreadResponses, ThreadsCountTurnsData, ThreadsCountTurnsError, ThreadsCountTurnsErrors, ThreadsCountTurnsResponse, ThreadsCountTurnsResponses, ThreadsCreateMessageBranchData, ThreadsCreateMessageBranchError, ThreadsCreateMessageBranchErrors, ThreadsCreateMessageBranchResponse, ThreadsCreateMessageBranchResponses, ThreadsDeletionDeleteThreadData, ThreadsDeletionDeleteThreadError, ThreadsDeletionDeleteThreadErrors, ThreadsDeletionDeleteThreadResponse, ThreadsDeletionDeleteThreadResponses, ThreadsDeletionPreviewDeleteData, ThreadsDeletionPreviewDeleteError, ThreadsDeletionPreviewDeleteErrors, ThreadsDeletionPreviewDeleteResponse, ThreadsDeletionPreviewDeleteResponses, ThreadsDeletionReadBranchAdoptionStatusData, ThreadsDeletionReadBranchAdoptionStatusError, ThreadsDeletionReadBranchAdoptionStatusErrors, ThreadsDeletionReadBranchAdoptionStatusResponse, ThreadsDeletionReadBranchAdoptionStatusResponses, ThreadSetNameRequestDto, ThreadsForkThreadData, ThreadsForkThreadError, ThreadsForkThreadErrors, ThreadsForkThreadResponse, ThreadsForkThreadResponses, ThreadsInterruptTurnData, ThreadsInterruptTurnError, ThreadsInterruptTurnErrors, ThreadsInterruptTurnResponse, ThreadsInterruptTurnResponses, ThreadsListBranchTreesData, ThreadsListBranchTreesError, ThreadsListBranchTreesErrors, ThreadsListBranchTreesResponse, ThreadsListBranchTreesResponses, ThreadsListLoadedThreadsData, ThreadsListLoadedThreadsError, ThreadsListLoadedThreadsErrors, ThreadsListLoadedThreadsResponse, ThreadsListLoadedThreadsResponses, ThreadsListOverviewData, ThreadsListOverviewError, ThreadsListOverviewErrors, ThreadsListOverviewResponse, ThreadsListOverviewResponses, ThreadsListThreadsData, ThreadsListThreadsError, ThreadsListThreadsErrors, ThreadsListThreadsResponse, ThreadsListThreadsResponses, ThreadsListTurnItemsData, ThreadsListTurnItemsError, ThreadsListTurnItemsErrors, ThreadsListTurnItemsResponse, ThreadsListTurnItemsResponses, ThreadsListTurnsData, ThreadsListTurnsError, ThreadsListTurnsErrors, ThreadsListTurnsResponse, ThreadsListTurnsResponses, ThreadsReadBranchStateData, ThreadsReadBranchStateError, ThreadsReadBranchStateErrors, ThreadsReadBranchStateResponse, ThreadsReadBranchStateResponses, ThreadsReadBranchTreeData, ThreadsReadBranchTreeError, ThreadsReadBranchTreeErrors, ThreadsReadBranchTreeResponse, ThreadsReadBranchTreeResponses, ThreadsReadThreadData, ThreadsReadThreadError, ThreadsReadThreadErrors, ThreadsReadThreadResponse, ThreadsReadThreadResponses, ThreadsResumeThreadData, ThreadsResumeThreadError, ThreadsResumeThreadErrors, ThreadsResumeThreadResponse, ThreadsResumeThreadResponses, ThreadsSetThreadNameData, ThreadsSetThreadNameError, ThreadsSetThreadNameErrors, ThreadsSetThreadNameResponse, ThreadsSetThreadNameResponses, ThreadsStartThreadData, ThreadsStartThreadError, ThreadsStartThreadErrors, ThreadsStartThreadResponse, ThreadsStartThreadResponses, ThreadsStartTurnData, ThreadsStartTurnError, ThreadsStartTurnErrors, ThreadsStartTurnResponse, ThreadsStartTurnResponses, ThreadsSteerTurnData, ThreadsSteerTurnError, ThreadsSteerTurnErrors, ThreadsSteerTurnResponse, ThreadsSteerTurnResponses, ThreadStartResponseDto, ThreadStatusActiveDto, ThreadStatusIdleDto, ThreadStatusNotLoadedDto, ThreadStatusSystemErrorDto, ThreadsUnarchiveThreadData, ThreadsUnarchiveThreadError, ThreadsUnarchiveThreadErrors, ThreadsUnarchiveThreadResponse, ThreadsUnarchiveThreadResponses, ThreadTokenUsageDto, ThreadTokenUsageResponseDto, ThreadTurnCountDto, ThreadTurnCountsRequestDto, ThreadTurnCountsResponseDto, ThreadTurnDiffsResponseDto, ThreadTurnErrorsResponseDto, ThreadTurnItemsResponseDto, ThreadTurnsPageDto, ThreadUnarchiveResponseDto, TokenUsageBreakdownDto, TokenUsageReadThreadTokenUsageData, TokenUsageReadThreadTokenUsageError, TokenUsageReadThreadTokenUsageErrors, TokenUsageReadThreadTokenUsageResponse, TokenUsageReadThreadTokenUsageResponses, TurnDiffEntryDto, TurnDiffReadThreadTurnDiffsData, TurnDiffReadThreadTurnDiffsError, TurnDiffReadThreadTurnDiffsErrors, TurnDiffReadThreadTurnDiffsResponse, TurnDiffReadThreadTurnDiffsResponses, TurnDto, TurnErrorDto, TurnErrorsReadThreadTurnErrorsData, TurnErrorsReadThreadTurnErrorsError, TurnErrorsReadThreadTurnErrorsErrors, TurnErrorsReadThreadTurnErrorsResponse, TurnErrorsReadThreadTurnErrorsResponses, TurnStartResponseDto, TurnSteerResponseDto, TurnTokenUsageDto, UpdateApprovalPolicyDto, UpdateCodexConfigDto, UpdateRawConfigDto, UpdateSandboxModeDto, UpdateSettingDto, UploadedFileDto, UploadFilesResponseDto, UserInputImageDto, UserInputLocalImageDto, UserInputMentionDto, UserInputSkillDto, UserInputTextDto, UserMessageThreadItemDto, WebSearchActionFindInPageDto, WebSearchActionOpenPageDto, WebSearchActionOtherDto, WebSearchActionSearchDto, WebSearchThreadItemDto, WorkspaceRootsResponseDto, WriteFileRequestDto, WriteFileResponseDto } from './types.gen'; diff --git a/web/src/generated/api/types.gen.ts b/web/src/generated/api/types.gen.ts index 89dcf93..78ed620 100644 --- a/web/src/generated/api/types.gen.ts +++ b/web/src/generated/api/types.gen.ts @@ -856,12 +856,18 @@ export type HookPromptThreadItemDto = { fragments: Array; }; +export type AsyncUserInputQuestionDto = { + title: string; + options: Array | null; +}; + export type AgentMessageThreadItemDto = { type: 'agentMessage'; id: string; text: string; phase: 'commentary' | 'final_answer' | null; memoryCitation: MemoryCitationDto | null; + questions: Array | null; }; export type FunctionCallOutputThreadItemDto = { @@ -943,7 +949,7 @@ export type CollabAgentToolCallThreadItemDto = { receiverThreadIds: Array; prompt: string | null; model: string | null; - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; agentsStates: { [key: string]: CollabAgentStateDto; }; @@ -1042,6 +1048,8 @@ export type ThreadDto = { preview: string; ephemeral: boolean; modelProvider: string; + model: string | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; createdAt: number; updatedAt: number; status: ThreadStatusNotLoadedDto | ThreadStatusIdleDto | ThreadStatusSystemErrorDto | ThreadStatusActiveDto; @@ -1068,7 +1076,7 @@ export type ModelUpgradeInfoDto = { }; export type ReasoningEffortOptionDto = { - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra'; description: string; }; @@ -1082,7 +1090,7 @@ export type ModelDto = { description: string; hidden: boolean; supportedReasoningEfforts: Array; - defaultReasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; + defaultReasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra'; inputModalities: Array<'text' | 'image'>; supportsPersonality: boolean; additionalSpeedTiers: Array; @@ -1098,7 +1106,7 @@ export type ThreadStartResponseDto = { approvalPolicy: 'on-request' | 'never' | GranularApprovalPolicyDto; approvalsReviewer: 'user' | 'guardian_subagent'; sandbox: SandboxDangerFullAccessDto | SandboxReadOnlyDto | SandboxExternalSandboxDto | SandboxWorkspaceWriteDto; - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; }; export type ThreadResumeResponseDto = { @@ -1110,7 +1118,7 @@ export type ThreadResumeResponseDto = { approvalPolicy: 'on-request' | 'never' | GranularApprovalPolicyDto; approvalsReviewer: 'user' | 'guardian_subagent'; sandbox: SandboxDangerFullAccessDto | SandboxReadOnlyDto | SandboxExternalSandboxDto | SandboxWorkspaceWriteDto; - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; }; export type ThreadForkResponseDto = { @@ -1122,7 +1130,7 @@ export type ThreadForkResponseDto = { approvalPolicy: 'on-request' | 'never' | GranularApprovalPolicyDto; approvalsReviewer: 'user' | 'guardian_subagent'; sandbox: SandboxDangerFullAccessDto | SandboxReadOnlyDto | SandboxExternalSandboxDto | SandboxWorkspaceWriteDto; - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; }; export type ThreadReadResponseDto = { @@ -1304,7 +1312,7 @@ export type StartTurnDto = { /** * Override reasoning effort for this turn and subsequent turns. */ - effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; + effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra'; }; export type SteerTurnDto = { @@ -1483,7 +1491,7 @@ export type CollaborationModePresetDto = { name: string; mode: 'plan' | 'default' | null; model: string | null; - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; }; export type CollaborationModesResponseDto = { @@ -1498,7 +1506,7 @@ export type ThreadCollaborationModeStateDto = { source: 'unknown' | 'notification' | 'accepted'; mode: 'plan' | 'default' | null; model: string | null; - reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' | null; }; export type ThreadGoalDto = { diff --git a/web/src/hooks/notification-handlers.ts b/web/src/hooks/notification-handlers.ts index 86c26fe..e78d956 100644 --- a/web/src/hooks/notification-handlers.ts +++ b/web/src/hooks/notification-handlers.ts @@ -181,6 +181,7 @@ const handleAgentMessageDelta: Handler = (params, ctx) => { content: (existing?.type === 'agentMessage' ? existing.content : '') + (delta ?? ''), + questions: existing?.type === 'agentMessage' ? existing.questions : [], completed: false, })); }; diff --git a/web/src/lib/thread-item-normalizer.spec.ts b/web/src/lib/thread-item-normalizer.spec.ts index a8161f6..a65dd5a 100644 --- a/web/src/lib/thread-item-normalizer.spec.ts +++ b/web/src/lib/thread-item-normalizer.spec.ts @@ -121,6 +121,33 @@ describe('normalizeThreadItem', () => { expect(JSON.stringify(normalized)).not.toContain('must never reach the page'); }); + it('preserves structured async questions while discarding malformed entries', () => { + const normalized = normalizeThreadItem( + { + type: 'agentMessage', + id: 'agent-questions', + text: 'Please choose.', + questions: [ + { title: 'Deployment target', options: ['staging', 'production'] }, + { title: 'Additional details', options: null }, + { title: 42, options: ['discard me'] }, + ], + }, + true, + ); + + expect(normalized).toMatchObject({ + kind: 'render', + item: { + type: 'agentMessage', + questions: [ + { title: 'Deployment target', options: ['staging', 'production'] }, + { title: 'Additional details', options: null }, + ], + }, + }); + }); + it('marks encrypted function output without retaining ciphertext', () => { const normalized = normalizeThreadItem( { diff --git a/web/src/lib/thread-item-normalizer.ts b/web/src/lib/thread-item-normalizer.ts index a66a4b8..a84c66e 100644 --- a/web/src/lib/thread-item-normalizer.ts +++ b/web/src/lib/thread-item-normalizer.ts @@ -239,11 +239,29 @@ export function normalizeThreadItem( item: { ...base, type: 'reasoning', content: [...summary, ...content].join('\n') }, }; } - case 'agentMessage': + case 'agentMessage': { + const questions = Array.isArray(item.questions) + ? item.questions.flatMap((value) => { + const question = asRecord(value); + if (!question || typeof question.title !== 'string') return []; + const options = Array.isArray(question.options) + ? question.options.filter( + (option): option is string => typeof option === 'string', + ) + : null; + return [{ title: question.title, options }]; + }) + : []; return { kind: 'render', - item: { ...base, type: 'agentMessage', content: stringValue(item.text) }, + item: { + ...base, + type: 'agentMessage', + content: stringValue(item.text), + questions, + }, }; + } case 'mcpToolCall': { const result = asRecord(item.result); const error = asRecord(item.error); @@ -453,8 +471,14 @@ export function mergeTurnItem( ? { ...incoming, content: existing.content } : incoming; case 'agentMessage': - return existing.type === 'agentMessage' && !incoming.content - ? { ...incoming, content: existing.content } + return existing.type === 'agentMessage' + ? { + ...incoming, + content: incoming.content || existing.content, + questions: incoming.questions.length + ? incoming.questions + : existing.questions, + } : incoming; case 'commandExecution': return existing.type === 'commandExecution' diff --git a/web/src/stores/model-store.ts b/web/src/stores/model-store.ts index 321bef4..405f3bb 100644 --- a/web/src/stores/model-store.ts +++ b/web/src/stores/model-store.ts @@ -10,7 +10,9 @@ export type ReasoningEffort = | 'low' | 'medium' | 'high' - | 'xhigh'; + | 'xhigh' + | 'max' + | 'ultra'; interface ModelState { /** Overridden model id — null means use the server default. */ diff --git a/web/src/types/timeline.ts b/web/src/types/timeline.ts index 724dd95..09b906b 100644 --- a/web/src/types/timeline.ts +++ b/web/src/types/timeline.ts @@ -26,6 +26,7 @@ export interface ReasoningTurnItem extends TurnItemBase { export interface AgentMessageTurnItem extends TurnItemBase { type: 'agentMessage'; content: string; + questions: Array<{ title: string; options: string[] | null }>; } export interface McpToolCallTurnItem extends TurnItemBase {