feat: adapt codex app-server protocol updates

This commit is contained in:
AI Bot
2026-05-31 03:25:30 +08:00
parent e1aed590f8
commit b9d3cca2e7
820 changed files with 108070 additions and 71 deletions

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` stdioturn 启动前失败才回退 CLIturn 启动后不重复执行;桌面远程控制默认先走 `codex-computer-use`,失败后回退 `cua-driver-computer-use`
- 当前 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` 归一到 Boss `execution_progress` 卡片;同批已补 `turn/steer` 活跃 turn 干预和 `POST /api/v1/projects/[projectId]/thread-collaboration` 服务端线程协作排队入口
- 当前 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,7 +117,8 @@
- 当前 `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`,执行 `initialize -> thread/resume|thread/start -> turn/start`,并把 `item/agentMessage/delta``item/completed` 归一成 Boss 任务回复。turn 启动前失败可回退 CLIturn 启动后失败不回退,避免重复执行
- 当前新增 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`,服务端 complete 回写会与本地 Git/GitHub 进度合并
- 当前 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
- `local-agent/browser-control-task-runner.mjs`
@@ -127,7 +128,22 @@
- 相关配置项:
- `browserControlEnabled / browserControlCommand / browserControlArgs / browserControlWorkdir / browserControlTimeoutMs`
- `computerUseEnabled / computerUseCommand / computerUseArgs / computerUseWorkdir / computerUseTimeoutMs`
- `codexAppServerEnabled / codexAppServerCommand / codexAppServerArgs / codexAppServerWorkdir / codexAppServerTimeoutMs / codexAppServerFallbackToCli`
- `codexAppServerEnabled / codexAppServerCommand / codexAppServerArgs / codexAppServerWorkdir / codexAppServerTimeoutMs / codexAppServerFallbackToCli / codexAppServerTransport / codexAppServerUrl / codexAppServerAuthTokenFile`
- `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/`
#### `POST /api/v1/master-agent/tasks/[taskId]/progress`
- 用途:设备端在执行中实时刷新同一张 `execution_progress`
- 权限:设备 token / 设备写鉴权
- 请求体:`deviceId`、可选 `status=queued|running`、可选 `requestId`、可选 `executionProgress`
#### `POST /api/v1/projects/[projectId]/thread-collaboration`
- 用途:从当前线程发起一次受控线程协作,把源线程上下文注入目标 Codex 线程并让目标线程执行
- 权限:登录态;源项目和目标项目都需要 `project.view`,源项目需要 `master_agent.ask`
- 请求体:`targetProjectId``body``requestText`
- 行为:先在源项目追加用户消息,再创建 `conversation_reply` 任务,任务携带 `intentCategory=thread_collaboration`、源/目标 `threadId``codexThreadRef` 和目标 `codexFolderRef`
- 当前行为:只更新任务进度卡和实时事件,不把任务置为 completed / failed最终成功或失败仍必须走 `POST /api/v1/master-agent/tasks/[taskId]/complete`
- `codexComputerUseEnabled / codexComputerUseCommand / codexComputerUseArgs / codexComputerUseWorkdir / codexComputerUseTimeoutMs / codexComputerUseFallbackToCua`
- 当前仓库已自带 browser smoke runtime、desktop Cua runtime 和旧 desktop smoke 兜底:
- `scripts/browser-control-smoke.mjs`
@@ -146,7 +162,7 @@
- browser`targetUrl / artifacts`
- desktop`targetApp / typedText / artifacts`
- 这样前台与后续真实 runtime 可以共用同一套结果形态,而不需要等接入 Playwright / Computer Use 后再改返回协议
- heartbeat 的 `browserAutomation / computerUse` 能力上报会同时参考静态 connected 标记和 runtime 配置状态;`codexAppServer` 能力上报会参考 feature flag app-server 命令可执行性
- heartbeat 的 `browserAutomation / computerUse` 能力上报会同时参考静态 connected 标记和 runtime 配置状态;`codexAppServer` 能力上报会参考 feature flagstdio 模式校验 app-server 命令可执行性ws/unix 模式校验 `codexAppServerUrl` 是否已配置
### 1.5 Caddy

View File

@@ -1,10 +1,10 @@
# Codex Server 协议与 Boss 执行进度卡接入记录
更新时间:`2026-05-16`
更新时间:`2026-05-31`
## 1. Codex 最新开放协议结论
2026-05-16 的最新架构判断Boss 后续优先围绕 Codex App Server 做深度接入,但当前生产链路仍保留 `codex exec resume``codex mcp-server` 作为兼容 provider 候选。
2026-05-31 的最新架构判断Boss 后续优先围绕 Codex App Server / Remote Control 做深度接入,但当前生产链路仍保留 `codex exec resume``codex mcp-server` 作为兼容 provider 候选。
Codex App Server 是更适合 Boss 长期接入的协议层,因为它面向富客户端和产品级集成,覆盖:
@@ -16,7 +16,7 @@ Codex App Server 是更适合 Boss 长期接入的协议层,因为它面向富
- model/list、skills/list、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 的普通任务完成回写;下一批再继续把 Approval、Skill、file changes 和更细粒度 progress 归一化为 Boss 自有的 `execution_progress / approval_card / change_set / risk_event / skill_capability`
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` 的步骤、分支变更、产物和后台智能体
官方文档入口:`https://developers.openai.com/codex/app-server`
@@ -32,13 +32,23 @@ Boss 不能直接把 App Server 原始 Thread / Turn / Item 字段写进业务
本机当前检测结果:
- 本机 `codex --version``codex-cli 0.131.0-alpha.9`
- 本机 `codex app-server --help` 已可用;本机 help 当前显示 `--listen` 支持 `stdio://``unix://``unix://PATH``off`
- 官方文档仍提到 WebSocket 传输,但标注 experimental / unsupportedBoss 当前只把 `stdio` 作为默认接入,后续如要接 WebSocket 必须先做协议快照和灰度开关
- 本机 `codex --version``codex-cli 0.135.0-alpha.1`
- 本机 `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/*``model/list`
- 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 第一批只用 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>/`
当前“线程和线程之间可以直接对话”的产品判断:
- Codex 已经有更强的 thread coordination、subagent thread spawn、`thread/fork``thread/read``thread/inject_items``turn/start``turn/steer` 等能力。
- 但这不等同于任意两个 Codex 线程官方原生 P2P 互聊。更稳的理解是:一个上层 orchestrator 可以读取线程 A、把必要上下文注入线程 B、再启动或 steer 线程 B 的 turn。
- Boss 应该把这层做成自己的 `Inter-Thread Broker`:用户看到的是“线程协作 / 主 Agent 协调”,底层实现由 App Server provider 完成 read / inject / start / steer / rollback并把过程写入审计与进度卡。
- 2026-05-31 已落地第一版 runner 能力:当任务携带 `intentCategory=thread_collaboration``sourceCodexThreadRef``targetCodexThreadRef` 时,`local-agent/codex-app-server-runner.mjs` 会执行 `thread/read(source) -> thread/inject_items(target) -> turn/start(target)`,并只注入受控摘要,不注入系统提示词、设备密钥或内部调度字段。
## 2. Boss 当前采用的接入策略
短期不直接依赖 Codex Desktop 私有 UI 结构,也不把 Codex CLI 原始 stderr/stdout 泄露给 APP。
@@ -63,6 +73,12 @@ APP 展示结构对齐截图:
- `生成结果`从执行结果里提取文件、图片、APK、文档等产物名
- `后台智能体`:预留 OMX / Hermes / explorer 等多智能体来源展示
UI 参考:
- image2 生成稿:`design/image2/boss-app-codex-app-server-progress-card-20260531.png`
- 当前生成稿保持微信效率型:顶部保留项目目标 / 版本记录固定入口,聊天区只展示最终用户消息和结构化进度卡,进度卡分为 `进度 / 分支详情 / 生成结果 / 后台智能体`
- 后续 Android / Web 继续按该稿收口,不新增无关功能,不把协议字段、系统提示词或执行 envelope 暴露给用户
## 3. 安全边界
进度卡只允许展示用户可见摘要:
@@ -97,10 +113,17 @@ APP 展示结构对齐截图:
- `local-agent` 新增 `Codex App Server` runnerboss-agent 默认打开;`conversation_reply / dispatch_execution` 会先尝试 App Server任务尚未真正启动 turn 时允许回退 CLIturn 已启动后不再重复下发,避免双写同一线程
- `local-agent` 新增 `Codex Computer Use -> CUA Driver` 桌面控制级 fallback远程控制这台电脑时默认先通过 Codex Computer Use 执行,失败后再走 Boss 既有 CUA Driver runtime
- `device-heartbeat` 设备能力新增 `codexAppServer`,用于前台和后台知道该设备是否具备 App Server provider
- 新增 `scripts/codex-app-server-protocol-snapshot.mjs`,可把本机 Codex App Server 的 help、JSON Schema、TypeScript bindings 和方法清单生成到 `docs/protocol-snapshots/codex-app-server/<version>/`
- `local-agent/codex-app-server-runner.mjs` 已吸收 App Server 协议进度事件,并把 plan、diff、artifact、subagent 归一成 Boss `executionProgress`,服务端 complete 回写会与本地 Git/GitHub 进度合并,不再覆盖协议原生进度
- 新增实时进度入口 `POST /api/v1/master-agent/tasks/[taskId]/progress`,设备端可在任务执行中持续刷新同一张 `execution_progress` 卡;`local-agent` 的 App Server runner 已在收到协议进度事件时调用该接口complete 仍携带最终进度作为兜底
- 新增服务端线程协作入口 `POST /api/v1/projects/[projectId]/thread-collaboration`,由 Boss 校验源/目标项目权限并创建 `intentCategory=thread_collaboration``conversation_reply` 任务;设备端继续通过 App Server runner 执行 `thread/read -> thread/inject_items -> turn/start`,避免把“线程互通”误做成无监管 P2P
- 新增活跃 turn 干预:任务携带 `targetCodexTurnId` / `targetTurnId`App Server runner 会调用 `turn/steer`,并把 `turnControl=steer``turnId` 写回执行结果;没有活跃 turn id 时仍使用 `turn/start`
- `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 判定
后续建议按两步继续:
1. 把当前 runner 提升为完整 `CodexAppServerBackendAdapter`:继续补 Approval / file change / skill / app / browser / computer-use 事件映射,但保持 feature flag 默认关闭。
2. 新增 `CodexMcpBackendAdapter`:让 `codex mcp-server` 成为 `ExecutionBackend` 的兼容实现,用于 App Server 不可用或只需要轻量会话时
3. 增加任务级 live progress API`POST /api/v1/master-agent/tasks/[taskId]/progress`,让本地 agent 在执行中也能实时刷新进度卡,而不是只在 claim / complete 两个节点更新
4. 建立协议快照目录和兼容测试:每次 Codex 协议升级时生成 schema、跑映射测试、灰度打开新 capability避免把某个 Codex 版本写死到 APP 或后台。
1. 把当前 runner 提升为完整 `CodexAppServerBackendAdapter`:继续补 Approval / file change patch / skill / plugin / app / MCP tool / realtime 事件映射,但保持 feature flag 默认关闭。
2. 完善长驻 transport 灰度:`ws://127.0.0.1:<port>``unix://PATH` 和 bearer token handshake 已可用,下一步补 signed bearer JWT 的 issuer / audience 校验联调、断线重连和健康探测;失败自动回退 stdio
3. 新增 `CodexMcpBackendAdapter`:让 `codex mcp-server` 成为 `ExecutionBackend` 的兼容实现,用于 App Server 不可用或只需要轻量会话时
4. 每次 Codex 协议升级时生成 schema、跑映射测试、灰度打开新 capability避免把某个 Codex 版本写死到 APP 或后台。

View File

@@ -1,6 +1,6 @@
# Boss 当前运行与部署状态
更新时间:`2026-05-16`
更新时间:`2026-05-31`
## 1. 本地状态
@@ -35,7 +35,7 @@
- `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 -> CodexMcpBackendAdapter -> codex exec resume` 的分层 provider 策略;当前 boss-agent 默认打开 `Codex App Server` runner 作为 Codex 绑定入口Boss 仍保留 `codex exec resume` 兜底,并继续用 `execution_progress` 结构化进度卡作为 APP 可见执行态
- 当前 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/*``command/exec``model/list`
- 当前量产 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 接入`
@@ -58,7 +58,7 @@
- 当前最新 boss-agent Mac 包版本为 `20260516221619`,已部署到 `https://boss.hyzq.net/api/v1/boss-agent/ota` 并在局域网 MacBook Air `macbook-air` 上完成真实 OTA 下载、sha256 校验、暂存、覆盖安装和 up-to-date 检查:安装后 `config.installed.json` 仍保持 `deviceId=macbook-air`、账号 `krisolo`、版本 `20260516221619``launchd` 状态为 running。
- 当前安装器已做多电脑绑定保护:`install.command` 会保留所有 `config*.json` 并优先沿用当前 launchd active config底层 `scripts/install-local-launchagent.sh` 在无显式参数时也会优先读取现有 LaunchAgent 的配置路径,再回退自定义设备配置,避免多台 Mac 重装/OTA 时误切到默认 `config.cloud.json`
- 当前 Cua runtime 已补上 launchd 友好的可执行文件发现:除 `PATH` 外会主动查找 `~/.local/bin/cua-driver``/Applications/CuaDriver.app/Contents/MacOS/cua-driver`;如果 `launch_app` 对已运行 App 返回 not found会兜底走 `list_apps -> list_windows -> get_window_state` 复用现有窗口
- 当前本机 `local-agent` 默认 heartbeat 已把 `browserAutomation / computerUse` 两项能力视为“已接通起步版 runtime”因此 Boss 前台设备能力会直接显示这两条链路在线;`codexAppServer` 能力只有在显式打开 App Server runner 且本机 `codex` 命令可执行时才会上报在线;如果后续需要临时关闭,可在 `local-agent/config.cloud.json` 里单独下掉对应 connected 标记或 runtime 命令
- 当前本机 `local-agent` 默认 heartbeat 已把 `browserAutomation / computerUse` 两项能力视为“已接通起步版 runtime”因此 Boss 前台设备能力会直接显示这两条链路在线;`codexAppServer` 能力只有在显式打开 App Server runner 后才会上报在线stdio 模式会校验本机 `codex` 命令可执行ws/unix 模式会校验已配置 `codexAppServerUrl`;如果后续需要临时关闭,可在 `local-agent/config.cloud.json` 里单独下掉对应 connected 标记或 runtime 命令
本地已知运行方式:
@@ -246,16 +246,17 @@ cd /Users/kris/code/boss
- 当前 `local-agent` 已能回写带 `dispatchExecutionId / targetProjectId / targetThreadId / rawThreadReply` 的任务完成载荷,群聊分发执行结果不再只停留在主 Agent 队列
- 当前 `local-agent``conversation_reply` 任务会优先使用 `codex exec resume <targetCodexThreadRef>`,只有缺失真实线程引用时才退回 `--ephemeral`
- 当前已绑定真实 `codexThreadRef` 的普通单线程聊天,会在 `local-agent` 执行 `codex exec resume` 前,先把 Boss 用户消息镜像写入对应 Codex Desktop rollout这样 APP 发起的消息也能进入桌面版同一线程历史,并按 `sourceMessageId` 去重。rollout 定位优先使用 `state_5.sqlite`,状态库不可用或索引缺失时回退扫描 `~/.codex/sessions`;写入后会尽量刷新 `threads.updated_at / updated_at_ms / has_user_event`,再通过 `codex://threads/{threadId}` 深链提示桌面版打开目标线程
- 当前 `local-agent` 已新增 `Codex App Server` providerboss-agent 默认配置 `codexAppServerEnabled=true``conversation_reply / dispatch_execution` 会先通过 `codex app-server` 的 stdio JSON-RPC 恢复或创建线程,再下发 `turn/start` 并收集流式 agent 回复;如果 App Server 在 turn 启动前失败,默认允许回退到 `codex exec resume`,如果 turn 已经启动则不再回退,避免同一轮用户消息被重复执行。桌面控制另有 `codexComputerUseEnabled=true`,默认先走 Codex Computer Use再回退 CUA Driver。
- 当前 `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 原生聊天页会显示“进度 / 分支详情 / 生成结果 / 后台智能体”,其中 Git diff、GitHub CLI 可用性和产物名由本地 agent 补齐
- 当前 `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` 会直接映射为进度步骤、变更统计、生成产物和后台智能体,并通过 `POST /api/v1/master-agent/tasks/[taskId]/progress` 实时刷新complete 回写仍会携带最终进度兜底
- 当前 `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 错误,不再假装执行成功
- 远程电脑控制链路当前已有可复用压测基线:`npm run stress:remote-control` 可按参数压测 `local-agent -> MasterAgentTask -> browser_control / desktop_control runtime -> complete 回写` 全链路;`npm run stress:remote-control:ci` 固定 120 条链路任务和 360 条 runtime 并发任务,并用 p95 延迟预算判断是否退化。压测报告可通过 `--report-json=PATH` 落盘,便于后续接入真实 macOS AX / Windows UIA helper 后复用同一套稳定性判断。
- 当前历史脏群如果不再包含真实线程成员,群聊消息不会再表现成“无响应”;服务端会在群内追加明确 `system_notice`,提示先重新添加线程成员
- 当前设备导入决议已经升级成真正通过 `local-agent -> codex exec -> /complete` 回写的主 Agent 决议链Web 和 Android 前台都会在 `pending_resolution` 阶段显示审核任务状态,并在任务完成后自动刷新出正式导入建议
- 当前 `local-agent` 已改成先启动本地 `4317` 健康监听,再异步跑首次 heartbeat 和 task poll避免控制面短时阻塞时本地健康探针不可用
- 当前 heartbeat 上报 `browserAutomation / computerUse / codexAppServer` 能力时,不再只看静态 connected 布尔值browser/computer 会参考 runtime 配置状态Codex App Server 会参考 `codexAppServerEnabled`本机 app-server 命令可执行性
- 当前 heartbeat 上报 `browserAutomation / computerUse / codexAppServer` 能力时,不再只看静态 connected 布尔值browser/computer 会参考 runtime 配置状态Codex App Server 会参考 `codexAppServerEnabled`stdio 模式校验本机 app-server 命令可执行性ws/unix 模式校验 `codexAppServerUrl`
- Codex 项目/线程扫描当前已搬到 worker 线程执行,避免 `.codex/logs_1.sqlite``state_5.sqlite` 的同步扫描阻塞主线程健康接口
- 当前 `local-agent` 的任务完成回写已通过 `RemoteRuntimeAdapter` 标准化,`conversation_reply / dispatch_execution` 的完成载荷会先做统一归一化,再进入主 Agent 完成路由
- 原生 Android 当前对 `master-agent` 聊天不再依赖长时间同步等待;发送后会先显示“主 Agent 思考中”,右上角改成微信式 `...` 菜单,菜单项包含 `模型 / 推理强度 / 会话信息 / 刷新`

View File

@@ -0,0 +1,75 @@
[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://]
--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,505 @@
{
"$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"
}
},
"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",
"none"
]
},
"ResidencyRequirement": {
"type": "string",
"enum": [
"us"
]
},
"SandboxMode": {
"type": "string",
"enum": [
"read-only",
"workspace-write",
"danger-full-access"
]
},
"WebSearchMode": {
"type": "string",
"enum": [
"disabled",
"cached",
"live"
]
}
}
}

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"
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FsUnwatchParams",
"description": "Stop filesystem watch notifications for a prior `fs/watch`.",
"type": "object",
"required": [
"watchId"
],
"properties": {
"watchId": {
"description": "Watch identifier previously provided to `fs/watch`.",
"type": "string"
}
}
}

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