feat: align codex app server 0.136

This commit is contained in:
AI Bot
2026-06-03 10:46:45 +08:00
parent 1ae81fa3af
commit 3c6a0c546b
820 changed files with 106683 additions and 26 deletions

View File

@@ -81,11 +81,12 @@
- 当前 `scripts/browser-control-smoke.mjs` 已经能对目标 URL 做一次真实最小探测:抓取页面标题并写回聊天结果;桌面 GUI 控制默认先走 `scripts/codex-computer-use-runtime.mjs`,由 Codex App Server 发起 Codex Computer Use 执行;失败后自动回退 `scripts/cua-driver-computer-use-runtime.mjs`,通过外部 `cua-driver` 执行 `launch_app -> get_window_state -> 可选 type_text/press_key -> get_window_state` 闭环;`scripts/computer-use-smoke.mjs` 仍保留为旧兜底和回归资产
- 受控 Mac 需要先安装并授权 `cua-driver`Boss runtime 会优先搜索 `PATH`,再搜索 `~/.local/bin/cua-driver``/usr/local/bin/cua-driver``/opt/homebrew/bin/cua-driver``/Applications/CuaDriver.app/Contents/MacOS/cua-driver`;如果仍找不到,会明确返回 `CUA_DRIVER_COMMAND_NOT_FOUND`,不会伪装成执行成功
- 当前默认本机配置已把 `browserAutomation / computerUse` 两项能力直接上报为在线起步态,所以 Boss App 里这台 Mac 会显示“可做浏览器控制 / 桌面控制”;如果某条链路要临时收起,只需要改 `local-agent/config.cloud.json`
- 当前 `local-agent` 已新增 `Codex App Server` runnerboss-agent 默认打开 `codexAppServerEnabled`,通过 `codex app-server` stdio 接入 `conversation_reply / dispatch_execution`,也可灰度切到 `ws://127.0.0.1:<port>``unix://PATH` 本机长驻 App ServerWebSocket/Unix WebSocket handshake 支持 `Authorization: Bearer <token>`,优先用 `codexAppServerAuthTokenFile` 保存本地 token。失败时只在 turn 未启动前回退 `codex exec resume`,避免重复执行同一轮对话。设备 heartbeat 会单独上报 `codexAppServer` capability并按 `codexAppServerDiscoveryTtlMs` 缓存 `model/list / skills/list / plugin/list / app/list / modelProvider/capabilities/read` 的能力摘要,供 APP/后台模型选择和治理页读取。2026-05-31 起runner 会吸收 App Server 的 plan / diff / item / subagent 事件并归一到 Boss `execution_progress` 进度卡,执行中通过 `POST /api/v1/master-agent/tasks/[taskId]/progress` 实时刷新;后续已补 `approvals / warnings / fileChanges / threadStatus / realtime / modelRoute / tokenUsage / mcpServers / remoteControl / threadGoal / threadSettings / compaction / accountStatus / modelVerification / threadCollaboration / toolActivities / reasoningSummary / windowsSandbox` 等结构化摘要。Android 原生进度卡可显示线程状态、实时状态、线程配置、线程协作、工具活动、思考摘要、账号状态、运行状态、Windows 沙箱状态、安全提醒、审批状态和文件变更摘要且不展示完整命令、diff、系统提示词、密钥、SDP、音频原始数据、raw realtime item、remote installationId、本地绝对路径或 Windows sandbox sourcePath。本机 `codex-cli 0.135.0-alpha.1` 协议快照已生成在 `docs/protocol-snapshots/codex-app-server/0.135.0-alpha.1/`。同日新增第一版 Inter-Thread Broker任务携带源/目标 Codex 线程时可通过 `thread/read -> thread/inject_items -> turn/start` 完成受控线程协作;服务端新增 `POST /api/v1/projects/[projectId]/thread-collaboration` 作为 APP/后台可调用入口;任务携带 `targetCodexTurnId` 时 runner 会改用 `turn/steer` 干预活跃 turn。
- 当前 `local-agent` 已新增 `Codex App Server` runnerboss-agent 默认打开 `codexAppServerEnabled`,通过 `codex app-server` stdio 接入 `conversation_reply / dispatch_execution`,也可灰度切到 `ws://127.0.0.1:<port>``unix://PATH` 本机长驻 App ServerWebSocket/Unix WebSocket handshake 支持 `Authorization: Bearer <token>`,优先用 `codexAppServerAuthTokenFile` 保存本地 token。失败时只在 turn 未启动前回退 `codex exec resume`,避免重复执行同一轮对话。设备 heartbeat 会单独上报 `codexAppServer` capability并按 `codexAppServerDiscoveryTtlMs` 缓存 `model/list / skills/list / plugin/list / app/list / modelProvider/capabilities/read` 的能力摘要,供 APP/后台模型选择和治理页读取。2026-05-31 起runner 会吸收 App Server 的 plan / diff / item / subagent 事件并归一到 Boss `execution_progress` 进度卡,执行中通过 `POST /api/v1/master-agent/tasks/[taskId]/progress` 实时刷新;后续已补 `approvals / warnings / fileChanges / threadStatus / realtime / modelRoute / tokenUsage / mcpServers / remoteControl / threadGoal / threadSettings / compaction / accountStatus / modelVerification / threadCollaboration / toolActivities / reasoningSummary / windowsSandbox` 等结构化摘要。Android 原生进度卡可显示线程状态、实时状态、线程配置、线程协作、工具活动、思考摘要、账号状态、运行状态、Windows 沙箱状态、安全提醒、审批状态和文件变更摘要且不展示完整命令、diff、系统提示词、密钥、SDP、音频原始数据、raw realtime item、remote installationId、本地绝对路径或 Windows sandbox sourcePath。本机 `codex-cli 0.136.0-alpha.2` 协议快照已生成在 `docs/protocol-snapshots/codex-app-server/0.136.0-alpha.2/`,新增确认 `skills/extraRoots/set`。配置 `codexAppServerSkillExtraRoots` / `BOSS_CODEX_APP_SERVER_SKILL_EXTRA_ROOTS`runner 会先下发共享 Skill 根,再拉取 `skills/list`metadata 只保留根目录数量、basename 和下发状态。当前 Inter-Thread Broker任务携带源/目标 Codex 线程时可通过 `thread/read -> thread/inject_items -> turn/start` 完成受控线程协作;服务端新增 `POST /api/v1/projects/[projectId]/thread-collaboration` 作为 APP/后台可调用入口;任务携带 `targetCodexTurnId` 时 runner 会改用 `turn/steer` 干预活跃 turn;新版官方 `ThreadItem.collabToolCall` 会额外提取目标数量和 agent 状态集合,但仍不保存源/目标线程 ID、prompt 或 agent 私有消息
- 当前 App Server heartbeat discovery 已扩展到 `experimentalFeature/list / collaborationMode/list / permissionProfile/list / mcpServerStatus/list`,设备详情页会展示“治理:实验特性 / 协作模式 / MCP / 权限”摘要MCP 只保留服务名、工具数量、资源数量和认证状态permission profile 只保留 id/description不保存本地路径、resource URI、文件规则、token 或工具参数。
- 当前 App Server heartbeat discovery 已继续扩展到 `account/read / account/rateLimits/read / config/read / configRequirements/read / externalAgentConfig/detect`设备详情页会展示账号、套餐、额度、App 配置、托管要求和外部 Agent 迁移候选摘要该链路只保存计数、开关和状态不保存邮箱、API key、完整 config、本地路径、迁移描述或外部 Agent 原始内容。
- 当前 App Server heartbeat discovery 已新增 `thread/list / thread/loaded/list` 线程可见性摘要设备详情页会展示线程总数、已加载线程、活跃线程和最新更新时间metadata 只保留非归档线程的 `id / name / sourceKind / status / updatedAt / loaded` 轻量目录,不保存 cwd、本地路径、turn 内容、用户正文或内部 prompt。
- 当前 App Server heartbeat discovery 已新增 `thread/turns/list` turn 运行态摘要,设备详情页会展示总轮次、运行中轮次、完成轮次和最新 turn 更新时间;请求固定使用 `itemsView=notLoaded`metadata 只保留每个线程的 turn 计数、最近状态和更新时间,不保存 turn id、items、用户输入、模型输出或内部 prompt。
- 当前 App Server heartbeat discovery 已支持 `skills/extraRoots/set` 共享 Skill 根目录下发摘要,设备详情页会展示“共享 Skill 根”metadata 不保存根目录绝对路径、Skill 文件路径、token 或配置原文。
- `GET http://127.0.0.1:4317/api/v1/skills` 正常,已返回本机扫描到的 Codex Skill
- `POST http://127.0.0.1:4317/api/v1/heartbeat` 正常,且会顺带触发 `thread-context` 上报
- `local-agent` 当前每 5 秒轮询一次本机 Skill lifecycle 请求;默认打开 `skillLifecycleEnabled=true`。远程 `install` 或带 `sourceUrl` 的更新必须命中 `skillLifecycleAllowedSources``skillLifecycleTrustedSources`,为空时只允许既有本地 Skill 的 `update / rollback / uninstall / version_lock`;请求携带 `checksum / expectedChecksum` 时会校验 `manifest.json``SKILL.md` 的 sha256失败会清理半安装目录或尽量恢复备份。卸载 / 更新 / 回滚前会在 `skillsDir/.boss-skill-backups` 保留备份,卸载仍限制在 `skillsDir` 目录内,版本锁写入 `.boss-skill-locks.json`

View File

@@ -153,7 +153,7 @@
- Web 和原生 Android 当前都已经接上“新设备导入草稿 -> 勾选 -> 决议预览 -> 应用导入”的前台页面;已绑定生产设备继续保留 heartbeat 自动导入链路
- 原生首页的刷新失败策略当前已改成按当前 tab 独立判错,不会再因为 `设备 / 设置 / OTA` 的旁路请求失败把会话页刷新一并判成失败
- 当前量产方向已经明确为“Boss 企业控制面 + 可插拔执行协议”:多租户、权限、审批、审计、备份、回退和 Skill 治理由 Boss 承担Codex App Server / Codex MCP / Codex CLI / Computer Use / 业务系统 API 都作为 provider 接入;详见 `docs/architecture/enterprise_ai_ops_architecture_cn.md`
- 当前 Codex App Server 已完成十批接入boss-agent 默认开启 `local-agent/codex-app-server-runner.mjs` 作为 Codex 绑定入口,优先走 `codex app-server` stdio也可灰度连接 `ws://127.0.0.1:<port>``unix://PATH` 同机长驻 App Server长驻连接支持 `Authorization: Bearer <token>`,配置上优先使用 `codexAppServerAuthTokenFile`。turn 启动前失败才回退 CLIturn 启动后不重复执行;桌面远程控制默认先走 `codex-computer-use`,失败后回退 `cua-driver-computer-use`。2026-05-31 已按本机 `codex-cli 0.135.0-alpha.1` 生成协议快照 `docs/protocol-snapshots/codex-app-server/0.135.0-alpha.1/`,并把 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started``item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated``thread/status/changed``thread/realtime/*``model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed``windowsSandbox/setupCompleted``thread/goal/*``thread/settings/updated``thread/compacted``account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice``ThreadItem.collabToolCall``ThreadItem.contextCompaction``mcpToolCall``dynamicToolCall``webSearch``imageView``imageGeneration``hook/started|completed``enteredReviewMode``exitedReviewMode``commandExecution``ThreadItem.plan``ThreadItem.reasoning.summary` 归一到 Boss `execution_progress` 卡片realtime 只保留状态、文本摘要和计数运行状态只保留模型切换、上下文用量、MCP 状态、远控连接摘要和 Windows 沙箱准备状态,线程配置只保留目标、模型、审批、沙箱、协作模式和压缩状态,线程协作只保留工具名、状态、目标类型和智能体状态,工具活动只保留类型、名称、状态和安全摘要,图像生成只保留状态与安全文件名,钩子生命周期只保留事件名、处理器类型、状态、来源、执行模式和耗时,思考摘要只保留官方 summary 文本和状态,账号状态只保留认证方式、套餐、额度窗口、积分余额和模型校验摘要,不保存 SDP、音频原始数据、raw item、remote installationId、cwd、turnId、配置文件路径、collab 源/目标线程 ID、collab prompt、tool arguments/result/contentItems、web URL token、命令正文/输出、raw reasoning content、reasoning item id、imageGeneration revisedPrompt/result、hook sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths/本地绝对路径或未清洗密钥。heartbeat 已能缓存 `model/list / skills/list / plugin/list / app/list / modelProvider/capabilities/read / experimentalFeature/list / collaborationMode/list / permissionProfile/list / mcpServerStatus/list / account/read / account/rateLimits/read / config/read / configRequirements/read / externalAgentConfig/detect / thread/list / thread/loaded/list / thread/turns/list` 的能力摘要;同批已补 `turn/steer` 活跃 turn 干预和 `POST /api/v1/projects/[projectId]/thread-collaboration` 服务端线程协作排队入口。MCP、权限、账号、配置、外部 Agent、线程和 turn discovery 只保留安全摘要,不保存 resource URI、权限文件规则、工具参数、邮箱、完整 config、本地路径、迁移描述、turn id、turn items、用户正文、模型输出或 token。
- 当前 Codex App Server 已完成十批接入boss-agent 默认开启 `local-agent/codex-app-server-runner.mjs` 作为 Codex 绑定入口,优先走 `codex app-server` stdio也可灰度连接 `ws://127.0.0.1:<port>``unix://PATH` 同机长驻 App Server长驻连接支持 `Authorization: Bearer <token>`,配置上优先使用 `codexAppServerAuthTokenFile`。turn 启动前失败才回退 CLIturn 启动后不重复执行;桌面远程控制默认先走 `codex-computer-use`,失败后回退 `cua-driver-computer-use`。2026-06-03 已按本机 `codex-cli 0.136.0-alpha.2` 生成协议快照 `docs/protocol-snapshots/codex-app-server/0.136.0-alpha.2/`,并把 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started``item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated``thread/status/changed``thread/realtime/*``model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed``windowsSandbox/setupCompleted``thread/goal/*``thread/settings/updated``thread/compacted``account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice``ThreadItem.collabToolCall``ThreadItem.contextCompaction``mcpToolCall``dynamicToolCall``webSearch``imageView``imageGeneration``hook/started|completed``enteredReviewMode``exitedReviewMode``commandExecution``ThreadItem.plan``ThreadItem.reasoning.summary` 归一到 Boss `execution_progress` 卡片realtime 只保留状态、文本摘要和计数运行状态只保留模型切换、上下文用量、MCP 状态、远控连接摘要和 Windows 沙箱准备状态,线程配置只保留目标、模型、审批、沙箱、协作模式和压缩状态,线程协作只保留工具名、状态、目标类型、目标数量和智能体状态集合,工具活动只保留类型、名称、状态和安全摘要,图像生成只保留状态与安全文件名,钩子生命周期只保留事件名、处理器类型、状态、来源、执行模式和耗时,思考摘要只保留官方 summary 文本和状态,账号状态只保留认证方式、套餐、额度窗口、积分余额和模型校验摘要,不保存 SDP、音频原始数据、raw item、remote installationId、cwd、turnId、配置文件路径、collab 源/目标线程 ID、collab receiverThreadIds、collab prompt、agentsStates 私有消息、共享 Skill 根绝对路径、tool arguments/result/contentItems、web URL token、命令正文/输出、raw reasoning content、reasoning item id、imageGeneration revisedPrompt/result、hook sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths/本地绝对路径或未清洗密钥。heartbeat 已能缓存 `model/list / skills/list / skills/extraRoots/set / plugin/list / app/list / modelProvider/capabilities/read / experimentalFeature/list / collaborationMode/list / permissionProfile/list / mcpServerStatus/list / account/read / account/rateLimits/read / config/read / configRequirements/read / externalAgentConfig/detect / thread/list / thread/loaded/list / thread/turns/list` 的能力摘要;同批已补 `turn/steer` 活跃 turn 干预和 `POST /api/v1/projects/[projectId]/thread-collaboration` 服务端线程协作排队入口。MCP、权限、账号、配置、外部 Agent、线程、turn 和 Skill extra roots discovery 只保留安全摘要,不保存 resource URI、权限文件规则、工具参数、邮箱、完整 config、本地路径、迁移描述、turn id、turn items、用户正文、模型输出、共享 Skill 根绝对路径或 token。
- 当前 boss-agent 已支持 Mac OTA`local-agent/boss-agent-ota-runner.mjs` 默认开启,每 5 分钟检查服务端最新包;状态页可手动检查或下载并安装,安装时保留原绑定配置,只更新版本号和本机 runtime 路径。最新验证版本为 `20260516221619`,已在 MacBook Air `macbook-air` 上确认 OTA 下载校验、暂存、覆盖安装后不会误切到默认 `config.cloud.json`。正式分发脚本已预留 Developer ID 公证路径:`BOSS_AGENT_NOTARIZE=1` 配合 notary profile 或 Apple ID 凭据。
- 当前量产治理已补设备撤权和任务可靠性底座:`revoke_device` 会清空设备 token、标记离线并阻断 heartbeat / 任务认领 / Skill 同步 / 日志上报 / boss-agent OTA`MasterAgentTask` claim 会记录 attempt 和 lease运行中任务可按租约重试超过上限转 `timed_out`,用户或管理员可通过 cancel 接口转 `canceled` 且迟到 complete 不覆盖终态。
- 当前群聊 `dispatch_execution` 完成回写已补幂等,重复完成不会再向群聊重复追加结果

View File

@@ -117,11 +117,12 @@
- 当前 `RemoteRuntimeAdapter` 还负责拦截固定模式的线程内部环境提示;命中后会直接改写成失败,避免把只读/cwd 这类脏文本写进聊天记录
- 当前普通单线程 `conversation_reply` 在真正执行 `codex exec resume` 前,会先把 Boss 用户消息镜像进目标 Codex Desktop rollout定位优先走 `state_5.sqlite`,不可用时回退扫描 `~/.codex/sessions`,并按 `sourceMessageId` 去重
- 当前 Codex Desktop 同步新增常驻刷新桥:`scripts/codex-desktop-refresh-bridge-daemon.mjs` 通过 launchd 监听 `127.0.0.1:4318`,暴露 `POST /api/v1/codex-desktop/refresh``GET /api/v1/codex-desktop/events``GET /api/v1/codex-desktop/events/recent``GET /api/v1/codex-desktop/capabilities``local-agent` 会优先调用 refresh endpoint失败时回退到 `scripts/codex-desktop-refresh-hint.mjs` 命令式刷新。SSE 事件只包含线程引用、消息 ID、状态、deep link 等安全元数据,不包含用户正文或内部 prompt`scripts/codex-desktop-event-consumer.mjs` 可作为 Desktop 插件/IPC 接入前的订阅 smoke`scripts/codex-desktop-integration-probe.mjs` 负责只读探测 Codex.app 能力
- 当前新增 Codex App Server runner`local-agent/codex-app-server-runner.mjs`。boss-agent 默认配置 `codexAppServerEnabled=true`,会接管 `conversation_reply / dispatch_execution`;它默认通过 stdio 启动 `codex app-server`,也支持 `codexAppServerTransport=ws + codexAppServerUrl=ws://127.0.0.1:<port>``codexAppServerTransport=unix + codexAppServerUrl=unix:///absolute/path.sock` 连接同机长驻 App Serverbearer token 可通过 `codexAppServerAuthTokenFile` 读取并在握手时发送 `Authorization: Bearer <token>`。runner 执行 `initialize -> thread/resume|thread/start -> turn/start|turn/steer`,并把 `item/agentMessage/delta``item/completed` 归一成 Boss 任务回复;当 App Server 对单个 JSON-RPC 请求返回 `-32001 / retry later`runner 会做最多 3 次指数退避重试。turn 启动前失败可回退 CLIturn 启动后失败不回退避免重复执行。2026-05-31 起runner 会把 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started` 归一成 `executionProgress.steps / branch / artifacts / agents`,把 `item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated` 归一成 `executionProgress.approvals / warnings / fileChanges`,把 `thread/status/changed``thread/realtime/started|transcript|outputAudio|itemAdded|error|closed` 归一成 `executionProgress.threadStatus / realtime`,把 `model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed` 归一成 `executionProgress.modelRoute / tokenUsage / mcpServers / remoteControl`,并把 `thread/goal/*``thread/settings/updated``thread/compacted``account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice``ThreadItem.collabToolCall``ThreadItem.contextCompaction``mcpToolCall``dynamicToolCall``webSearch``imageView``imageGeneration``hook/started|completed``windowsSandbox/setupCompleted``enteredReviewMode``exitedReviewMode``commandExecution``ThreadItem.plan``ThreadItem.reasoning.summary` 归一成线程配置、账号状态、模型校验、安全提醒、线程协作、上下文压缩、工具活动、图片产物、钩子生命周期、Windows 沙箱准备状态、计划步骤和思考摘要;服务端 complete 回写会与本地 Git/GitHub 进度合并,且不保存 SDP、音频 base64、raw realtime item、remote installationId、cwd、turnId、配置路径、collab 源/目标线程 ID、collab prompt、tool arguments/result/contentItems、web URL token、命令正文/输出、raw reasoning content、reasoning item id、imageGeneration revisedPrompt/result、hook sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths/本地绝对路径或未清洗的 MCP 错误。heartbeat 同时支持按 TTL 拉取 `model/list / skills/list / plugin/list / app/list / modelProvider/capabilities/read`,并把摘要保存在 `capabilities.codexAppServer.metadata`
- 当前新增 Codex App Server runner`local-agent/codex-app-server-runner.mjs`。boss-agent 默认配置 `codexAppServerEnabled=true`,会接管 `conversation_reply / dispatch_execution`;它默认通过 stdio 启动 `codex app-server`,也支持 `codexAppServerTransport=ws + codexAppServerUrl=ws://127.0.0.1:<port>``codexAppServerTransport=unix + codexAppServerUrl=unix:///absolute/path.sock` 连接同机长驻 App Serverbearer token 可通过 `codexAppServerAuthTokenFile` 读取并在握手时发送 `Authorization: Bearer <token>`。runner 执行 `initialize -> thread/resume|thread/start -> turn/start|turn/steer`,并把 `item/agentMessage/delta``item/completed` 归一成 Boss 任务回复;当 App Server 对单个 JSON-RPC 请求返回 `-32001 / retry later`runner 会做最多 3 次指数退避重试。turn 启动前失败可回退 CLIturn 启动后失败不回退避免重复执行。2026-05-31 起runner 会把 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started` 归一成 `executionProgress.steps / branch / artifacts / agents`,把 `item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated` 归一成 `executionProgress.approvals / warnings / fileChanges`,把 `thread/status/changed``thread/realtime/started|transcript|outputAudio|itemAdded|error|closed` 归一成 `executionProgress.threadStatus / realtime`,把 `model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed` 归一成 `executionProgress.modelRoute / tokenUsage / mcpServers / remoteControl`,并把 `thread/goal/*``thread/settings/updated``thread/compacted``account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice``ThreadItem.collabToolCall``ThreadItem.contextCompaction``mcpToolCall``dynamicToolCall``webSearch``imageView``imageGeneration``hook/started|completed``windowsSandbox/setupCompleted``enteredReviewMode``exitedReviewMode``commandExecution``ThreadItem.plan``ThreadItem.reasoning.summary` 归一成线程配置、账号状态、模型校验、安全提醒、线程协作、上下文压缩、工具活动、图片产物、钩子生命周期、Windows 沙箱准备状态、计划步骤和思考摘要;新版 `ThreadItem.collabToolCall.receiverThreadIds / agentsStates` 只归一为目标数量和 agent 状态集合。服务端 complete 回写会与本地 Git/GitHub 进度合并,且不保存 SDP、音频 base64、raw realtime item、remote installationId、cwd、turnId、配置路径、collab 源/目标线程 ID、receiverThreadIds、collab prompt、agentsStates 私有消息、tool arguments/result/contentItems、web URL token、命令正文/输出、raw reasoning content、reasoning item id、imageGeneration revisedPrompt/result、hook sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths/本地绝对路径或未清洗的 MCP 错误。heartbeat 同时支持按 TTL 拉取 `model/list / skills/list / plugin/list / app/list / modelProvider/capabilities/read`,并把摘要保存在 `capabilities.codexAppServer.metadata`
- App Server heartbeat discovery 现在还会按 TTL 拉取 `experimentalFeature/list / collaborationMode/list / permissionProfile/list / mcpServerStatus/list`,写入 `capabilities.codexAppServer.metadata.experimentalFeatures / collaborationModes / permissionProfiles / mcpServers`。这些字段用于 APP/后台治理页展示 Codex 当前可用的实验特性、多 Agent/协作模式、权限 profile 和 MCP 服务健康MCP 请求固定使用 `detail=toolsAndAuthOnly`,服务端状态里不保存 resource URI、工具参数、permission profile 文件规则、本地路径或密钥。
- App Server heartbeat discovery 现在还会按 TTL 拉取 `account/read / account/rateLimits/read / config/read / configRequirements/read / externalAgentConfig/detect`,写入 `capabilities.codexAppServer.metadata.accountSummary / rateLimitSummary / appConfigSummary / configRequirements / externalAgentMigration`。这些字段用于 APP/后台展示账号、额度、App 配置、企业托管要求和外部 Agent 迁移候选摘要;当前只做观测,不通过 Boss 远程写 `config.toml` 或执行外部 Agent 导入,且不保存邮箱、完整 config、API key、本地路径或迁移描述。
- App Server heartbeat discovery 现在还会按 TTL 拉取 `thread/list / thread/loaded/list`,写入 `capabilities.codexAppServer.metadata.threadSummary`。该字段用于 APP/后台展示 Codex 当前可见线程数量、加载态、活跃态和非归档线程轻量目录;目录只保留 `id / name / sourceKind / status / updatedAt / loaded`,不保存 cwd、本地路径、turn 内容、用户正文或内部 prompt。
- App Server heartbeat discovery 现在还会按 TTL 对非归档可见线程拉取 `thread/turns/list`,写入 `capabilities.codexAppServer.metadata.threadTurnSummary`。该字段用于 APP/后台展示 Codex 当前线程 turn 运行态;请求固定 `itemsView=notLoaded`,只保留 turn 计数、运行中 / 完成计数、最近状态和更新时间,不保存 turn id、items、用户正文、模型输出或内部 prompt。
- App Server heartbeat discovery 现在支持 `skills/extraRoots/set`:配置 `codexAppServerSkillExtraRoots` 或环境变量 `BOSS_CODEX_APP_SERVER_SKILL_EXTRA_ROOTS`runner 会先把共享 Skill 根下发给 App Server再刷新 `skills/list`,并写入 `capabilities.codexAppServer.metadata.skillExtraRootsSummary`。该字段用于 APP/后台展示企业共享 Skill 根是否已下发只保留数量、basename 和状态不保存根目录绝对路径、Skill 文件路径或配置原文。
- 当前 Codex App Server runner 已新增第一版 Boss Inter-Thread Broker任务携带 `intentCategory=thread_collaboration``sourceCodexThreadRef``targetCodexThreadRef` 时,会先 `thread/read` 源线程,再通过 `thread/inject_items` 向目标线程注入受控摘要,最后 `turn/start` 目标线程;服务端入口是 `POST /api/v1/projects/[projectId]/thread-collaboration`,负责权限、源/目标线程校验和任务排队。这不是假设官方线程 P2P而是 Boss 自己做线程协作编排。
- 当前 boss-agent Mac OTA 已接入:`local-agent/boss-agent-ota-runner.mjs` 会用设备 token 调 Boss 服务端 `/api/v1/boss-agent/ota` 检查最新 Mac 运行包,`/api/v1/boss-agent/ota/apply` 会下载 `boss-agent-mac-latest.zip`、校验 sha256、暂存安装 wrapper并拉起本机安装器安装脚本会保留绑定配置并只更新版本号与本机 runtime 路径。安装器会优先沿用当前 LaunchAgent active config并保留所有 `config*.json`,避免多电脑场景中误绑定到默认设备配置。当前最新验证包为 `20260516221619`;构建脚本支持 `BOSS_AGENT_NOTARIZE=1` 的 Developer ID 公证路径。
- 当前 `local-agent` 还新增了两条统一电脑控制 runtime
@@ -132,8 +133,8 @@
- 相关配置项:
- `browserControlEnabled / browserControlCommand / browserControlArgs / browserControlWorkdir / browserControlTimeoutMs`
- `computerUseEnabled / computerUseCommand / computerUseArgs / computerUseWorkdir / computerUseTimeoutMs`
- `codexAppServerEnabled / codexAppServerCommand / codexAppServerArgs / codexAppServerWorkdir / codexAppServerTimeoutMs / codexAppServerFallbackToCli / codexAppServerTransport / codexAppServerUrl / codexAppServerAuthTokenFile / codexAppServerDiscoveryEnabled / codexAppServerDiscoveryTtlMs / codexAppServerDiscoveryLimit`
- `scripts/codex-app-server-protocol-snapshot.mjs`:生成本机 Codex App Server help、JSON Schema、TypeScript bindings、协议方法清单和 support matrix当前快照目录为 `docs/protocol-snapshots/codex-app-server/0.135.0-alpha.1/`
- `codexAppServerEnabled / codexAppServerCommand / codexAppServerArgs / codexAppServerWorkdir / codexAppServerTimeoutMs / codexAppServerFallbackToCli / codexAppServerTransport / codexAppServerUrl / codexAppServerAuthTokenFile / codexAppServerSkillExtraRoots / codexAppServerDiscoveryEnabled / codexAppServerDiscoveryTtlMs / codexAppServerDiscoveryLimit`
- `scripts/codex-app-server-protocol-snapshot.mjs`:生成本机 Codex App Server help、JSON Schema、TypeScript bindings、协议方法清单和 support matrix当前快照目录为 `docs/protocol-snapshots/codex-app-server/0.136.0-alpha.2/`
#### `POST /api/v1/master-agent/tasks/[taskId]/progress`

View File

@@ -1,6 +1,6 @@
# Codex Server 协议与 Boss 执行进度卡接入记录
更新时间:`2026-06-01`
更新时间:`2026-06-03`
## 1. Codex 最新开放协议结论
@@ -13,16 +13,16 @@ Codex App Server 是更适合 Boss 长期接入的协议层,因为它面向富
- approvals
- streamed agent events
- Thread / Turn / Item
- model/list、skills/list、plugin/list、app/list
- model/list、skills/list、skills/extraRoots/set、plugin/list、app/list
- command execution、file change、tool input、MCP tool-call approvals
Boss 不能直接把 App Server 原始 Thread / Turn / Item 字段写进业务层。当前第一批已经新增 `local-agent/codex-app-server-runner.mjs`,把 App Server 的 `thread/resume | thread/start -> turn/start -> item/agentMessage/delta -> turn/completed` 映射成 Boss 的普通任务完成回写。
2026-05-31 已继续把 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started` 这类协议事件归一化为 Boss `execution_progress` 的步骤、分支变更、产物和后台智能体。同日第二批补齐 `item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated` 的安全摘要映射APP 只展示审批状态、风险提醒和文件路径不展示完整命令、diff、系统提示词或密钥。第三批已把 `thread/status/changed``thread/realtime/*` 归一成 `executionProgress.threadStatus / realtime`APP 只展示活跃/等待审批/等待用户输入、realtime 文本摘要、音频片段计数和关闭/错误原因;第四批已把 `model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed` 归一成 `executionProgress.modelRoute / tokenUsage / mcpServers / remoteControl`,用于 APP “运行状态”区块。
2026-06-01 第五批已把 `thread/goal/updated|cleared``thread/settings/updated``thread/compacted` 归一成 `executionProgress.threadGoal / threadSettings / compaction`,用于 APP “线程配置”区块;第六批已把 `account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice` 归一成 `executionProgress.accountStatus / modelVerification / warnings`;第七批已把官方 `ThreadItem.collabToolCall` 归一成 `executionProgress.threadCollaboration`,并按官方建议把新版 `ThreadItem.contextCompaction` 映射回 `executionProgress.compaction`;第八批已把 `mcpToolCall``dynamicToolCall``webSearch``imageView``enteredReviewMode``exitedReviewMode``commandExecution` 归一成 `executionProgress.toolActivities`;第九批已把官方 `ThreadItem.plan` 的最终 `item/completed` 文本映射为 `executionProgress.steps`,并把 `ThreadItem.reasoning.summary` 映射为 `executionProgress.reasoningSummary`;第十批已把 `ThreadItem.imageGeneration` 安全映射为 `executionProgress.toolActivities` 的图像生成活动和 `executionProgress.artifacts` 的图片产物;第十一批已把 `hook/started|completed` 安全映射为 `executionProgress.toolActivities` 的钩子活动,供 APP 以“钩子”轻卡展示企业治理和插件生命周期状态;第十二批已把 `windowsSandbox/setupCompleted` 安全映射为 `executionProgress.windowsSandbox`,供 APP 在“运行状态”里展示 Windows 沙箱准备状态、setup mode 和脱敏错误摘要;第十三批已把 heartbeat discovery 扩展到 `experimentalFeature/list``collaborationMode/list``permissionProfile/list``mcpServerStatus/list`供设备详情、APP 和 PC 后台看到实验特性、协作模式、权限 Profile 与 MCP 服务摘要;第十四批已把 `account/read``account/rateLimits/read``config/read``configRequirements/read``externalAgentConfig/detect` 纳入 heartbeat discovery用于展示账号、套餐、额度、App 配置、托管要求和外部 Agent 迁移候选摘要;第十五批已把 `thread/list``thread/loaded/list` 纳入 heartbeat discovery用于展示线程总数、已加载线程、活跃线程、归档线程和非归档可见线程轻量目录第十六批已把 `thread/turns/list` 纳入 heartbeat discovery用于展示总轮次、运行中轮次、完成轮次和每个非归档线程的最近 turn 状态摘要。
2026-06-01 第五批已把 `thread/goal/updated|cleared``thread/settings/updated``thread/compacted` 归一成 `executionProgress.threadGoal / threadSettings / compaction`,用于 APP “线程配置”区块;第六批已把 `account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice` 归一成 `executionProgress.accountStatus / modelVerification / warnings`;第七批已把官方 `ThreadItem.collabToolCall` 归一成 `executionProgress.threadCollaboration`,并按官方建议把新版 `ThreadItem.contextCompaction` 映射回 `executionProgress.compaction`;第八批已把 `mcpToolCall``dynamicToolCall``webSearch``imageView``enteredReviewMode``exitedReviewMode``commandExecution` 归一成 `executionProgress.toolActivities`;第九批已把官方 `ThreadItem.plan` 的最终 `item/completed` 文本映射为 `executionProgress.steps`,并把 `ThreadItem.reasoning.summary` 映射为 `executionProgress.reasoningSummary`;第十批已把 `ThreadItem.imageGeneration` 安全映射为 `executionProgress.toolActivities` 的图像生成活动和 `executionProgress.artifacts` 的图片产物;第十一批已把 `hook/started|completed` 安全映射为 `executionProgress.toolActivities` 的钩子活动,供 APP 以“钩子”轻卡展示企业治理和插件生命周期状态;第十二批已把 `windowsSandbox/setupCompleted` 安全映射为 `executionProgress.windowsSandbox`,供 APP 在“运行状态”里展示 Windows 沙箱准备状态、setup mode 和脱敏错误摘要;第十三批已把 heartbeat discovery 扩展到 `experimentalFeature/list``collaborationMode/list``permissionProfile/list``mcpServerStatus/list`供设备详情、APP 和 PC 后台看到实验特性、协作模式、权限 Profile 与 MCP 服务摘要;第十四批已把 `account/read``account/rateLimits/read``config/read``configRequirements/read``externalAgentConfig/detect` 纳入 heartbeat discovery用于展示账号、套餐、额度、App 配置、托管要求和外部 Agent 迁移候选摘要;第十五批已把 `thread/list``thread/loaded/list` 纳入 heartbeat discovery用于展示线程总数、已加载线程、活跃线程、归档线程和非归档可见线程轻量目录第十六批已把 `thread/turns/list` 纳入 heartbeat discovery用于展示总轮次、运行中轮次、完成轮次和每个非归档线程的最近 turn 状态摘要;第十七批已按 `codex-cli 0.136.0-alpha.2` 补齐 `skills/extraRoots/set`,支持把企业共享 Skill 根下发给 App Server 后再拉取 `skills/list`,并把新版 `ThreadItem.collabToolCall.receiverThreadIds / agentsStates` 安全映射成目标数量和 agent 状态集合
`thread/realtime/sdp`、音频 base64、原始 realtime item、remote installationId、thread settings 的 `cwd`、compaction `turnId`、collaboration settings 内部 prompt、collabToolCall 源/目标线程 ID、tool arguments/result/contentItems、web URL token、命令正文/输出、raw reasoning `content`、reasoning item id、imageGeneration 原始 result/revisedPrompt、hook id/sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths、本地绝对路径、permission profile 文件规则、MCP resource URI、账号邮箱、API key、完整 config、外部 Agent 迁移描述、turn id、turn items、turn 内容、用户正文、模型输出和未清洗的 MCP 错误不入账。
`thread/realtime/sdp`、音频 base64、原始 realtime item、remote installationId、thread settings 的 `cwd`、compaction `turnId`、collaboration settings 内部 prompt、collabToolCall 源/目标线程 ID、`receiverThreadIds``agentsStates.message`、共享 Skill 根绝对路径、tool arguments/result/contentItems、web URL token、命令正文/输出、raw reasoning `content`、reasoning item id、imageGeneration 原始 result/revisedPrompt、hook id/sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths、本地绝对路径、permission profile 文件规则、MCP resource URI、账号邮箱、API key、完整 config、外部 Agent 迁移描述、turn id、turn items、turn 内容、用户正文、模型输出和未清洗的 MCP 错误不入账。
官方文档入口:`https://developers.openai.com/codex/app-server`
@@ -38,13 +38,13 @@ Boss 不能直接把 App Server 原始 Thread / Turn / Item 字段写进业务
本机当前检测结果:
- 本机 `codex --version``codex-cli 0.135.0-alpha.1`
- 本机 `codex --version``codex-cli 0.136.0-alpha.2`
- 本机 `codex app-server --help` 已可用;本机 help 当前显示 `--listen` 支持 `stdio://``unix://``unix://PATH``ws://IP:PORT``off`
- 本机 `codex app-server --help` 当前已经支持 `--ws-auth capability-token|signed-bearer-token``--ws-token-file``--ws-token-sha256``--ws-shared-secret-file`、issuer/audience/clock-skew 等 WebSocket 认证参数
- 本机协议快照已生成到 `docs/protocol-snapshots/codex-app-server/0.135.0-alpha.1/`,共识别 137 个协议方法;确认支持 `thread/inject_items``thread/rollback``thread/goal/*``turn/steer``command/exec``thread/realtime/*``account/*``model/verification``configWarning``deprecationNotice``model/list`
- 本机协议快照已生成到 `docs/protocol-snapshots/codex-app-server/0.136.0-alpha.2/`,共识别 138 个协议方法;确认支持 `thread/inject_items``thread/rollback``thread/goal/*``turn/steer``command/exec``thread/realtime/*``account/*``model/verification``configWarning``deprecationNotice``model/list``skills/extraRoots/set`
- Boss 当前默认仍以 `stdio` 作为本机 agent 接入方式;`ws://127.0.0.1:<port>``unix://PATH` 本地长驻 transport 已可灰度接入WebSocket/Unix WebSocket handshake 支持 `Authorization: Bearer <token>`;非 loopback signed bearer/JWT、自动重连和健康探测仍保留为后续增强不直接替换当前稳定链路
- 官方文档提示 WebSocket ingress 满载时会返回 JSON-RPC `-32001 / Server overloaded; retry later.`Boss runner 已对该错误做最多 3 次指数退避重试,避免长驻连接瞬时拥塞直接把用户任务打失败
- Boss heartbeat 已新增 App Server 能力发现缓存:按 `codexAppServerDiscoveryTtlMs` 拉取 `model/list``modelProvider/capabilities/read``skills/list``plugin/list``app/list``experimentalFeature/list``collaborationMode/list``permissionProfile/list``mcpServerStatus/list``account/read``account/rateLimits/read``config/read``configRequirements/read``externalAgentConfig/detect``thread/list``thread/loaded/list``thread/turns/list`,归一成设备 `capabilities.codexAppServer.metadata`;发现失败只记录 warn不阻塞心跳。MCP discovery 使用 `detail=toolsAndAuthOnly`turn discovery 固定 `itemsView=notLoaded`,账号、配置线程 discovery 只保留安全摘要不保存邮箱、resource URI、工具参数、完整 config、本地路径、迁移描述、turn id、turn items、用户正文模型输出。
- Boss heartbeat 已新增 App Server 能力发现缓存:按 `codexAppServerDiscoveryTtlMs` 拉取 `model/list``modelProvider/capabilities/read``skills/list``plugin/list``app/list``experimentalFeature/list``collaborationMode/list``permissionProfile/list``mcpServerStatus/list``account/read``account/rateLimits/read``config/read``configRequirements/read``externalAgentConfig/detect``thread/list``thread/loaded/list``thread/turns/list`;配置了 `codexAppServerSkillExtraRoots` / `BOSS_CODEX_APP_SERVER_SKILL_EXTRA_ROOTS` 时,会先调用 `skills/extraRoots/set` 再拉取 `skills/list`,归一成设备 `capabilities.codexAppServer.metadata`;发现失败只记录 warn不阻塞心跳。MCP discovery 使用 `detail=toolsAndAuthOnly`turn discovery 固定 `itemsView=notLoaded`,账号、配置线程和 Skill extra root discovery 只保留安全摘要不保存邮箱、resource URI、工具参数、完整 config、本地路径、迁移描述、turn id、turn items、用户正文模型输出或共享 Skill 根绝对路径
- Boss 第一批只用 App Server 做任务级 provider不直接复用 ChatGPT Mobile 到 Codex App 的官方 relay官方移动控制链路仍属于 ChatGPT App 与 Codex App 同账号/工作区之间的产品能力,不是第三方 Boss 可以稳定依赖的私有通道
下一轮再核对版本时,不要只看 npm 包版本号;必须同时读取 App Server schema / TypeScript 定义,并把 protocol snapshot 保存到 `docs/protocol-snapshots/codex-app-server/<version>/`
@@ -82,7 +82,7 @@ APP 展示结构对齐截图:
- `线程状态`:展示 `active / idle / systemError / notLoaded` 以及 `waitingOnApproval / waitingOnUserInput`
- `实时状态`:展示 realtime 启动、同步、关闭或错误状态,附带安全清洗后的 transcript 预览和计数
- `线程配置`:展示 thread goal、模型 / provider、审批 / 沙箱、协作模式和上下文压缩状态
- `线程协作`:展示 `collabToolCall` 的工具名、执行状态、目标类型和智能体状态,不展示源/目标线程 ID 或 prompt
- `线程协作`:展示 `collabToolCall` 的工具名、执行状态、目标类型、目标数量和智能体状态集合,不展示源/目标线程 ID`receiverThreadIds`、prompt 或 agent 私有消息
- `工具活动`:展示 MCP / dynamic tool / web search / image view / image generation / hook / Review / command 的类型、名称、状态和安全摘要不展示参数、结果、URL token、命令正文、命令输出、图像生成原始 result/revised prompt 或 hook 原始输出
- `思考摘要`:展示 Codex 官方 reasoning `summary` 和状态,不展示 raw reasoning `content`、item id 或密钥
- `运行状态`展示模型重路由、上下文用量、MCP 启动状态、远控连接状态和 Windows 沙箱准备状态
@@ -137,7 +137,7 @@ UI 参考:
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed` 归一成 `executionProgress.modelRoute / tokenUsage / mcpServers / remoteControl`;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖 installationId 和密钥不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `thread/goal/updated|cleared``thread/settings/updated``thread/compacted` 归一成 `executionProgress.threadGoal / threadSettings / compaction`;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖 cwd、turnId、内部 prompt 不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice` 归一成 `executionProgress.accountStatus / modelVerification / warnings`;服务端进度路由和 Android 原生进度卡已支持展示测试覆盖配置路径、turnId 和密钥不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `ThreadItem.collabToolCall``ThreadItem.contextCompaction` 归一成 `executionProgress.threadCollaboration / compaction`;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖源/目标线程 ID、内部 prompt、turnId 和密钥不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `ThreadItem.collabToolCall``ThreadItem.contextCompaction` 归一成 `executionProgress.threadCollaboration / compaction`新版 `receiverThreadIds / agentsStates` 只归一为目标数量与 agent 状态集合;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖源/目标线程 ID、内部 prompt、agent 私有消息、turnId 和密钥不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `mcpToolCall``dynamicToolCall``webSearch``imageView``enteredReviewMode``exitedReviewMode``commandExecution` 归一成 `executionProgress.toolActivities`;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖 tool arguments/result、URL token、命令正文/输出、本地路径和密钥不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `ThreadItem.plan``ThreadItem.reasoning.summary` 归一成 `executionProgress.steps / reasoningSummary`;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖 raw reasoning content、reasoning item id 和密钥不外泄
- `local-agent/codex-app-server-runner.mjs` 已把 App Server `ThreadItem.imageGeneration` 归一成 `executionProgress.toolActivities / artifacts`;服务端进度路由和 Android 原生进度卡已支持展示,测试覆盖 revisedPrompt、result、item id、本地绝对路径和密钥不外泄
@@ -149,6 +149,7 @@ UI 参考:
- `getCodexAppServerRunnerConfig` 已识别 `codexAppServerTransport` / `BOSS_CODEX_APP_SERVER_TRANSPORT``codexAppServerUrl` / `BOSS_CODEX_APP_SERVER_URL``codexAppServerAuthTokenFile` / `BOSS_CODEX_APP_SERVER_AUTH_TOKEN_FILE``local-agent/codex-app-server-runner.mjs` 现已支持 `stdio``ws://127.0.0.1:<port>``unix://PATH` 三种 JSON-RPC transport默认仍是 stdiows/unix 适合作为同机长驻 App Server 灰度路径
- 新增 App Server 过载退避:单个 JSON-RPC 请求收到 `-32001``retry later` 文案时,会在同一个任务生命周期内重试,超出上限后才进入失败/CLI fallback 判定
- 新增 App Server capability discovery`local-agent` 会把可用模型、默认/快速/深度模型建议、provider 能力、Skill、Plugin、App 摘要写入设备 heartbeatWeb 设备详情已显示 App Server、模型和扩展数量为后续 APP/后台模型配置页提供真实数据来源
- 新增 App Server 共享 Skill 根下发:配置 `codexAppServerSkillExtraRoots``BOSS_CODEX_APP_SERVER_SKILL_EXTRA_ROOTS`runner 会在 discovery 阶段调用 `skills/extraRoots/set`,再刷新 `skills/list`;设备详情页展示“共享 Skill 根N 个 · 已下发/下发失败”metadata 只保存数量、basename 和状态,不保存绝对路径
后续建议按两步继续:

View File

@@ -1,6 +1,6 @@
# Boss 当前运行与部署状态
更新时间:`2026-06-01`
更新时间:`2026-06-03`
## 1. 本地状态
@@ -35,11 +35,12 @@
- `launchd` 已安装:`~/Library/LaunchAgents/com.hyzq.boss.local-agent.plist`
- 当前执行底座抽象层已落地在 `src/lib/execution/`,并已补齐 `ExecutionBackend / PromptAssembler / PermissionPolicy / RemoteRuntimeAdapter / OrchestrationBackend` 默认实现
- 当前生产主链仍然沿用 `local-agent -> codex exec resume -> /api/v1/master-agent/tasks/[taskId]/complete`,执行底座重构以“先抽象、不改行为”为准
- 当前 Codex server 调研结论已记录在 `docs/architecture/codex_server_progress_card_cn.md`:长期优先方向更新为 `Codex App Server / Remote Control -> Inter-Thread Broker -> CodexMcpBackendAdapter -> codex exec resume` 的分层 provider 策略;当前 boss-agent 默认打开 `Codex App Server` runner 作为 Codex 绑定入口Boss 仍保留 `codex exec resume` 兜底,并继续用 `execution_progress` 结构化进度卡作为 APP 可见执行态。本机 `codex-cli 0.135.0-alpha.1` 协议快照已生成到 `docs/protocol-snapshots/codex-app-server/0.135.0-alpha.1/`,确认支持 WebSocket auth、`thread/inject_items``turn/steer``thread/realtime/*``thread/goal/*``thread/settings/updated``thread/compacted``ThreadItem.contextCompaction``ThreadItem.collabToolCall``account/*``model/verification``configWarning``deprecationNotice``command/exec``model/list`
- 当前 Codex server 调研结论已记录在 `docs/architecture/codex_server_progress_card_cn.md`:长期优先方向更新为 `Codex App Server / Remote Control -> Inter-Thread Broker -> CodexMcpBackendAdapter -> codex exec resume` 的分层 provider 策略;当前 boss-agent 默认打开 `Codex App Server` runner 作为 Codex 绑定入口Boss 仍保留 `codex exec resume` 兜底,并继续用 `execution_progress` 结构化进度卡作为 APP 可见执行态。本机 `codex-cli 0.136.0-alpha.2` 协议快照已生成到 `docs/protocol-snapshots/codex-app-server/0.136.0-alpha.2/`,确认支持 WebSocket auth、`thread/inject_items``turn/steer``thread/realtime/*``thread/goal/*``thread/settings/updated``thread/compacted``ThreadItem.contextCompaction``ThreadItem.collabToolCall``account/*``model/verification``configWarning``deprecationNotice``command/exec``model/list``skills/extraRoots/set`
- 当前 App Server 能力发现已新增治理摘要local-agent 会在 heartbeat discovery 中拉取 `experimentalFeature/list / collaborationMode/list / permissionProfile/list / mcpServerStatus/list`,并把实验特性、协作模式、权限 Profile 与 MCP 服务状态写入设备 `codexAppServer.metadata`;设备详情页会显示“治理”摘要。该链路只保留安全摘要,不保存 MCP resource URI、permission profile 文件规则、本地路径、token 或工具参数。
- 当前 App Server 能力发现已新增账号与配置摘要local-agent 会在 heartbeat discovery 中拉取 `account/read / account/rateLimits/read / config/read / configRequirements/read / externalAgentConfig/detect`并把账号登录方式、套餐、额度使用率、App 配置计数、托管要求数量和外部 Agent 迁移候选数量写入设备 `codexAppServer.metadata`;设备详情页会显示“账号 / 配置”摘要。该链路只读不写,不保存账号邮箱、完整 config、API key、本地路径或迁移描述。
- 当前 App Server 能力发现已新增线程可见性摘要local-agent 会在 heartbeat discovery 中拉取 `thread/list / thread/loaded/list`,并把线程总数、已加载线程数、活跃线程数、归档线程数、最新更新时间和非归档线程轻量目录写入设备 `codexAppServer.metadata.threadSummary`;设备详情页会显示“线程”摘要。该链路不保存 cwd、本地路径、turn 内容、用户正文或内部 prompt。
- 当前 App Server 能力发现已新增 turn 运行态摘要local-agent 会在 heartbeat discovery 中对非归档可见线程拉取 `thread/turns/list`,请求固定 `itemsView=notLoaded`,并把总轮次、运行中轮次、完成轮次、最新 turn 更新时间和每个线程的最近 turn 状态写入设备 `codexAppServer.metadata.threadTurnSummary`;设备详情页会显示“轮次”摘要。该链路不保存 turn id、turn items、用户正文、模型输出或内部 prompt。
- 当前 App Server 能力发现已支持共享 Skill 根目录下发:配置 `codexAppServerSkillExtraRoots` / `BOSS_CODEX_APP_SERVER_SKILL_EXTRA_ROOTS`local-agent 会先调用 `skills/extraRoots/set`,再刷新 `skills/list`,并把 `skillExtraRootsSummary` 写入设备 `codexAppServer.metadata`;设备详情页会显示“共享 Skill 根”。该链路只保存数量、basename 和状态不保存根目录绝对路径、Skill 文件路径或配置原文。
- 当前量产 B+ 架构开发文档已新增:`docs/architecture/enterprise_ai_ops_architecture_cn.md`。该文档把 PPT 中的主 Agent / 业务 Agent / 老板端 / 经理端 / 员工端 / 治理层 / 系统层 / 设备层 / 执行层 / 接入层整理成后续产品架构约束并明确数据库备份、业务回退、Codex 协议扩展和 Skill 治理方向;它是规划文档,不代表当前全部已落地
- 当前 `claw-code` 已以最小 `ClawBackendAdapter` 形式接入执行底座,但默认关闭;只有显式配置 `BOSS_CLAW_*` 且可用性探测通过时,`master-agent` 当前对话中才会出现并允许选择 `claw-runtime`
- 当前已新增最小 `Telegram Gateway`Boss 当前可直接暴露 Telegram webhook把 Telegram 私聊或受控群聊文本桥接进 `master-agent` 或按群 / Topic 路由到指定 Boss 项目,并在主 Agent 异步任务完成后自动回推 Telegram配置入口已接到 Web `/me/telegram` 和原生 Android `我的 > Telegram 接入`
@@ -253,7 +254,7 @@ cd /Users/kris/code/boss
- 当前 `local-agent` 已新增 `Codex App Server` providerboss-agent 默认配置 `codexAppServerEnabled=true``conversation_reply / dispatch_execution` 会先通过 `codex app-server` 的 stdio JSON-RPC 恢复或创建线程,也可配置 `codexAppServerTransport=ws + codexAppServerUrl=ws://127.0.0.1:<port>``codexAppServerTransport=unix + codexAppServerUrl=unix:///absolute/path.sock` 连接同机长驻 App Server长驻连接可通过 `codexAppServerAuthTokenFile``BOSS_CODEX_APP_SERVER_AUTH_TOKEN_FILE` 提供 bearer token。随后 runner 下发 `turn/start` 并收集流式 agent 回复;如果单个 JSON-RPC 请求返回 `-32001 / retry later`runner 会先做指数退避重试;如果任务携带 `targetCodexTurnId`,会改用 `turn/steer` 干预活跃 turn如果 App Server 在 turn 启动前失败,默认允许回退到 `codex exec resume`,如果 turn 已经启动则不再回退,避免同一轮用户消息被重复执行。桌面控制另有 `codexComputerUseEnabled=true`,默认先走 Codex Computer Use再回退 CUA Driver。
- 当前已新增 Boss 自有 Inter-Thread Broker 第一版:服务端入口 `POST /api/v1/projects/[projectId]/thread-collaboration` 会创建带源/目标 Codex 线程引用的协作任务App Server runner 执行 `thread/read(source) -> thread/inject_items(target) -> turn/start(target)`,用于让一个线程的结论受控进入另一个线程,不依赖官方任意线程 P2P 互聊能力
- 当前 `local-agent``dispatch_execution` 任务会按 `orchestrationBackendId` 分流:默认走 `codex exec resume`;当任务显式选择 `omx-team` 且本机 `omxEnabled + omxCommand/omxArgs` 可用时,会改走 `OMX Team Runtime` JSON 协议执行并回写 `rawThreadReply / replyBody`
- 当前 `local-agent` 会在 Codex 任务执行中和完成时回传 `executionProgress`:服务端把同一任务的进度卡从 queued / running 更新到 completed / failedAndroid 原生聊天页会显示“进度 / 线程状态 / 实时状态 / 线程配置 / 线程协作 / 工具活动 / 思考摘要 / 账号状态 / 运行状态 / 安全提醒 / 审批状态 / 文件变更 / 分支详情 / 生成结果 / 后台智能体”。2026-05-31 起Codex App Server 的 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started` 会直接映射为进度步骤、变更统计、生成产物和后台智能体;第二批已把 `item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated` 映射为审批、安全提醒和文件变更摘要;第三批已把 `thread/status/changed``thread/realtime/*` 安全映射为线程状态和实时状态摘要;第四批已把 `model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed` 安全映射为运行状态摘要;第五批已把 `thread/goal/*``thread/settings/updated``thread/compacted` 映射为线程配置摘要;第六批已把 `account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice` 映射为账号状态、模型校验和安全提醒摘要;第七批已把 `ThreadItem.collabToolCall``ThreadItem.contextCompaction` 映射为线程协作和上下文压缩摘要;第八批已把 `mcpToolCall``dynamicToolCall``webSearch``imageView``enteredReviewMode``exitedReviewMode``commandExecution` 映射为工具活动摘要;第九批已把 `ThreadItem.plan``ThreadItem.reasoning.summary` 映射为计划步骤与思考摘要;第十批已把 `ThreadItem.imageGeneration` 映射为图像生成工具活动和图片产物;第十一批已把 `hook/started|completed` 映射为钩子生命周期工具活动;第十二批已把 `windowsSandbox/setupCompleted` 映射为 Windows 沙箱准备状态摘要。所有进度均通过 `POST /api/v1/master-agent/tasks/[taskId]/progress` 实时刷新;字段白名单会剥离 cwd、turnId、配置文件路径、内部 prompt、collab 源/目标线程 ID、tool arguments/result、web URL token、命令正文/输出、raw reasoning content、reasoning item id、图像生成 revisedPrompt/result、hook sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths/本地绝对路径和未清洗密钥complete 回写仍会携带最终进度兜底
- 当前 `local-agent` 会在 Codex 任务执行中和完成时回传 `executionProgress`:服务端把同一任务的进度卡从 queued / running 更新到 completed / failedAndroid 原生聊天页会显示“进度 / 线程状态 / 实时状态 / 线程配置 / 线程协作 / 工具活动 / 思考摘要 / 账号状态 / 运行状态 / 安全提醒 / 审批状态 / 文件变更 / 分支详情 / 生成结果 / 后台智能体”。2026-05-31 起Codex App Server 的 `turn/plan/updated``turn/diff/updated``item/started|completed``thread/started` 会直接映射为进度步骤、变更统计、生成产物和后台智能体;第二批已把 `item/*/requestApproval``item/autoApprovalReview/*``guardianWarning``serverRequest/resolved``item/fileChange/patchUpdated` 映射为审批、安全提醒和文件变更摘要;第三批已把 `thread/status/changed``thread/realtime/*` 安全映射为线程状态和实时状态摘要;第四批已把 `model/rerouted``thread/tokenUsage/updated``mcpServer/startupStatus/updated``remoteControl/status/changed` 安全映射为运行状态摘要;第五批已把 `thread/goal/*``thread/settings/updated``thread/compacted` 映射为线程配置摘要;第六批已把 `account/updated``account/rateLimits/updated``model/verification``warning``configWarning``deprecationNotice` 映射为账号状态、模型校验和安全提醒摘要;第七批已把 `ThreadItem.collabToolCall``ThreadItem.contextCompaction` 映射为线程协作和上下文压缩摘要;第八批已把 `mcpToolCall``dynamicToolCall``webSearch``imageView``enteredReviewMode``exitedReviewMode``commandExecution` 映射为工具活动摘要;第九批已把 `ThreadItem.plan``ThreadItem.reasoning.summary` 映射为计划步骤与思考摘要;第十批已把 `ThreadItem.imageGeneration` 映射为图像生成工具活动和图片产物;第十一批已把 `hook/started|completed` 映射为钩子生命周期工具活动;第十二批已把 `windowsSandbox/setupCompleted` 映射为 Windows 沙箱准备状态摘要;第十七批已把新版 `ThreadItem.collabToolCall.receiverThreadIds / agentsStates` 安全映射为线程协作目标数量和 agent 状态集合。所有进度均通过 `POST /api/v1/master-agent/tasks/[taskId]/progress` 实时刷新;字段白名单会剥离 cwd、turnId、配置文件路径、内部 prompt、collab 源/目标线程 ID、receiverThreadIds、agentsStates 私有消息、共享 Skill 根绝对路径、tool arguments/result、web URL token、命令正文/输出、raw reasoning content、reasoning item id、图像生成 revisedPrompt/result、hook sourcePath/statusMessage/entries、Windows sandbox sourcePath/samplePaths/本地绝对路径和未清洗密钥complete 回写仍会携带最终进度兜底
- 当前 `local-agent` heartbeat 已新增 Codex App Server capability discovery按 TTL 拉取模型、provider 能力、Skill、Plugin、App 摘要,写入 `capabilities.codexAppServer.metadata`Web 设备详情会展示 App Server 连接状态、模型数量、默认/快速/深度模型和扩展数量
- 当前 `MasterAgentTask` 已具备服务端租约和取消基础状态机claim 会写入 `attemptCount / maxAttempts / leaseExpiresAt`,运行中任务租约过期后可被重新认领,超过重试上限会转 `timed_out``POST /api/v1/master-agent/tasks/[taskId]/cancel` 会把任务转 `canceled`,迟到的成功 complete 不会覆盖终态
- 当前 `local-agent``browser_control / desktop_control` 已从占位骨架升级成外部 runtime 桥:当本机配置了 `browserControlEnabled + browserControlCommand``computerUseEnabled + computerUseCommand` 时,会把标准化 JSON 请求透传给外部进程,并解析单行 JSON 结果;未启用时会 fail closed返回明确的 runtime disabled 错误,不再假装执行成功

View File

@@ -0,0 +1,78 @@
[experimental] Run the app server or related tooling
Usage: codex app-server [OPTIONS] [COMMAND]
Commands:
daemon Manage the local app-server daemon
proxy Proxy stdio bytes to the running app-server control socket
generate-ts [experimental] Generate TypeScript bindings for the app server protocol
generate-json-schema [experimental] Generate JSON Schema for the app server protocol
help Print this message or the help of the given subcommand(s)
Options:
-c, --config <key=value>
Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`.
Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed
as TOML. If it fails to parse as TOML, the raw string is used as a literal.
Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c
shell_environment_policy.inherit=all`
--enable <FEATURE>
Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
--disable <FEATURE>
Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
--strict-config
Error out when config.toml contains fields that are not recognized by this version of
Codex
--listen <URL>
Transport endpoint URL. Supported values: `stdio://` (default), `unix://`, `unix://PATH`,
`ws://IP:PORT`, `off`
[default: stdio://]
--stdio
Use stdio as the transport (equivalent to `--listen stdio://`)
--analytics-default-enabled
Controls whether analytics are enabled by default.
Analytics are disabled by default for app-server. Users have to explicitly opt in via the
`analytics` section in the config.toml file.
However, for first-party use cases like the VSCode IDE extension, we default analytics to
be enabled by default by setting this flag. Users can still opt out by setting this in
their config.toml:
```toml [analytics] enabled = false ```
See https://developers.openai.com/codex/config-advanced/#metrics for more details.
--ws-auth <MODE>
Websocket auth mode for non-loopback listeners
[possible values: capability-token, signed-bearer-token]
--ws-token-file <PATH>
Absolute path to the capability-token file
--ws-token-sha256 <HEX>
Hex-encoded SHA-256 digest of the capability token
--ws-shared-secret-file <PATH>
Absolute path to the shared secret file for signed JWT bearer tokens
--ws-issuer <ISSUER>
Expected issuer for signed JWT bearer tokens
--ws-audience <AUDIENCE>
Expected audience for signed JWT bearer tokens
--ws-max-clock-skew-seconds <SECONDS>
Maximum clock skew when validating signed JWT bearer tokens
-h, --help
Print help (see a summary with '-h')

View File

@@ -0,0 +1,114 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ApplyPatchApprovalParams",
"type": "object",
"required": [
"callId",
"conversationId",
"fileChanges"
],
"properties": {
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].",
"type": "string"
},
"conversationId": {
"$ref": "#/definitions/ThreadId"
},
"fileChanges": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/FileChange"
}
},
"grantRoot": {
"description": "When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
"type": [
"string",
"null"
]
},
"reason": {
"description": "Optional explanatory reason (e.g. request for extra write access).",
"type": [
"string",
"null"
]
}
},
"definitions": {
"FileChange": {
"oneOf": [
{
"type": "object",
"required": [
"content",
"type"
],
"properties": {
"content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"add"
],
"title": "AddFileChangeType"
}
},
"title": "AddFileChange"
},
{
"type": "object",
"required": [
"content",
"type"
],
"properties": {
"content": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"delete"
],
"title": "DeleteFileChangeType"
}
},
"title": "DeleteFileChange"
},
{
"type": "object",
"required": [
"type",
"unified_diff"
],
"properties": {
"move_path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"update"
],
"title": "UpdateFileChangeType"
},
"unified_diff": {
"type": "string"
}
},
"title": "UpdateFileChange"
}
]
},
"ThreadId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,124 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ApplyPatchApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"definitions": {
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"type": "string",
"enum": [
"approved"
]
},
{
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"type": "object",
"required": [
"approved_execpolicy_amendment"
],
"properties": {
"approved_execpolicy_amendment": {
"type": "object",
"required": [
"proposed_execpolicy_amendment"
],
"properties": {
"proposed_execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "ApprovedExecpolicyAmendmentReviewDecision"
},
{
"description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session.",
"type": "string",
"enum": [
"approved_for_session"
]
},
{
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "NetworkPolicyAmendmentReviewDecision"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"type": "string",
"enum": [
"denied"
]
},
{
"description": "Automatic approval review timed out before reaching a decision.",
"type": "string",
"enum": [
"timed_out"
]
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"type": "string",
"enum": [
"abort"
]
}
]
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AttestationGenerateParams",
"type": "object"
}

View File

@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AttestationGenerateResponse",
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"description": "Opaque client attestation token.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ChatgptAuthTokensRefreshParams",
"type": "object",
"required": [
"reason"
],
"properties": {
"previousAccountId": {
"description": "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).",
"type": [
"string",
"null"
]
},
"reason": {
"$ref": "#/definitions/ChatgptAuthTokensRefreshReason"
}
},
"definitions": {
"ChatgptAuthTokensRefreshReason": {
"oneOf": [
{
"description": "Codex attempted a backend request and received `401 Unauthorized`.",
"type": "string",
"enum": [
"unauthorized"
]
}
]
}
}
}

View File

@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ChatgptAuthTokensRefreshResponse",
"type": "object",
"required": [
"accessToken",
"chatgptAccountId"
],
"properties": {
"accessToken": {
"type": "string"
},
"chatgptAccountId": {
"type": "string"
},
"chatgptPlanType": {
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ClientNotification",
"oneOf": [
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"initialized"
],
"title": "InitializedNotificationMethod"
}
},
"title": "InitializedNotification"
}
]
}

View File

@@ -0,0 +1,616 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecutionRequestApprovalParams",
"type": "object",
"required": [
"itemId",
"startedAtMs",
"threadId",
"turnId"
],
"properties": {
"threadId": {
"type": "string"
},
"approvalId": {
"description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.",
"type": [
"string",
"null"
]
},
"turnId": {
"type": "string"
},
"command": {
"description": "The command to be executed.",
"type": [
"string",
"null"
]
},
"commandActions": {
"description": "Best-effort parsed command actions for friendly display.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/CommandAction"
}
},
"cwd": {
"description": "The command's working directory.",
"anyOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
},
{
"type": "null"
}
]
},
"itemId": {
"type": "string"
},
"networkApprovalContext": {
"description": "Optional context for a managed-network approval prompt.",
"anyOf": [
{
"$ref": "#/definitions/NetworkApprovalContext"
},
{
"type": "null"
}
]
},
"proposedExecpolicyAmendment": {
"description": "Optional proposed execpolicy amendment to allow similar commands without prompting.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"proposedNetworkPolicyAmendments": {
"description": "Optional proposed network policy amendments (allow/deny host) for future requests.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"reason": {
"description": "Optional explanatory reason (e.g. request for network access).",
"type": [
"string",
"null"
]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"type": "integer",
"format": "int64"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AdditionalFileSystemPermissions": {
"type": "object",
"properties": {
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
}
},
"globScanMaxDepth": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 1.0
},
"read": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"write": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
}
},
"AdditionalNetworkPermissions": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"AdditionalPermissionProfile": {
"type": "object",
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"description": "Partial overlay used for per-command permission requests.",
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
}
},
"CommandAction": {
"oneOf": [
{
"type": "object",
"required": [
"command",
"name",
"path",
"type"
],
"properties": {
"command": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"read"
],
"title": "ReadCommandActionType"
}
},
"title": "ReadCommandAction"
},
{
"type": "object",
"required": [
"command",
"type"
],
"properties": {
"command": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"listFiles"
],
"title": "ListFilesCommandActionType"
}
},
"title": "ListFilesCommandAction"
},
{
"type": "object",
"required": [
"command",
"type"
],
"properties": {
"command": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"query": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"search"
],
"title": "SearchCommandActionType"
}
},
"title": "SearchCommandAction"
},
{
"type": "object",
"required": [
"command",
"type"
],
"properties": {
"command": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"unknown"
],
"title": "UnknownCommandActionType"
}
},
"title": "UnknownCommandAction"
}
]
},
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"type": "object",
"required": [
"acceptWithExecpolicyAmendment"
],
"properties": {
"acceptWithExecpolicyAmendment": {
"type": "object",
"required": [
"execpolicy_amendment"
],
"properties": {
"execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"type": "object",
"required": [
"applyNetworkPolicyAmendment"
],
"properties": {
"applyNetworkPolicyAmendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User denied the command. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
},
"FileSystemAccessMode": {
"type": "string",
"enum": [
"read",
"write",
"deny"
]
},
"FileSystemPath": {
"oneOf": [
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"path"
],
"title": "PathFileSystemPathType"
}
},
"title": "PathFileSystemPath"
},
{
"type": "object",
"required": [
"pattern",
"type"
],
"properties": {
"pattern": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"glob_pattern"
],
"title": "GlobPatternFileSystemPathType"
}
},
"title": "GlobPatternFileSystemPath"
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"special"
],
"title": "SpecialFileSystemPathType"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"title": "SpecialFileSystemPath"
}
]
},
"FileSystemSandboxEntry": {
"type": "object",
"required": [
"access",
"path"
],
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
}
},
"FileSystemSpecialPath": {
"oneOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"root"
]
}
},
"title": "RootFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"minimal"
]
}
},
"title": "MinimalFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"project_roots"
]
},
"subpath": {
"type": [
"string",
"null"
]
}
},
"title": "KindFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"tmpdir"
]
}
},
"title": "TmpdirFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"slash_tmp"
]
}
},
"title": "SlashTmpFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"unknown"
]
},
"path": {
"type": "string"
},
"subpath": {
"type": [
"string",
"null"
]
}
}
}
]
},
"NetworkApprovalContext": {
"type": "object",
"required": [
"host",
"protocol"
],
"properties": {
"host": {
"type": "string"
},
"protocol": {
"$ref": "#/definitions/NetworkApprovalProtocol"
}
}
},
"NetworkApprovalProtocol": {
"type": "string",
"enum": [
"http",
"https",
"socks5Tcp",
"socks5Udp"
]
},
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
}
}
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecutionRequestApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/CommandExecutionApprovalDecision"
}
},
"definitions": {
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"type": "object",
"required": [
"acceptWithExecpolicyAmendment"
],
"properties": {
"acceptWithExecpolicyAmendment": {
"type": "object",
"required": [
"execpolicy_amendment"
],
"properties": {
"execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"type": "object",
"required": [
"applyNetworkPolicyAmendment"
],
"properties": {
"applyNetworkPolicyAmendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision"
},
{
"description": "User denied the command. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
},
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
}
}
}

View File

@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DynamicToolCallParams",
"type": "object",
"required": [
"arguments",
"callId",
"threadId",
"tool",
"turnId"
],
"properties": {
"arguments": true,
"callId": {
"type": "string"
},
"namespace": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"tool": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,66 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DynamicToolCallResponse",
"type": "object",
"required": [
"contentItems",
"success"
],
"properties": {
"contentItems": {
"type": "array",
"items": {
"$ref": "#/definitions/DynamicToolCallOutputContentItem"
}
},
"success": {
"type": "boolean"
}
},
"definitions": {
"DynamicToolCallOutputContentItem": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"inputText"
],
"title": "InputTextDynamicToolCallOutputContentItemType"
}
},
"title": "InputTextDynamicToolCallOutputContentItem"
},
{
"type": "object",
"required": [
"imageUrl",
"type"
],
"properties": {
"imageUrl": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"inputImage"
],
"title": "InputImageDynamicToolCallOutputContentItemType"
}
},
"title": "InputImageDynamicToolCallOutputContentItem"
}
]
}
}
}

View File

@@ -0,0 +1,165 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecCommandApprovalParams",
"type": "object",
"required": [
"callId",
"command",
"conversationId",
"cwd",
"parsedCmd"
],
"properties": {
"approvalId": {
"description": "Identifier for this specific approval callback.",
"type": [
"string",
"null"
]
},
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].",
"type": "string"
},
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"conversationId": {
"$ref": "#/definitions/ThreadId"
},
"cwd": {
"type": "string"
},
"parsedCmd": {
"type": "array",
"items": {
"$ref": "#/definitions/ParsedCommand"
}
},
"reason": {
"type": [
"string",
"null"
]
}
},
"definitions": {
"ParsedCommand": {
"oneOf": [
{
"type": "object",
"required": [
"cmd",
"name",
"path",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"description": "(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"read"
],
"title": "ReadParsedCommandType"
}
},
"title": "ReadParsedCommand"
},
{
"type": "object",
"required": [
"cmd",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"list_files"
],
"title": "ListFilesParsedCommandType"
}
},
"title": "ListFilesParsedCommand"
},
{
"type": "object",
"required": [
"cmd",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"query": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"search"
],
"title": "SearchParsedCommandType"
}
},
"title": "SearchParsedCommand"
},
{
"type": "object",
"required": [
"cmd",
"type"
],
"properties": {
"cmd": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"unknown"
],
"title": "UnknownParsedCommandType"
}
},
"title": "UnknownParsedCommand"
}
]
},
"ThreadId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,124 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecCommandApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"definitions": {
"NetworkPolicyAmendment": {
"type": "object",
"required": [
"action",
"host"
],
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
}
},
"NetworkPolicyRuleAction": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"type": "string",
"enum": [
"approved"
]
},
{
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"type": "object",
"required": [
"approved_execpolicy_amendment"
],
"properties": {
"approved_execpolicy_amendment": {
"type": "object",
"required": [
"proposed_execpolicy_amendment"
],
"properties": {
"proposed_execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false,
"title": "ApprovedExecpolicyAmendmentReviewDecision"
},
{
"description": "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session.",
"type": "string",
"enum": [
"approved_for_session"
]
},
{
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false,
"title": "NetworkPolicyAmendmentReviewDecision"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"type": "string",
"enum": [
"denied"
]
},
{
"description": "Automatic approval review timed out before reaching a decision.",
"type": "string",
"enum": [
"timed_out"
]
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"type": "string",
"enum": [
"abort"
]
}
]
}
}
}

View File

@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangeRequestApprovalParams",
"type": "object",
"required": [
"itemId",
"startedAtMs",
"threadId",
"turnId"
],
"properties": {
"grantRoot": {
"description": "[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
"reason": {
"description": "Optional explanatory reason (e.g. request for extra write access).",
"type": [
"string",
"null"
]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"type": "integer",
"format": "int64"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangeRequestApprovalResponse",
"type": "object",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/definitions/FileChangeApprovalDecision"
}
},
"definitions": {
"FileChangeApprovalDecision": {
"oneOf": [
{
"description": "User approved the file changes.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the file changes and future changes to the same files should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"description": "User denied the file changes. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the file changes. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
}
}
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchParams",
"type": "object",
"required": [
"query",
"roots"
],
"properties": {
"cancellationToken": {
"type": [
"string",
"null"
]
},
"query": {
"type": "string"
},
"roots": {
"type": "array",
"items": {
"type": "string"
}
}
}
}

View File

@@ -0,0 +1,66 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchResponse",
"type": "object",
"required": [
"files"
],
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
}
}
},
"definitions": {
"FuzzyFileSearchMatchType": {
"type": "string",
"enum": [
"file",
"directory"
]
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"type": "object",
"required": [
"file_name",
"match_type",
"path",
"root",
"score"
],
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"match_type": {
"$ref": "#/definitions/FuzzyFileSearchMatchType"
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchSessionCompletedNotification",
"type": "object",
"required": [
"sessionId"
],
"properties": {
"sessionId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FuzzyFileSearchSessionUpdatedNotification",
"type": "object",
"required": [
"files",
"query",
"sessionId"
],
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
}
},
"query": {
"type": "string"
},
"sessionId": {
"type": "string"
}
},
"definitions": {
"FuzzyFileSearchMatchType": {
"type": "string",
"enum": [
"file",
"directory"
]
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"type": "object",
"required": [
"file_name",
"match_type",
"path",
"root",
"score"
],
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"type": [
"array",
"null"
],
"items": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"match_type": {
"$ref": "#/definitions/FuzzyFileSearchMatchType"
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCError",
"description": "A response to a request that indicates an error occurred.",
"type": "object",
"required": [
"error",
"id"
],
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
},
"definitions": {
"JSONRPCErrorError": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"data": true,
"message": {
"type": "string"
}
}
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}
}
}

View File

@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCErrorError",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"data": true,
"message": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,137 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCMessage",
"description": "Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.",
"anyOf": [
{
"$ref": "#/definitions/JSONRPCRequest"
},
{
"$ref": "#/definitions/JSONRPCNotification"
},
{
"$ref": "#/definitions/JSONRPCResponse"
},
{
"$ref": "#/definitions/JSONRPCError"
}
],
"definitions": {
"JSONRPCError": {
"description": "A response to a request that indicates an error occurred.",
"type": "object",
"required": [
"error",
"id"
],
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
}
},
"JSONRPCErrorError": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"data": true,
"message": {
"type": "string"
}
}
},
"JSONRPCNotification": {
"description": "A notification which does not expect a response.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string"
},
"params": true
}
},
"JSONRPCRequest": {
"description": "A request that expects a response.",
"type": "object",
"required": [
"id",
"method"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true,
"trace": {
"description": "Optional W3C Trace Context for distributed tracing.",
"anyOf": [
{
"$ref": "#/definitions/W3cTraceContext"
},
{
"type": "null"
}
]
}
}
},
"JSONRPCResponse": {
"description": "A successful (non-error) response to a request.",
"type": "object",
"required": [
"id",
"result"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
}
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
},
"W3cTraceContext": {
"type": "object",
"properties": {
"traceparent": {
"type": [
"string",
"null"
]
},
"tracestate": {
"type": [
"string",
"null"
]
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCNotification",
"description": "A notification which does not expect a response.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string"
},
"params": true
}
}

View File

@@ -0,0 +1,60 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCRequest",
"description": "A request that expects a response.",
"type": "object",
"required": [
"id",
"method"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true,
"trace": {
"description": "Optional W3C Trace Context for distributed tracing.",
"anyOf": [
{
"$ref": "#/definitions/W3cTraceContext"
},
{
"type": "null"
}
]
}
},
"definitions": {
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
},
"W3cTraceContext": {
"type": "object",
"properties": {
"traceparent": {
"type": [
"string",
"null"
]
},
"tracestate": {
"type": [
"string",
"null"
]
}
}
}
}
}

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSONRPCResponse",
"description": "A successful (non-error) response to a request.",
"type": "object",
"required": [
"id",
"result"
],
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
},
"definitions": {
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}
}
}

View File

@@ -0,0 +1,609 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerElicitationRequestParams",
"type": "object",
"oneOf": [
{
"type": "object",
"required": [
"message",
"mode",
"requestedSchema"
],
"properties": {
"_meta": true,
"message": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"form"
]
},
"requestedSchema": {
"$ref": "#/definitions/McpElicitationSchema"
}
}
},
{
"type": "object",
"required": [
"elicitationId",
"message",
"mode",
"url"
],
"properties": {
"_meta": true,
"elicitationId": {
"type": "string"
},
"message": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"url"
]
},
"url": {
"type": "string"
}
}
}
],
"required": [
"serverName",
"threadId"
],
"properties": {
"serverName": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"description": "Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.",
"type": [
"string",
"null"
]
}
},
"definitions": {
"McpElicitationArrayType": {
"type": "string",
"enum": [
"array"
]
},
"McpElicitationBooleanSchema": {
"type": "object",
"required": [
"type"
],
"properties": {
"default": {
"type": [
"boolean",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationBooleanType"
}
},
"additionalProperties": false
},
"McpElicitationBooleanType": {
"type": "string",
"enum": [
"boolean"
]
},
"McpElicitationConstOption": {
"type": "object",
"required": [
"const",
"title"
],
"properties": {
"const": {
"type": "string"
},
"title": {
"type": "string"
}
},
"additionalProperties": false
},
"McpElicitationEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationSingleSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationMultiSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationLegacyTitledEnumSchema"
}
]
},
"McpElicitationLegacyTitledEnumSchema": {
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"enumNames": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationMultiSelectEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationUntitledMultiSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationTitledMultiSelectEnumSchema"
}
]
},
"McpElicitationNumberSchema": {
"type": "object",
"required": [
"type"
],
"properties": {
"default": {
"type": [
"number",
"null"
],
"format": "double"
},
"description": {
"type": [
"string",
"null"
]
},
"maximum": {
"type": [
"number",
"null"
],
"format": "double"
},
"minimum": {
"type": [
"number",
"null"
],
"format": "double"
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationNumberType"
}
},
"additionalProperties": false
},
"McpElicitationNumberType": {
"type": "string",
"enum": [
"number",
"integer"
]
},
"McpElicitationObjectType": {
"type": "string",
"enum": [
"object"
]
},
"McpElicitationPrimitiveSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationStringSchema"
},
{
"$ref": "#/definitions/McpElicitationNumberSchema"
},
{
"$ref": "#/definitions/McpElicitationBooleanSchema"
}
]
},
"McpElicitationSchema": {
"description": "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.",
"type": "object",
"required": [
"properties",
"type"
],
"properties": {
"$schema": {
"type": [
"string",
"null"
]
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/McpElicitationPrimitiveSchema"
}
},
"required": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"type": {
"$ref": "#/definitions/McpElicitationObjectType"
}
},
"additionalProperties": false
},
"McpElicitationSingleSelectEnumSchema": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationUntitledSingleSelectEnumSchema"
},
{
"$ref": "#/definitions/McpElicitationTitledSingleSelectEnumSchema"
}
]
},
"McpElicitationStringFormat": {
"type": "string",
"enum": [
"email",
"uri",
"date",
"date-time"
]
},
"McpElicitationStringSchema": {
"type": "object",
"required": [
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"format": {
"anyOf": [
{
"$ref": "#/definitions/McpElicitationStringFormat"
},
{
"type": "null"
}
]
},
"maxLength": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationStringType": {
"type": "string",
"enum": [
"string"
]
},
"McpElicitationTitledEnumItems": {
"type": "object",
"required": [
"anyOf"
],
"properties": {
"anyOf": {
"type": "array",
"items": {
"$ref": "#/definitions/McpElicitationConstOption"
}
}
},
"additionalProperties": false
},
"McpElicitationTitledMultiSelectEnumSchema": {
"type": "object",
"required": [
"items",
"type"
],
"properties": {
"default": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"description": {
"type": [
"string",
"null"
]
},
"items": {
"$ref": "#/definitions/McpElicitationTitledEnumItems"
},
"maxItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"minItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationArrayType"
}
},
"additionalProperties": false
},
"McpElicitationTitledSingleSelectEnumSchema": {
"type": "object",
"required": [
"oneOf",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"oneOf": {
"type": "array",
"items": {
"$ref": "#/definitions/McpElicitationConstOption"
}
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationUntitledEnumItems": {
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
},
"McpElicitationUntitledMultiSelectEnumSchema": {
"type": "object",
"required": [
"items",
"type"
],
"properties": {
"default": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"description": {
"type": [
"string",
"null"
]
},
"items": {
"$ref": "#/definitions/McpElicitationUntitledEnumItems"
},
"maxItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"minItems": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationArrayType"
}
},
"additionalProperties": false
},
"McpElicitationUntitledSingleSelectEnumSchema": {
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/McpElicitationStringType"
}
},
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerElicitationRequestResponse",
"type": "object",
"required": [
"action"
],
"properties": {
"_meta": {
"description": "Optional client metadata for form-mode action handling."
},
"action": {
"$ref": "#/definitions/McpServerElicitationAction"
},
"content": {
"description": "Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.\n\nThis is nullable because decline/cancel responses have no content."
}
},
"definitions": {
"McpServerElicitationAction": {
"type": "string",
"enum": [
"accept",
"decline",
"cancel"
]
}
}
}

View File

@@ -0,0 +1,322 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PermissionsRequestApprovalParams",
"type": "object",
"required": [
"cwd",
"itemId",
"permissions",
"startedAtMs",
"threadId",
"turnId"
],
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"itemId": {
"type": "string"
},
"permissions": {
"$ref": "#/definitions/RequestPermissionProfile"
},
"reason": {
"type": [
"string",
"null"
]
},
"startedAtMs": {
"description": "Unix timestamp (in milliseconds) when this approval request started.",
"type": "integer",
"format": "int64"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AdditionalFileSystemPermissions": {
"type": "object",
"properties": {
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
}
},
"globScanMaxDepth": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 1.0
},
"read": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"write": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
}
},
"AdditionalNetworkPermissions": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"FileSystemAccessMode": {
"type": "string",
"enum": [
"read",
"write",
"deny"
]
},
"FileSystemPath": {
"oneOf": [
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"path"
],
"title": "PathFileSystemPathType"
}
},
"title": "PathFileSystemPath"
},
{
"type": "object",
"required": [
"pattern",
"type"
],
"properties": {
"pattern": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"glob_pattern"
],
"title": "GlobPatternFileSystemPathType"
}
},
"title": "GlobPatternFileSystemPath"
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"special"
],
"title": "SpecialFileSystemPathType"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"title": "SpecialFileSystemPath"
}
]
},
"FileSystemSandboxEntry": {
"type": "object",
"required": [
"access",
"path"
],
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
}
},
"FileSystemSpecialPath": {
"oneOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"root"
]
}
},
"title": "RootFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"minimal"
]
}
},
"title": "MinimalFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"project_roots"
]
},
"subpath": {
"type": [
"string",
"null"
]
}
},
"title": "KindFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"tmpdir"
]
}
},
"title": "TmpdirFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"slash_tmp"
]
}
},
"title": "SlashTmpFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"unknown"
]
},
"path": {
"type": "string"
},
"subpath": {
"type": [
"string",
"null"
]
}
}
}
]
},
"RequestPermissionProfile": {
"type": "object",
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,315 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PermissionsRequestApprovalResponse",
"type": "object",
"required": [
"permissions"
],
"properties": {
"permissions": {
"$ref": "#/definitions/GrantedPermissionProfile"
},
"scope": {
"default": "turn",
"allOf": [
{
"$ref": "#/definitions/PermissionGrantScope"
}
]
},
"strictAutoReview": {
"description": "Review every subsequent command in this turn before normal sandboxed execution.",
"type": [
"boolean",
"null"
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AdditionalFileSystemPermissions": {
"type": "object",
"properties": {
"entries": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FileSystemSandboxEntry"
}
},
"globScanMaxDepth": {
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 1.0
},
"read": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"write": {
"description": "This will be removed in favor of `entries`.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
}
},
"AdditionalNetworkPermissions": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"FileSystemAccessMode": {
"type": "string",
"enum": [
"read",
"write",
"deny"
]
},
"FileSystemPath": {
"oneOf": [
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"path"
],
"title": "PathFileSystemPathType"
}
},
"title": "PathFileSystemPath"
},
{
"type": "object",
"required": [
"pattern",
"type"
],
"properties": {
"pattern": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"glob_pattern"
],
"title": "GlobPatternFileSystemPathType"
}
},
"title": "GlobPatternFileSystemPath"
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"special"
],
"title": "SpecialFileSystemPathType"
},
"value": {
"$ref": "#/definitions/FileSystemSpecialPath"
}
},
"title": "SpecialFileSystemPath"
}
]
},
"FileSystemSandboxEntry": {
"type": "object",
"required": [
"access",
"path"
],
"properties": {
"access": {
"$ref": "#/definitions/FileSystemAccessMode"
},
"path": {
"$ref": "#/definitions/FileSystemPath"
}
}
},
"FileSystemSpecialPath": {
"oneOf": [
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"root"
]
}
},
"title": "RootFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"minimal"
]
}
},
"title": "MinimalFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"project_roots"
]
},
"subpath": {
"type": [
"string",
"null"
]
}
},
"title": "KindFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"tmpdir"
]
}
},
"title": "TmpdirFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"slash_tmp"
]
}
},
"title": "SlashTmpFileSystemSpecialPath"
},
{
"type": "object",
"required": [
"kind",
"path"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"unknown"
]
},
"path": {
"type": "string"
},
"subpath": {
"type": [
"string",
"null"
]
}
}
}
]
},
"GrantedPermissionProfile": {
"type": "object",
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"network": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalNetworkPermissions"
},
{
"type": "null"
}
]
}
}
},
"PermissionGrantScope": {
"type": "string",
"enum": [
"turn",
"session"
]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RequestId",
"anyOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "int64"
}
]
}

View File

@@ -0,0 +1,84 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ToolRequestUserInputParams",
"description": "EXPERIMENTAL. Params sent with a request_user_input event.",
"type": "object",
"required": [
"itemId",
"questions",
"threadId",
"turnId"
],
"properties": {
"itemId": {
"type": "string"
},
"questions": {
"type": "array",
"items": {
"$ref": "#/definitions/ToolRequestUserInputQuestion"
}
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"definitions": {
"ToolRequestUserInputOption": {
"description": "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
"type": "object",
"required": [
"description",
"label"
],
"properties": {
"description": {
"type": "string"
},
"label": {
"type": "string"
}
}
},
"ToolRequestUserInputQuestion": {
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
"type": "object",
"required": [
"header",
"id",
"question"
],
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ToolRequestUserInputOption"
}
},
"question": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ToolRequestUserInputResponse",
"description": "EXPERIMENTAL. Response payload mapping question ids to answers.",
"type": "object",
"required": [
"answers"
],
"properties": {
"answers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ToolRequestUserInputAnswer"
}
}
},
"definitions": {
"ToolRequestUserInputAnswer": {
"description": "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
"type": "object",
"required": [
"answers"
],
"properties": {
"answers": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}

View File

@@ -0,0 +1,72 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InitializeParams",
"type": "object",
"required": [
"clientInfo"
],
"properties": {
"capabilities": {
"anyOf": [
{
"$ref": "#/definitions/InitializeCapabilities"
},
{
"type": "null"
}
]
},
"clientInfo": {
"$ref": "#/definitions/ClientInfo"
}
},
"definitions": {
"ClientInfo": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
}
}
},
"InitializeCapabilities": {
"description": "Client-declared capabilities negotiated during initialize.",
"type": "object",
"properties": {
"experimentalApi": {
"description": "Opt into receiving experimental API methods and fields.",
"default": false,
"type": "boolean"
},
"optOutNotificationMethods": {
"description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"requestAttestation": {
"description": "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
"default": false,
"type": "boolean"
}
}
}
}
}

View File

@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InitializeResponse",
"type": "object",
"required": [
"codexHome",
"platformFamily",
"platformOs",
"userAgent"
],
"properties": {
"codexHome": {
"description": "Absolute path to the server's $CODEX_HOME directory.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"platformFamily": {
"description": "Platform family for the running app-server target, for example `\"unix\"` or `\"windows\"`.",
"type": "string"
},
"platformOs": {
"description": "Operating system for the running app-server target, for example `\"macos\"`, `\"linux\"`, or `\"windows\"`.",
"type": "string"
},
"userAgent": {
"type": "string"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountLoginCompletedNotification",
"type": "object",
"required": [
"success"
],
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"loginId": {
"type": [
"string",
"null"
]
},
"success": {
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,156 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountRateLimitsUpdatedNotification",
"type": "object",
"required": [
"rateLimits"
],
"properties": {
"rateLimits": {
"$ref": "#/definitions/RateLimitSnapshot"
}
},
"definitions": {
"CreditsSnapshot": {
"type": "object",
"required": [
"hasCredits",
"unlimited"
],
"properties": {
"balance": {
"type": [
"string",
"null"
]
},
"hasCredits": {
"type": "boolean"
},
"unlimited": {
"type": "boolean"
}
}
},
"PlanType": {
"type": "string",
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
]
},
"RateLimitReachedType": {
"type": "string",
"enum": [
"rate_limit_reached",
"workspace_owner_credits_depleted",
"workspace_member_credits_depleted",
"workspace_owner_usage_limit_reached",
"workspace_member_usage_limit_reached"
]
},
"RateLimitSnapshot": {
"type": "object",
"properties": {
"credits": {
"anyOf": [
{
"$ref": "#/definitions/CreditsSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": [
"string",
"null"
]
},
"limitName": {
"type": [
"string",
"null"
]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/PlanType"
},
{
"type": "null"
}
]
},
"primary": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitWindow"
},
{
"type": "null"
}
]
},
"rateLimitReachedType": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitReachedType"
},
{
"type": "null"
}
]
},
"secondary": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitWindow"
},
{
"type": "null"
}
]
}
}
},
"RateLimitWindow": {
"type": "object",
"required": [
"usedPercent"
],
"properties": {
"resetsAt": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"usedPercent": {
"type": "integer",
"format": "int32"
},
"windowDurationMins": {
"type": [
"integer",
"null"
],
"format": "int64"
}
}
}
}
}

View File

@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AccountUpdatedNotification",
"type": "object",
"properties": {
"authMode": {
"anyOf": [
{
"$ref": "#/definitions/AuthMode"
},
{
"type": "null"
}
]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/PlanType"
},
{
"type": "null"
}
]
}
},
"definitions": {
"AuthMode": {
"description": "Authentication mode for OpenAI-backed providers.",
"oneOf": [
{
"description": "OpenAI API key provided by the caller and stored by Codex.",
"type": "string",
"enum": [
"apikey"
]
},
{
"description": "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
"type": "string",
"enum": [
"chatgpt"
]
},
{
"description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
"type": "string",
"enum": [
"chatgptAuthTokens"
]
},
{
"description": "Programmatic Codex auth backed by a registered Agent Identity.",
"type": "string",
"enum": [
"agentIdentity"
]
}
]
},
"PlanType": {
"type": "string",
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
]
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AgentMessageDeltaNotification",
"type": "object",
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,276 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AppListUpdatedNotification",
"description": "EXPERIMENTAL - notification emitted when the app list changes.",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AppInfo"
}
}
},
"definitions": {
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"isDiscoverableApp"
],
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"developer": {
"type": [
"string",
"null"
]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": [
"string",
"null"
]
},
"termsOfService": {
"type": [
"string",
"null"
]
},
"website": {
"type": [
"string",
"null"
]
}
}
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": [
"string",
"null"
]
},
"distributionChannel": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"installUrl": {
"type": [
"string",
"null"
]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"default": true,
"type": "boolean"
},
"labels": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"logoUrl": {
"type": [
"string",
"null"
]
},
"logoUrlDark": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"pluginDisplayNames": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"AppMetadata": {
"type": "object",
"properties": {
"categories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"developer": {
"type": [
"string",
"null"
]
},
"firstPartyRequiresInstall": {
"type": [
"boolean",
"null"
]
},
"firstPartyType": {
"type": [
"string",
"null"
]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AppScreenshot"
}
},
"seoDescription": {
"type": [
"string",
"null"
]
},
"showInComposerWhenUnlinked": {
"type": [
"boolean",
"null"
]
},
"subCategories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"version": {
"type": [
"string",
"null"
]
},
"versionId": {
"type": [
"string",
"null"
]
},
"versionNotes": {
"type": [
"string",
"null"
]
}
}
},
"AppReview": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string"
}
}
},
"AppScreenshot": {
"type": "object",
"required": [
"userPrompt"
],
"properties": {
"fileId": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"userPrompt": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AppsListParams",
"description": "EXPERIMENTAL - list available apps/connectors.",
"type": "object",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"forceRefetch": {
"description": "When true, bypass app caches and fetch the latest data from sources.",
"type": "boolean"
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"threadId": {
"description": "Optional thread id used to evaluate app feature gating from that thread's config.",
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,283 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AppsListResponse",
"description": "EXPERIMENTAL - app list response.",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AppInfo"
}
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"definitions": {
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"isDiscoverableApp"
],
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"developer": {
"type": [
"string",
"null"
]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": [
"string",
"null"
]
},
"termsOfService": {
"type": [
"string",
"null"
]
},
"website": {
"type": [
"string",
"null"
]
}
}
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": [
"string",
"null"
]
},
"distributionChannel": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"installUrl": {
"type": [
"string",
"null"
]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"default": true,
"type": "boolean"
},
"labels": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"logoUrl": {
"type": [
"string",
"null"
]
},
"logoUrlDark": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"pluginDisplayNames": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"AppMetadata": {
"type": "object",
"properties": {
"categories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"developer": {
"type": [
"string",
"null"
]
},
"firstPartyRequiresInstall": {
"type": [
"boolean",
"null"
]
},
"firstPartyType": {
"type": [
"string",
"null"
]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AppScreenshot"
}
},
"seoDescription": {
"type": [
"string",
"null"
]
},
"showInComposerWhenUnlinked": {
"type": [
"boolean",
"null"
]
},
"subCategories": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"version": {
"type": [
"string",
"null"
]
},
"versionId": {
"type": [
"string",
"null"
]
},
"versionNotes": {
"type": [
"string",
"null"
]
}
}
},
"AppReview": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string"
}
}
},
"AppScreenshot": {
"type": "object",
"required": [
"userPrompt"
],
"properties": {
"fileId": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"userPrompt": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CancelLoginAccountParams",
"type": "object",
"required": [
"loginId"
],
"properties": {
"loginId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CancelLoginAccountResponse",
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"$ref": "#/definitions/CancelLoginAccountStatus"
}
},
"definitions": {
"CancelLoginAccountStatus": {
"type": "string",
"enum": [
"canceled",
"notFound"
]
}
}
}

View File

@@ -0,0 +1,55 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecOutputDeltaNotification",
"description": "Base64-encoded output chunk emitted for a streaming `command/exec` request.\n\nThese notifications are connection-scoped. If the originating connection closes, the server terminates the process.",
"type": "object",
"required": [
"capReached",
"deltaBase64",
"processId",
"stream"
],
"properties": {
"capReached": {
"description": "`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
"type": "boolean"
},
"deltaBase64": {
"description": "Base64-encoded output bytes.",
"type": "string"
},
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
},
"stream": {
"description": "Output stream for this chunk.",
"allOf": [
{
"$ref": "#/definitions/CommandExecOutputStream"
}
]
}
},
"definitions": {
"CommandExecOutputStream": {
"description": "Stream label for `command/exec/outputDelta` notifications.",
"oneOf": [
{
"description": "stdout stream. PTY mode multiplexes terminal output here.",
"type": "string",
"enum": [
"stdout"
]
},
{
"description": "stderr stream.",
"type": "string",
"enum": [
"stderr"
]
}
]
}
}
}

View File

@@ -0,0 +1,238 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecParams",
"description": "Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.",
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"description": "Command argv vector. Empty arrays are rejected.",
"type": "array",
"items": {
"type": "string"
}
},
"cwd": {
"description": "Optional working directory. Defaults to the server cwd.",
"type": [
"string",
"null"
]
},
"disableOutputCap": {
"description": "Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.",
"type": "boolean"
},
"disableTimeout": {
"description": "Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.",
"type": "boolean"
},
"env": {
"description": "Optional environment overrides merged into the server-computed environment.\n\nMatching names override inherited values. Set a key to `null` to unset an inherited variable.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": [
"string",
"null"
]
}
},
"outputBytesCap": {
"description": "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
},
"tty": {
"description": "Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.",
"type": "boolean"
},
"processId": {
"description": "Optional client-supplied, connection-scoped process id.\n\nRequired for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up `command/exec/write`, `command/exec/resize`, and `command/exec/terminate` calls. When omitted, buffered execution gets an internal id that is not exposed to the client.",
"type": [
"string",
"null"
]
},
"sandboxPolicy": {
"description": "Optional sandbox policy for this command.\n\nUses the same shape as thread/turn execution sandbox configuration and defaults to the user's configured policy when omitted. Cannot be combined with `permissionProfile`.",
"anyOf": [
{
"$ref": "#/definitions/SandboxPolicy"
},
{
"type": "null"
}
]
},
"size": {
"description": "Optional initial PTY size in character cells. Only valid when `tty` is true.",
"anyOf": [
{
"$ref": "#/definitions/CommandExecTerminalSize"
},
{
"type": "null"
}
]
},
"streamStdin": {
"description": "Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.",
"type": "boolean"
},
"streamStdoutStderr": {
"description": "Stream stdout/stderr via `command/exec/outputDelta` notifications.\n\nStreamed bytes are not duplicated into the final response and require a client-supplied `processId`.",
"type": "boolean"
},
"timeoutMs": {
"description": "Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.",
"type": [
"integer",
"null"
],
"format": "int64"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.",
"type": "object",
"required": [
"cols",
"rows"
],
"properties": {
"cols": {
"description": "Terminal width in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"rows": {
"description": "Terminal height in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
}
},
"NetworkAccess": {
"type": "string",
"enum": [
"restricted",
"enabled"
]
},
"SandboxPolicy": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"dangerFullAccess"
],
"title": "DangerFullAccessSandboxPolicyType"
}
},
"title": "DangerFullAccessSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"readOnly"
],
"title": "ReadOnlySandboxPolicyType"
}
},
"title": "ReadOnlySandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"networkAccess": {
"default": "restricted",
"allOf": [
{
"$ref": "#/definitions/NetworkAccess"
}
]
},
"type": {
"type": "string",
"enum": [
"externalSandbox"
],
"title": "ExternalSandboxSandboxPolicyType"
}
},
"title": "ExternalSandboxSandboxPolicy"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"excludeSlashTmp": {
"default": false,
"type": "boolean"
},
"excludeTmpdirEnvVar": {
"default": false,
"type": "boolean"
},
"networkAccess": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"workspaceWrite"
],
"title": "WorkspaceWriteSandboxPolicyType"
},
"writableRoots": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
}
},
"title": "WorkspaceWriteSandboxPolicy"
}
]
}
}
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecResizeParams",
"description": "Resize a running PTY-backed `command/exec` session.",
"type": "object",
"required": [
"processId",
"size"
],
"properties": {
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
},
"size": {
"description": "New PTY size in character cells.",
"allOf": [
{
"$ref": "#/definitions/CommandExecTerminalSize"
}
]
}
},
"definitions": {
"CommandExecTerminalSize": {
"description": "PTY size in character cells for `command/exec` PTY sessions.",
"type": "object",
"required": [
"cols",
"rows"
],
"properties": {
"cols": {
"description": "Terminal width in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"rows": {
"description": "Terminal height in character cells.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecResizeResponse",
"description": "Empty success response for `command/exec/resize`.",
"type": "object"
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecResponse",
"description": "Final buffered result for `command/exec`.",
"type": "object",
"required": [
"exitCode",
"stderr",
"stdout"
],
"properties": {
"exitCode": {
"description": "Process exit code.",
"type": "integer",
"format": "int32"
},
"stderr": {
"description": "Buffered stderr capture.\n\nEmpty when stderr was streamed via `command/exec/outputDelta`.",
"type": "string"
},
"stdout": {
"description": "Buffered stdout capture.\n\nEmpty when stdout was streamed via `command/exec/outputDelta`.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecTerminateParams",
"description": "Terminate a running `command/exec` session.",
"type": "object",
"required": [
"processId"
],
"properties": {
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecTerminateResponse",
"description": "Empty success response for `command/exec/terminate`.",
"type": "object"
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecWriteParams",
"description": "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
"type": "object",
"required": [
"processId"
],
"properties": {
"closeStdin": {
"description": "Close stdin after writing `deltaBase64`, if present.",
"type": "boolean"
},
"deltaBase64": {
"description": "Optional base64-encoded stdin bytes to write.",
"type": [
"string",
"null"
]
},
"processId": {
"description": "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecWriteResponse",
"description": "Empty success response for `command/exec/write`.",
"type": "object"
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommandExecutionOutputDeltaNotification",
"type": "object",
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,59 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigBatchWriteParams",
"type": "object",
"required": [
"edits"
],
"properties": {
"edits": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfigEdit"
}
},
"expectedVersion": {
"type": [
"string",
"null"
]
},
"filePath": {
"description": "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
"type": [
"string",
"null"
]
},
"reloadUserConfig": {
"description": "When true, hot-reload the updated user config into all loaded threads after writing.",
"type": "boolean"
}
},
"definitions": {
"ConfigEdit": {
"type": "object",
"required": [
"keyPath",
"mergeStrategy",
"value"
],
"properties": {
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/MergeStrategy"
},
"value": true
}
},
"MergeStrategy": {
"type": "string",
"enum": [
"replace",
"upsert"
]
}
}
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigReadParams",
"type": "object",
"properties": {
"cwd": {
"description": "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
"type": [
"string",
"null"
]
},
"includeLayers": {
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,828 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigReadResponse",
"type": "object",
"required": [
"config",
"origins"
],
"properties": {
"config": {
"$ref": "#/definitions/Config"
},
"layers": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ConfigLayer"
}
},
"origins": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ConfigLayerMetadata"
}
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"AnalyticsConfig": {
"type": "object",
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": true
},
"AppConfig": {
"type": "object",
"properties": {
"default_tools_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"default_tools_enabled": {
"type": [
"boolean",
"null"
]
},
"destructive_enabled": {
"type": [
"boolean",
"null"
]
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"type": [
"boolean",
"null"
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/AppToolsConfig"
},
{
"type": "null"
}
]
}
}
},
"AppToolApproval": {
"type": "string",
"enum": [
"auto",
"prompt",
"approve"
]
},
"AppToolConfig": {
"type": "object",
"properties": {
"approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/AppToolApproval"
},
{
"type": "null"
}
]
},
"enabled": {
"type": [
"boolean",
"null"
]
}
}
},
"AppToolsConfig": {
"type": "object"
},
"ApprovalsReviewer": {
"description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
"type": "string",
"enum": [
"user",
"auto_review",
"guardian_subagent"
]
},
"AppsConfig": {
"type": "object",
"properties": {
"_default": {
"default": null,
"anyOf": [
{
"$ref": "#/definitions/AppsDefaultConfig"
},
{
"type": "null"
}
]
}
}
},
"AppsDefaultConfig": {
"type": "object",
"properties": {
"destructive_enabled": {
"default": true,
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"default": true,
"type": "boolean"
}
}
},
"AskForApproval": {
"oneOf": [
{
"type": "string",
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
]
},
{
"type": "object",
"required": [
"granular"
],
"properties": {
"granular": {
"type": "object",
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
}
}
},
"additionalProperties": false,
"title": "GranularAskForApproval"
}
]
},
"AutoCompactTokenLimitScope": {
"description": "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
"oneOf": [
{
"description": "Count the full active context against the limit.",
"type": "string",
"enum": [
"total"
]
},
{
"description": "Count sampled output and later growth after the carried window prefix.",
"type": "string",
"enum": [
"body_after_prefix"
]
}
]
},
"Config": {
"type": "object",
"properties": {
"analytics": {
"anyOf": [
{
"$ref": "#/definitions/AnalyticsConfig"
},
{
"type": "null"
}
]
},
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/AskForApproval"
},
{
"type": "null"
}
]
},
"approvals_reviewer": {
"description": "[UNSTABLE] Optional default for where approval requests are routed for review.",
"anyOf": [
{
"$ref": "#/definitions/ApprovalsReviewer"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchMode"
},
{
"type": "null"
}
]
},
"compact_prompt": {
"type": [
"string",
"null"
]
},
"desktop": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"developer_instructions": {
"type": [
"string",
"null"
]
},
"forced_chatgpt_workspace_id": {
"anyOf": [
{
"$ref": "#/definitions/ForcedChatgptWorkspaceIds"
},
{
"type": "null"
}
]
},
"forced_login_method": {
"anyOf": [
{
"$ref": "#/definitions/ForcedLoginMethod"
},
{
"type": "null"
}
]
},
"instructions": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"model_auto_compact_token_limit": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"model_auto_compact_token_limit_scope": {
"anyOf": [
{
"$ref": "#/definitions/AutoCompactTokenLimitScope"
},
{
"type": "null"
}
]
},
"model_context_window": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"model_provider": {
"type": [
"string",
"null"
]
},
"model_reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model_reasoning_summary": {
"anyOf": [
{
"$ref": "#/definitions/ReasoningSummary"
},
{
"type": "null"
}
]
},
"model_verbosity": {
"anyOf": [
{
"$ref": "#/definitions/Verbosity"
},
{
"type": "null"
}
]
},
"review_model": {
"type": [
"string",
"null"
]
},
"sandbox_mode": {
"anyOf": [
{
"$ref": "#/definitions/SandboxMode"
},
{
"type": "null"
}
]
},
"sandbox_workspace_write": {
"anyOf": [
{
"$ref": "#/definitions/SandboxWorkspaceWrite"
},
{
"type": "null"
}
]
},
"service_tier": {
"type": [
"string",
"null"
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/ToolsV2"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true
},
"ConfigLayer": {
"type": "object",
"required": [
"config",
"name",
"version"
],
"properties": {
"config": true,
"disabledReason": {
"type": [
"string",
"null"
]
},
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
}
},
"ConfigLayerMetadata": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
}
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"type": "object",
"required": [
"domain",
"key",
"type"
],
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"mdm"
],
"title": "MdmConfigLayerSourceType"
}
},
"title": "MdmConfigLayerSource"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"type": {
"type": "string",
"enum": [
"system"
],
"title": "SystemConfigLayerSourceType"
}
},
"title": "SystemConfigLayerSource"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"profile": {
"description": "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.",
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"user"
],
"title": "UserConfigLayerSourceType"
}
},
"title": "UserConfigLayerSource"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"type": "object",
"required": [
"dotCodexFolder",
"type"
],
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"project"
],
"title": "ProjectConfigLayerSourceType"
}
},
"title": "ProjectConfigLayerSource"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"sessionFlags"
],
"title": "SessionFlagsConfigLayerSourceType"
}
},
"title": "SessionFlagsConfigLayerSource"
},
{
"description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`.",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromFile"
],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromMdm"
],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource"
}
]
},
"ForcedChatgptWorkspaceIds": {
"description": "Backward-compatible API shape for ChatGPT workspace login restrictions.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"ForcedLoginMethod": {
"type": "string",
"enum": [
"chatgpt",
"api"
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
]
},
"ReasoningSummary": {
"description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
"oneOf": [
{
"type": "string",
"enum": [
"auto",
"concise",
"detailed"
]
},
{
"description": "Option to disable reasoning summaries.",
"type": "string",
"enum": [
"none"
]
}
]
},
"SandboxMode": {
"type": "string",
"enum": [
"read-only",
"workspace-write",
"danger-full-access"
]
},
"SandboxWorkspaceWrite": {
"type": "object",
"properties": {
"exclude_slash_tmp": {
"default": false,
"type": "boolean"
},
"exclude_tmpdir_env_var": {
"default": false,
"type": "boolean"
},
"network_access": {
"default": false,
"type": "boolean"
},
"writable_roots": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ToolsV2": {
"type": "object",
"properties": {
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchToolConfig"
},
{
"type": "null"
}
]
}
}
},
"Verbosity": {
"description": "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"WebSearchContextSize": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"WebSearchLocation": {
"type": "object",
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"WebSearchMode": {
"type": "string",
"enum": [
"disabled",
"cached",
"live"
]
},
"WebSearchToolConfig": {
"type": "object",
"properties": {
"allowed_domains": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"context_size": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchContextSize"
},
{
"type": "null"
}
]
},
"location": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchLocation"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,521 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigRequirementsReadResponse",
"type": "object",
"properties": {
"requirements": {
"description": "Null if no requirements are configured (e.g. no requirements.toml/MDM entries).",
"anyOf": [
{
"$ref": "#/definitions/ConfigRequirements"
},
{
"type": "null"
}
]
}
},
"definitions": {
"ApprovalsReviewer": {
"description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
"type": "string",
"enum": [
"user",
"auto_review",
"guardian_subagent"
]
},
"AskForApproval": {
"oneOf": [
{
"type": "string",
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
]
},
{
"type": "object",
"required": [
"granular"
],
"properties": {
"granular": {
"type": "object",
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"request_permissions": {
"default": false,
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
},
"skill_approval": {
"default": false,
"type": "boolean"
}
}
}
},
"additionalProperties": false,
"title": "GranularAskForApproval"
}
]
},
"ComputerUseRequirements": {
"type": "object",
"properties": {
"allowLockedComputerUse": {
"type": [
"boolean",
"null"
]
}
}
},
"ConfigRequirements": {
"type": "object",
"properties": {
"allowAppshots": {
"type": [
"boolean",
"null"
]
},
"allowManagedHooksOnly": {
"type": [
"boolean",
"null"
]
},
"allowedApprovalPolicies": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AskForApproval"
}
},
"featureRequirements": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "boolean"
}
},
"allowedPermissions": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"allowedSandboxModes": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/SandboxMode"
}
},
"allowedWebSearchModes": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/WebSearchMode"
}
},
"allowedWindowsSandboxImplementations": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/WindowsSandboxSetupMode"
}
},
"computerUse": {
"anyOf": [
{
"$ref": "#/definitions/ComputerUseRequirements"
},
{
"type": "null"
}
]
},
"enforceResidency": {
"anyOf": [
{
"$ref": "#/definitions/ResidencyRequirement"
},
{
"type": "null"
}
]
}
}
},
"ConfiguredHookHandler": {
"oneOf": [
{
"type": "object",
"required": [
"async",
"command",
"type"
],
"properties": {
"async": {
"type": "boolean"
},
"command": {
"type": "string"
},
"commandWindows": {
"type": [
"string",
"null"
]
},
"statusMessage": {
"type": [
"string",
"null"
]
},
"timeoutSec": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"type": {
"type": "string",
"enum": [
"command"
],
"title": "CommandConfiguredHookHandlerType"
}
},
"title": "CommandConfiguredHookHandler"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"prompt"
],
"title": "PromptConfiguredHookHandlerType"
}
},
"title": "PromptConfiguredHookHandler"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"agent"
],
"title": "AgentConfiguredHookHandlerType"
}
},
"title": "AgentConfiguredHookHandler"
}
]
},
"ConfiguredHookMatcherGroup": {
"type": "object",
"required": [
"hooks"
],
"properties": {
"hooks": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookHandler"
}
},
"matcher": {
"type": [
"string",
"null"
]
}
}
},
"ManagedHooksRequirements": {
"type": "object",
"required": [
"PermissionRequest",
"PostCompact",
"PostToolUse",
"PreCompact",
"PreToolUse",
"SessionStart",
"Stop",
"SubagentStart",
"SubagentStop",
"UserPromptSubmit"
],
"properties": {
"PermissionRequest": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PostCompact": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PostToolUse": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PreCompact": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"PreToolUse": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"SessionStart": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"Stop": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"SubagentStart": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"SubagentStop": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"UserPromptSubmit": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfiguredHookMatcherGroup"
}
},
"managedDir": {
"type": [
"string",
"null"
]
},
"windowsManagedDir": {
"type": [
"string",
"null"
]
}
}
},
"NetworkDomainPermission": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"NetworkRequirements": {
"type": "object",
"properties": {
"allowLocalBinding": {
"type": [
"boolean",
"null"
]
},
"allowUnixSockets": {
"description": "Legacy compatibility view derived from `unix_sockets`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"allowUpstreamProxy": {
"type": [
"boolean",
"null"
]
},
"allowedDomains": {
"description": "Legacy compatibility view derived from `domains`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dangerouslyAllowAllUnixSockets": {
"type": [
"boolean",
"null"
]
},
"dangerouslyAllowNonLoopbackProxy": {
"type": [
"boolean",
"null"
]
},
"deniedDomains": {
"description": "Legacy compatibility view derived from `domains`.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"domains": {
"description": "Canonical network permission map for `experimental_network`.",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/definitions/NetworkDomainPermission"
}
},
"enabled": {
"type": [
"boolean",
"null"
]
},
"httpPort": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"managedAllowedDomainsOnly": {
"description": "When true, only managed allowlist entries are respected while managed network enforcement is active.",
"type": [
"boolean",
"null"
]
},
"socksPort": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"unixSockets": {
"description": "Canonical unix socket permission map for `experimental_network`.",
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/definitions/NetworkUnixSocketPermission"
}
}
}
},
"NetworkUnixSocketPermission": {
"type": "string",
"enum": [
"allow",
"deny"
]
},
"ResidencyRequirement": {
"type": "string",
"enum": [
"us"
]
},
"SandboxMode": {
"type": "string",
"enum": [
"read-only",
"workspace-write",
"danger-full-access"
]
},
"WebSearchMode": {
"type": "string",
"enum": [
"disabled",
"cached",
"live"
]
},
"WindowsSandboxSetupMode": {
"type": "string",
"enum": [
"elevated",
"unelevated"
]
}
}
}

View File

@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigValueWriteParams",
"type": "object",
"required": [
"keyPath",
"mergeStrategy",
"value"
],
"properties": {
"expectedVersion": {
"type": [
"string",
"null"
]
},
"filePath": {
"description": "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
"type": [
"string",
"null"
]
},
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/MergeStrategy"
},
"value": true
},
"definitions": {
"MergeStrategy": {
"type": "string",
"enum": [
"replace",
"upsert"
]
}
}
}

View File

@@ -0,0 +1,77 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigWarningNotification",
"type": "object",
"required": [
"summary"
],
"properties": {
"details": {
"description": "Optional extra guidance or error details.",
"type": [
"string",
"null"
]
},
"path": {
"description": "Optional path to the config file that triggered the warning.",
"type": [
"string",
"null"
]
},
"range": {
"description": "Optional range for the error location inside the config file.",
"anyOf": [
{
"$ref": "#/definitions/TextRange"
},
{
"type": "null"
}
]
},
"summary": {
"description": "Concise summary of the warning.",
"type": "string"
}
},
"definitions": {
"TextPosition": {
"type": "object",
"required": [
"column",
"line"
],
"properties": {
"column": {
"description": "1-based column number (in Unicode scalar values).",
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"line": {
"description": "1-based line number.",
"type": "integer",
"format": "uint",
"minimum": 0.0
}
}
},
"TextRange": {
"type": "object",
"required": [
"end",
"start"
],
"properties": {
"end": {
"$ref": "#/definitions/TextPosition"
},
"start": {
"$ref": "#/definitions/TextPosition"
}
}
}
}
}

View File

@@ -0,0 +1,244 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConfigWriteResponse",
"type": "object",
"required": [
"filePath",
"status",
"version"
],
"properties": {
"filePath": {
"description": "Canonical path to the config file that was written.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"overriddenMetadata": {
"anyOf": [
{
"$ref": "#/definitions/OverriddenMetadata"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/WriteStatus"
},
"version": {
"type": "string"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"ConfigLayerMetadata": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"$ref": "#/definitions/ConfigLayerSource"
},
"version": {
"type": "string"
}
}
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"type": "object",
"required": [
"domain",
"key",
"type"
],
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"mdm"
],
"title": "MdmConfigLayerSourceType"
}
},
"title": "MdmConfigLayerSource"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"type": {
"type": "string",
"enum": [
"system"
],
"title": "SystemConfigLayerSourceType"
}
},
"title": "SystemConfigLayerSource"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"profile": {
"description": "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.",
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"user"
],
"title": "UserConfigLayerSourceType"
}
},
"title": "UserConfigLayerSource"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"type": "object",
"required": [
"dotCodexFolder",
"type"
],
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"project"
],
"title": "ProjectConfigLayerSourceType"
}
},
"title": "ProjectConfigLayerSource"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"sessionFlags"
],
"title": "SessionFlagsConfigLayerSourceType"
}
},
"title": "SessionFlagsConfigLayerSource"
},
{
"description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`.",
"type": "object",
"required": [
"file",
"type"
],
"properties": {
"file": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromFile"
],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"legacyManagedConfigTomlFromMdm"
],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType"
}
},
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource"
}
]
},
"OverriddenMetadata": {
"type": "object",
"required": [
"effectiveValue",
"message",
"overridingLayer"
],
"properties": {
"effectiveValue": true,
"message": {
"type": "string"
},
"overridingLayer": {
"$ref": "#/definitions/ConfigLayerMetadata"
}
}
},
"WriteStatus": {
"type": "string",
"enum": [
"ok",
"okOverridden"
]
}
}
}

View File

@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ContextCompactedNotification",
"description": "Deprecated: Use `ContextCompaction` item type instead.",
"type": "object",
"required": [
"threadId",
"turnId"
],
"properties": {
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DeprecationNoticeNotification",
"type": "object",
"required": [
"summary"
],
"properties": {
"details": {
"description": "Optional extra guidance, such as migration steps or rationale.",
"type": [
"string",
"null"
]
},
"summary": {
"description": "Concise summary of what is deprecated.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,199 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ErrorNotification",
"type": "object",
"required": [
"error",
"threadId",
"turnId",
"willRetry"
],
"properties": {
"error": {
"$ref": "#/definitions/TurnError"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"willRetry": {
"type": "boolean"
}
},
"definitions": {
"CodexErrorInfo": {
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
"oneOf": [
{
"type": "string",
"enum": [
"contextWindowExceeded",
"usageLimitExceeded",
"serverOverloaded",
"cyberPolicy",
"internalServerError",
"unauthorized",
"badRequest",
"threadRollbackFailed",
"sandboxError",
"other"
]
},
{
"type": "object",
"required": [
"httpConnectionFailed"
],
"properties": {
"httpConnectionFailed": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "HttpConnectionFailedCodexErrorInfo"
},
{
"description": "Failed to connect to the response SSE stream.",
"type": "object",
"required": [
"responseStreamConnectionFailed"
],
"properties": {
"responseStreamConnectionFailed": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "ResponseStreamConnectionFailedCodexErrorInfo"
},
{
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
"type": "object",
"required": [
"responseStreamDisconnected"
],
"properties": {
"responseStreamDisconnected": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "ResponseStreamDisconnectedCodexErrorInfo"
},
{
"description": "Reached the retry limit for responses.",
"type": "object",
"required": [
"responseTooManyFailedAttempts"
],
"properties": {
"responseTooManyFailedAttempts": {
"type": "object",
"properties": {
"httpStatusCode": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
}
}
},
"additionalProperties": false,
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo"
},
{
"description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
"type": "object",
"required": [
"activeTurnNotSteerable"
],
"properties": {
"activeTurnNotSteerable": {
"type": "object",
"required": [
"turnKind"
],
"properties": {
"turnKind": {
"$ref": "#/definitions/NonSteerableTurnKind"
}
}
}
},
"additionalProperties": false,
"title": "ActiveTurnNotSteerableCodexErrorInfo"
}
]
},
"NonSteerableTurnKind": {
"type": "string",
"enum": [
"review",
"compact"
]
},
"TurnError": {
"type": "object",
"required": [
"message"
],
"properties": {
"additionalDetails": {
"default": null,
"type": [
"string",
"null"
]
},
"codexErrorInfo": {
"anyOf": [
{
"$ref": "#/definitions/CodexErrorInfo"
},
{
"type": "null"
}
]
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureEnablementSetParams",
"type": "object",
"required": [
"enablement"
],
"properties": {
"enablement": {
"description": "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.",
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureEnablementSetResponse",
"type": "object",
"required": [
"enablement"
],
"properties": {
"enablement": {
"description": "Feature enablement entries updated by this request.",
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}

View File

@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureListParams",
"type": "object",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"threadId": {
"description": "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExperimentalFeatureListResponse",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/ExperimentalFeature"
}
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"definitions": {
"ExperimentalFeature": {
"type": "object",
"required": [
"defaultEnabled",
"enabled",
"name",
"stage"
],
"properties": {
"announcement": {
"description": "Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.",
"type": [
"string",
"null"
]
},
"defaultEnabled": {
"description": "Whether this feature is enabled by default.",
"type": "boolean"
},
"description": {
"description": "Short summary describing what the feature does. Null when this feature is not in beta.",
"type": [
"string",
"null"
]
},
"displayName": {
"description": "User-facing display name shown in the experimental features UI. Null when this feature is not in beta.",
"type": [
"string",
"null"
]
},
"enabled": {
"description": "Whether this feature is currently enabled in the loaded config.",
"type": "boolean"
},
"name": {
"description": "Stable key used in config.toml and CLI flag toggles.",
"type": "string"
},
"stage": {
"description": "Lifecycle stage of this feature flag.",
"allOf": [
{
"$ref": "#/definitions/ExperimentalFeatureStage"
}
]
}
}
},
"ExperimentalFeatureStage": {
"oneOf": [
{
"description": "Feature is available for user testing and feedback.",
"type": "string",
"enum": [
"beta"
]
},
{
"description": "Feature is still being built and not ready for broad use.",
"type": "string",
"enum": [
"underDevelopment"
]
},
{
"description": "Feature is production-ready.",
"type": "string",
"enum": [
"stable"
]
},
{
"description": "Feature is deprecated and should be avoided.",
"type": "string",
"enum": [
"deprecated"
]
},
{
"description": "Feature flag is retained only for backwards compatibility.",
"type": "string",
"enum": [
"removed"
]
}
]
}
}
}

View File

@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigDetectParams",
"type": "object",
"properties": {
"cwds": {
"description": "Zero or more working directories to include for repo-scoped detection.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"includeHome": {
"description": "If true, include detection under the user's home (~/.claude, ~/.codex, etc.).",
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,194 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigDetectResponse",
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
}
}
},
"definitions": {
"CommandMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"ExternalAgentConfigMigrationItem": {
"type": "object",
"required": [
"description",
"itemType"
],
"properties": {
"cwd": {
"description": "Null or empty means home-scoped migration; non-empty means repo-scoped migration.",
"type": [
"string",
"null"
]
},
"description": {
"type": "string"
},
"details": {
"anyOf": [
{
"$ref": "#/definitions/MigrationDetails"
},
{
"type": "null"
}
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
},
"HookMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"McpServerMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"MigrationDetails": {
"type": "object",
"properties": {
"commands": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/CommandMigration"
}
},
"hooks": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/HookMigration"
}
},
"mcpServers": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/McpServerMigration"
}
},
"plugins": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginsMigration"
}
},
"sessions": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SessionMigration"
}
},
"subagents": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SubagentMigration"
}
}
}
},
"PluginsMigration": {
"type": "object",
"required": [
"marketplaceName",
"pluginNames"
],
"properties": {
"marketplaceName": {
"type": "string"
},
"pluginNames": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SessionMigration": {
"type": "object",
"required": [
"cwd",
"path"
],
"properties": {
"cwd": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
}
},
"SubagentMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportCompletedNotification",
"type": "object"
}

View File

@@ -0,0 +1,194 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportParams",
"type": "object",
"required": [
"migrationItems"
],
"properties": {
"migrationItems": {
"type": "array",
"items": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
}
}
},
"definitions": {
"CommandMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"ExternalAgentConfigMigrationItem": {
"type": "object",
"required": [
"description",
"itemType"
],
"properties": {
"cwd": {
"description": "Null or empty means home-scoped migration; non-empty means repo-scoped migration.",
"type": [
"string",
"null"
]
},
"description": {
"type": "string"
},
"details": {
"anyOf": [
{
"$ref": "#/definitions/MigrationDetails"
},
{
"type": "null"
}
]
},
"itemType": {
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
}
}
},
"ExternalAgentConfigMigrationItemType": {
"type": "string",
"enum": [
"AGENTS_MD",
"CONFIG",
"SKILLS",
"PLUGINS",
"MCP_SERVER_CONFIG",
"SUBAGENTS",
"HOOKS",
"COMMANDS",
"SESSIONS"
]
},
"HookMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"McpServerMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"MigrationDetails": {
"type": "object",
"properties": {
"commands": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/CommandMigration"
}
},
"hooks": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/HookMigration"
}
},
"mcpServers": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/McpServerMigration"
}
},
"plugins": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginsMigration"
}
},
"sessions": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SessionMigration"
}
},
"subagents": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/SubagentMigration"
}
}
}
},
"PluginsMigration": {
"type": "object",
"required": [
"marketplaceName",
"pluginNames"
],
"properties": {
"marketplaceName": {
"type": "string"
},
"pluginNames": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SessionMigration": {
"type": "object",
"required": [
"cwd",
"path"
],
"properties": {
"cwd": {
"type": "string"
},
"path": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
}
},
"SubagentMigration": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExternalAgentConfigImportResponse",
"type": "object"
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FeedbackUploadParams",
"type": "object",
"required": [
"classification"
],
"properties": {
"classification": {
"type": "string"
},
"extraLogFiles": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"includeLogs": {
"type": "boolean"
},
"reason": {
"type": [
"string",
"null"
]
},
"tags": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
},
"threadId": {
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FeedbackUploadResponse",
"type": "object",
"required": [
"threadId"
],
"properties": {
"threadId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangeOutputDeltaNotification",
"description": "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
"type": "object",
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FileChangePatchUpdatedNotification",
"type": "object",
"required": [
"changes",
"itemId",
"threadId",
"turnId"
],
"properties": {
"changes": {
"type": "array",
"items": {
"$ref": "#/definitions/FileUpdateChange"
}
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"definitions": {
"FileUpdateChange": {
"type": "object",
"required": [
"diff",
"kind",
"path"
],
"properties": {
"diff": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/PatchChangeKind"
},
"path": {
"type": "string"
}
}
},
"PatchChangeKind": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"add"
],
"title": "AddPatchChangeKindType"
}
},
"title": "AddPatchChangeKind"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"delete"
],
"title": "DeletePatchChangeKindType"
}
},
"title": "DeletePatchChangeKind"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"move_path": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"update"
],
"title": "UpdatePatchChangeKindType"
}
},
"title": "UpdatePatchChangeKind"
}
]
}
}
}

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsChangedNotification",
"description": "Filesystem watch notification emitted for `fs/watch` subscribers.",
"type": "object",
"required": [
"changedPaths",
"watchId"
],
"properties": {
"changedPaths": {
"description": "File or directory paths associated with this event.",
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePathBuf"
}
},
"watchId": {
"description": "Watch identifier previously provided to `fs/watch`.",
"type": "string"
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCopyParams",
"description": "Copy a file or directory tree on the host filesystem.",
"type": "object",
"required": [
"destinationPath",
"sourcePath"
],
"properties": {
"destinationPath": {
"description": "Absolute destination path.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"recursive": {
"description": "Required for directory copies; ignored for file copies.",
"type": "boolean"
},
"sourcePath": {
"description": "Absolute source path.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCopyResponse",
"description": "Successful response for `fs/copy`.",
"type": "object"
}

View File

@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCreateDirectoryParams",
"description": "Create a directory on the host filesystem.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute directory path to create.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"recursive": {
"description": "Whether parent directories should also be created. Defaults to `true`.",
"type": [
"boolean",
"null"
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsCreateDirectoryResponse",
"description": "Successful response for `fs/createDirectory`.",
"type": "object"
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsGetMetadataParams",
"description": "Request metadata for an absolute path.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute path to inspect.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsGetMetadataResponse",
"description": "Metadata returned by `fs/getMetadata`.",
"type": "object",
"required": [
"createdAtMs",
"isDirectory",
"isFile",
"isSymlink",
"modifiedAtMs"
],
"properties": {
"createdAtMs": {
"description": "File creation time in Unix milliseconds when available, otherwise `0`.",
"type": "integer",
"format": "int64"
},
"isDirectory": {
"description": "Whether the path resolves to a directory.",
"type": "boolean"
},
"isFile": {
"description": "Whether the path resolves to a regular file.",
"type": "boolean"
},
"isSymlink": {
"description": "Whether the path itself is a symbolic link.",
"type": "boolean"
},
"modifiedAtMs": {
"description": "File modification time in Unix milliseconds when available, otherwise `0`.",
"type": "integer",
"format": "int64"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadDirectoryParams",
"description": "List direct child names for a directory.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute directory path to read.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadDirectoryResponse",
"description": "Directory entries returned by `fs/readDirectory`.",
"type": "object",
"required": [
"entries"
],
"properties": {
"entries": {
"description": "Direct child entries in the requested directory.",
"type": "array",
"items": {
"$ref": "#/definitions/FsReadDirectoryEntry"
}
}
},
"definitions": {
"FsReadDirectoryEntry": {
"description": "A directory entry returned by `fs/readDirectory`.",
"type": "object",
"required": [
"fileName",
"isDirectory",
"isFile"
],
"properties": {
"fileName": {
"description": "Direct child entry name only, not an absolute or relative path.",
"type": "string"
},
"isDirectory": {
"description": "Whether this entry resolves to a directory.",
"type": "boolean"
},
"isFile": {
"description": "Whether this entry resolves to a regular file.",
"type": "boolean"
}
}
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadFileParams",
"description": "Read a file from the host filesystem.",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Absolute path to read.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsReadFileResponse",
"description": "Base64-encoded file contents returned by `fs/readFile`.",
"type": "object",
"required": [
"dataBase64"
],
"properties": {
"dataBase64": {
"description": "File contents encoded as base64.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsRemoveParams",
"description": "Remove a file or directory tree from the host filesystem.",
"type": "object",
"required": [
"path"
],
"properties": {
"force": {
"description": "Whether missing paths should be ignored. Defaults to `true`.",
"type": [
"boolean",
"null"
]
},
"path": {
"description": "Absolute path to remove.",
"allOf": [
{
"$ref": "#/definitions/AbsolutePathBuf"
}
]
},
"recursive": {
"description": "Whether directory removal should recurse. Defaults to `true`.",
"type": [
"boolean",
"null"
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsRemoveResponse",
"description": "Successful response for `fs/remove`.",
"type": "object"
}

Some files were not shown because too many files have changed in this diff Show More